oracle 备份,表空间检查shell脚本代码
#!/bin/ksh
#****************************************************************************
#
# (C) Copyright CPIC. 2008
#
# File name: check_db_alert.sh
# Project: Database Alerts Check
#
# Parameter : app_name -- name of db application(=oracle_sid)
# ipaddress -- ip of the db server
#
# Creation Date: Aug 19, 2008
# Origin Author: Shangkun Peng
#
#
# Prerequisites:
# before using this shell script, directory $DAILY_CHECK must be created
# and this shell script should be put into it.
# for each application, environment file $DBENVFILE must be put into it.
# also, variables for auto ftp must be set
#
# Limitations:
# this shell script can be run at most once an hour
# additional job can be added but variable JOB_LIST must be modified
# and relative function must be coded too
#
#****************************************************************************
# record start date and time
echo "------------------------------------------------------------"
echo "database information collect started at:"; date
# check necessary parameter(s)
if [ $# -ne 2 ]
then
echo "ERROR: parameter(s) not supplied correctly"
echo "USAGE: check_db_alert.sh app_name ipaddress"
echo "WHERE:"
echo "app_name -- name of db application"
echo "ipaddress -- ip of the db server"
exit 1
fi
# -----------------------------------------------------------------------------------------------------------
# DEFINE VALUES FOR VARIABLES IN THIS SHELL
# general variables, can not be modified
APP_NAME=$1 # name of db application
IPADDRESS=$2 # ip of db server
DAILY_CHECK=/tmp/db_dailycheck # directory for information collection of db application
DBENVFILE=$APP_NAME".dbenv"&
相关文档:
sys是Oracle数据库中权限最高的帐号,具有create database的权限,而system没有这个权限,sys的角色是sysdba,system的角色是sysoper。
其余就是他们两个用户共有的权限了:
startup/shutdown/dba两个用户都是可以管理的。
平时用system来管理数据库就可以了。这个用户的权限对 ......
Oracle的优化器有两种优化方式(整理), 2010-04-13
RBO方式:基于规则的优化方式(Rule-Based Optimization,简称为RBO)
优化器在分析SQL语句时,所遵循的是Oracle内部预定的一些规则。比如我们常见的,当一个where子句中的一列有索引时去走索引。
CBO方式:基于代价的优化方式(Cost-Based Optimization,简称为CBO ......
在做项目经常遇到分科室、人员进行汇总的问题,在ORACLE中对此类问题的处理相当方便!下面以项目中遇到的实例进行说明:
查询语句如下:
select f_sys_getsectnamebysectid(a.sectionid) as sectname,
--a.sectionid,
f_sys_employin ......
如何加速
Oracle
大批量数据处理
一、
提高
DML
操作的办法:
简单说来:
1、暂停索引,更新后恢复.
避免在更新的过程中涉及到索引的重建.
2、批量更新,每更新一些记录后及时进行提交动作.
避免大量占用回滚段和或临时表空间.
3、创建一临时 ......