正式數據庫及Standby DB中操作比較 -->
正式數據庫 :
加入數據文件 alter tablespace tablespacename add datafile '/data/dell/index02.dbf' size 1024m
改變數據文件大小 alter database datafile '/data/dell/log_data02.dbf' resize 2048m
Standby數據庫 :
先在Standby數據庫上歸檔
然後加入數據文件 alter database create datafile '/data/dell/indx03.dbf' as '/Standby-data/dell/indx03.dbf'
============================================================
Ftp自動拷貝歸檔文件腳本及自動恢復腳本 -->
以下腳本一般放在 /data/run/autoftp 文件中(以epd為例子) .
#!/bin/sh
ftp -n <
open 10.161.48.97
user oracle epd#oracle$
cd /data/epd/arch
lcd /data/epd/arch
bin
hash
prompt
mget *
bye
!
以下腳本一般放在 /data/run/autoreco 文件中(以epd為例子) . 注意這裡是Oracle8i 的svrmgrl . Oracle9i 下會使用sqlplus .
以下是Oracle8i 的自動恢復腳本 .
#!/bin/sh
ORACLE_SID=epd
export ORACLE_SID
ORACLE_HOME=/u01/product/oracle; export ORACLE_HOME
ORACLE_SID=epd; export ORACLE_SID
ORACLE_OWNER=oracle; export ORACLE_OWNER
ORACLE_BASE=/u01/product; export ORACLE_BASE
ORACLE_TERM=vt100; export ORACLE_TERM
NLS_LANG='traditional chinese_taiwan'.ZHT16BIG5; export NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
su oracle -c "/u01/product/oracle/bin/svrmgrl << EOF
connect internal
set autorecovery on;
recover standby database;
exit
EOF"
以下是Oracle9i 的自動恢復腳本 .
#!/bin/sh
ORACLE_HOME=/u01/product/oracle;export ORACLE_HOME
ORACLE_SID=tpc;export ORACLE_SID
su oracle -c "/u01/product/oracle/bin/sqlplus /nolog <
connect sys/ora816#sys as sysdba;
set autorecovery on;
recover standby database;
exit;
EOF"
Alter tablespace temp add tempfile ‘/u01/product/oradata/dell/temp01.dbf’ size 1024M reuse;
Alter database open read only;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12137615/viewspace-605972/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12137615/viewspace-605972/