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中用Rowid查找和删除重复记录
平时工作中可能会碰到当试图对库表中的某一列或几列创建唯一索引时,系统提示 ORA-01452 :不能创建唯一索引,发现重复记录。
下面总结一下几种查找和删除重复记录的方法(以表CZ为例):
表CZ的结构如下:
SQL> desc cz
Name Null? Type
---------- ......
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 ......
数据库是一个多用户使用的共享资源。当多个用户并发地存取数据时,在数据库中就会产生多个事务同时存取同一数据的情况。若对并发操作不加控制就可能会读取和存储不正确的数据,破坏数据库的一致性。
加锁是实现数据库并发控制的一个非常重要的技术。当事务在对某个数据对象进行操作前,先向系统发出请求,对其加锁。加锁后 ......