首页 > 开发 > 综合 > 正文

联机热备份的步骤

2024-07-21 02:36:46
字体:
来源:转载
供稿:网友

  1 使数据库处于ARCHIVELOG模式
  
  $svrmgrl
  SVRMGR> connect internal
  SVRMGR> ALTER DATABASE ARCHIVELOG;
  SVRMGR>ARCHIVE log start
  SVRMGR>ALTER DATABASE OPEN;
  
  2 获取最早的联机日志序列号
  
  SVRMGR> archive log list
  
  3 将要备份的表空间设为热备份模式
  
  SVRMGR> ALTER TABLESPACE tablespace_name BEGIN BACKUP;
  
  4 使用操作系统命令备份改表空间的datafile
  
  
  
  5 取消该表空间的热备份模式
  
  SVRMGR> ALTER TABLESPACE tablespace_name END BACKUP;
  
  6 如还有其他要备份的表空间,重复3-5
  
  7 强制日志切换
  
  SVRMGR> ALTER SYSTEM SWITCH LOGFILE ;
  
  8 使用os命令备份所有归档日志文件
  
  9 备份control file
  
  SVRMGR>ALTER DATABASE BACKUP CONTROL FILE TO 'filespecif' ;
  
  
   
   
   
   
  -------------------------------------------------------------------
  STARTUP [DBA] [FORCE] [PFILE=filespec] [EXCLUSIVE SHARED]
   [MOUNT dbname OPEN dbname] [NOMOUNT]
  
  SHUTDOWN [NORMAL IMMEDIATE ABORT]
  
  MONITOR For graphical modes only, bring up a monitor
  
  ARCHIVE LOG [START] [STOP] [LIST] [NEXT] [] [ALL] ['destination']
  
  RECOVER { [DATABASE [MANUAL] ] [TABLESPACE ts-name [,tsname]] }
  
  CONNECT [username [/passWord] ] [INTERNAL] ['@'instance-spec]
  DISCONNECT
  
  SET options: INSTANCE, ECHO, TERMOUT, TIMING, NUMWIDTH, CHARWIDTH
  SHOW LONGWIDTH, DATEWIDTH, AUTOPRINT and for SHOW: ALL, SPOOL
  
  EXIT
  REM
   SQL statements can also be executed.

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表