linux下 Oracle自动启动与停止
1、 修改Oracle系统配置文件/etc/oratab/etc/oratab 格式为: SID:ORACLE_HOME:AUTO把AUTO域设置为Y(大写),只有这样,oracle 自带的dbstart和dbshut才能够发挥作用。我的为:ora9i:/home/oracle/ora/products/9.2.0:Y2、 编写服务脚本:如下#!/bin/bashcase "$1" instart)echo "Starting Oracle Databases ... " echo "-------------------------------------------------" >> /var/log/oracledate +" %T %a %D : Starting Oracle Databasee as part of system up." >> /var/log/or
table()函数用法
PL/SQL表---table()函数用法 /*PL/SQL表---table()函数用法:利用table()函数,我们可以将PL/SQL返回的结果集代替table。simple example:1、table()结合数组:*/create or replace type t_test as object(id integer,rq date,mc varchar2(60));create or replace type t_test_table as table of t_test;create or replace function f_test_array(n in number default null) return t_test_tableas v_test t_test_table := t_test_table();beginfor i in 1 .. nvl(n,100) loopv_test.extend();v_test(v_test.count) := t_test(i,sysdate,'
冷備份
rem script:coldbak.sqlrem creater:chenjipingrem date:5.8.2003rem desc:offline full backup database --connect database--connect sys/dbtest@DbTest as sysdba;connect /as sysdba;--shutdown databaseshutdown immediate;--Copy Data file$xcopy E:oracledataDbTest*.dbf e:oraclebak/H/R; --Copy Control file$xcopy E:oracledataDbTest*.ctl e:oraclebak/H/R;--Copy Log file$xcopy E:oracledataDbTest*.log e:oraclebak/H/R;--startup databasestartup;[@more@]