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"&
相关文档:
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分页???
在mysql中只要limit x,y就可以分页成功,那oracle 中是怎么做的呢?
=================================================
方法一:
SELECT id,rown
from (SELECT id, ROWNUM rown
&nb ......
Linux/Unix上,Oracle是多个进程实现的,每一个主要函数都是一个进程;在Windows上,则是一个单一进程,进程中包含多个线程。
Oracle把一系列物理文件,如数据文件(Data file)、控制文件(Control file)、联机日志(Redo log file)、参数文件(spfile or pfile)等物理结构及与之对应的逻辑结构,如表空间(Tablespace)、段(Seg ......
玩Oracle也有2年的时间了, 零零散散的也整理一些资料。 东西一多了,就理不清楚。 所以结合张晓明的《大话Oracle RAC》的一些内容,和自己整理的一些笔记,对Oracle 的备份和恢复做了一个系统的整理。 也是自己对知识的一个巩固吧。
一. 准备知识
先来看一些准备知识,了解 ......