好学IT学院:IT信息技术分享交流平台
来源:本站整理  作者:学生大读书站  发布时间:2006-12-23  ★★★加入收藏〗〖手机版
摘要://创建一个控制文件命令到跟踪文件 alter database backup controlfile to trace;//增加一个新的日志文件组的语句 connect internal as sysdba alter database ……

archive log start;
exit
EOFarch2
#
#   Step 4. Back up the archived redo logs to the tape
#  device via the "tar" command, then delete them
#  from the destination device via the "rm" command.
#
tar -rvf /dev/rmt/0hc $FILES
#
#   Step 5. Delete those files from the destination directory.
#
rm -f $FILES
#
#   End of archived redo log file backup script.

REM  磁盘到磁盘的备份
REM
REM   Back up the RBS tablespace - to another disk (UNIX)
REM
alter tablespace RBS begin backup;
!cp /db02/oracle/CC1/rbs01.dbf /db10/oracle/CC1/backups
alter tablespace RBS end backup;
REM

REM  移动归档日志文件的shell脚本
#
# Procedure for moving archived redo logs to another device
#
svrmgrl <<EOFarch2
connect internal as sysdba
archive log stop;
!mv /db01/oracle/arch/CC1 /db10/oracle/arch/CC1
archive log start;
exit
EOFarch2
#
# end of archived redo log directory move.

//生成创建控制文件命令
alter database backup controlfile to trace;

//时间点恢复的例子
connect internal as sysdba
startup mount instance_name;
recover database until time ’1999-08-07:14:40:00’;

//创建恢复目录
rman rcvcat rman/rman@<database_service_name>

// 在(UNIX)下创建恢复目录
RMAN> create catalog tablespace rcvcat;

// 在(NT)下创建恢复目录
RMAN> create catalog tablespace "RCVCAT";

//连接描述符范例 
(DESCRIPTION=
    (ADDRESS=
          (PROTOCOL=TCP)
          (HOST=HQ)
          (PORT=1521))
    (CONNECT DATA=
          (SID=loc)))

// listener.ora 的条目entry
LISTENER =
  (ADDRESS_LIST =
      (ADDRESS=
        (PROTOCOL=IPC)
         (KEY= loc.world)
      )
   ) 
SID_LIST_LISTENER =
  (SID_LIST =
  (SID_DESC =
    (SID_NAME = loc)
    (ORACLE_HOME = /orasw/app/oracle/product/8.1.5.1)
   )
 )

Oracle数据库设计要做到五戒
  众所周知,数据库设计的好坏直接关系到数据库运行的效率。根据笔者的经验,对于提升数据库性能来说,合理的数据库设计,比升级服务器的硬件…
  • 好学考试H5触屏版开放内测
  • 好学触屏公众号虎力全开、杨帆起航!