nbu_oracle安装使用手册(win版)

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Windows下Oracle备份文档目录1.安装及载卸OracleAgent.......................................................................................................21.1安装OracleAgent.....................................................................................................21.2载卸OracleAgent.....................................................................................................32配置并创建Oracle的备份策略.............................................................................................32.1准备工作...................................................................................................................32.2创建备份策略...........................................................................................................42.3创建备份脚本...........................................................................................................52.4手工执行备份策略...................................................................................................73Oracle数据库的恢复测试......................................................................................................73.1Oracle恢复测试前的准备工作...............................................................................73.2单个数据文件的恢复测试.......................................................................................83.3整个数据库的完全恢复测试...................................................................................81.安装及载卸OracleAgent1.1安装OracleAgent在安装NetBackupWindows客户端的过程中,已经自动将所有数据库的agent安装完毕在explorer中确认已经安装了所有数据库的agent确认NetBackup已经和Oraclelink成功C:\rmannocatalogRecoveryManager:Release8.1.6.0.0-ProductionRMANconnecttarget/RMAN-06005:connectedtotargetdatabase:ORCL(DBID=1028355197)RMAN-06009:usingtargetdatabasecontrolfileinsteadofrecoverycatalogRMANallocatechannelformaintenancetype'sbt_tape';RMAN-03022:compilingcommand:allocateRMAN-03023:executingcommand:allocateRMAN-08030:allocatedchannel:deleteRMAN-08500:channeldelete:sid=17devtype=SBT_TAPERMAN-08526:channeldelete:VERITASNetBackupforOracle-Release5.1RMAN1.2载卸OracleAgent卸载NetBackup时会直接卸载Oracleagent2配置并创建Oracle的备份策略2.1准备工作1.确认oracle运行在归档方式2.如果oracle服务不是以localadmin启动,则需要更改NetBackupClientservice的启动帐号,将它和oracle备份对应。3.修改masterserver的”MaximumJobpreclient”等于99,缺省为1。2.2创建备份策略1.在NetBackupMasterServer上,创建一个新的备份策略,如下图所示;2.输入新策略的名称后,按确定,会提示配置一个完整备份策略的第一部分‘Attributes’;其中:策略类型Policytype选择Oracle;在‘Policystorageunit’中选择需使用的存储单元;在‘Policyvolumepool’中选择已分配用来备份oracle数据的volumepool;并打勾选中Limitjobsperpolicy,然后输入99,其它默认不变;3.点击转向‘Clients’页面点击‘New’来添加一个客户端,输入客户端的名称,也就是需要备份的那台oracle服务器的主机名,选择好主机类型,然后点击OK按钮;4.点击‘BackupSelections’,然后点击‘New’,来添加需要调用的Oracle备份脚本,输入备份脚本的全路径和脚本的文件名,然后点击‘Add’,如下图所示,注意备份脚本此时尚未创建,所以备份策略建立完毕后,需要创建备份脚本;5.检查此路径和文件名无误后,点击‘Schedules’页面,然后点击‘New’,来添加一个备份时间计划,在‘Name’中输入新建备份时间计划的名称,如‘ora_full’;在‘Retention’中选择备份内容的保存周期,在‘Frequency’中设定备份作业的执行频率。转向页面‘StartWindow’中设定需要备份的时间段,完成后点击OK。在计划列表中已有一个‘Default-Application-Backup’的备份策略,此策略是OracleAgent的执行策略,不可以随意修改或删除。到此,备份策略已制定完毕。2.3创建备份脚本1.创建备份脚本存放路径;此路径应和之前创建备份策略时写的备份脚本路径一致。2.复制脚本模板;OracleAgent安装完成后,备份的脚本模板会放在c:\programfiles\veritas\netbackup\dbext\oracle\samples\rman下3.修改备份脚本hot_database_backup;@setORACLE_HOME=d:\oracle\ora92@setORACLE_SID=EDW@setTARGET_CONNECT_STR=veritas/veritas@setNETBACKUP_HOME=c:\programfiles\veritas@setlocalENABLEEXTENSIONS@echooff@setRMAN_LOG_FILE=%~dpn0.out@ifexist%RMAN_LOG_FILE%del%RMAN_LOG_FILE%@setRMAN=%ORACLE_HOME%\bin\rman.exe@for/Ftokens=1*%%pin('date/T')do@setDATE=%%p%%q@for/F%%pin('time/T')do@setDATE=%DATE%%%p@echo====startedon%DATE%====%RMAN_LOG_FILE%@echoScriptname:%0%RMAN_LOG_FILE%@setNLS_LANG=american@setNLS_DATE_FORMAT=YYYY-MM-DD:hh24:mi:ss@echo#%RMAN_LOG_FILE%@echoRMAN:%RMAN%%RMAN_LOG_FILE%@echoNLS_LANG:%NLS_LANG%%RMAN_LOG_FILE%@echoORACLE_HOME:%ORACLE_HOME%%RMAN_LOG_FILE%@echoORACLE_SID:%ORACLE_SID%%RMAN_LOG_FILE%@echoNLS_DATE_FORMAT:%NLS_DATE_FORMAT%%RMAN_LOG_FILE%@echoRMAN_LOG_FILE:%RMAN_LOG_FILE%%RMAN_LOG_FILE%@echoNB_ORA_SERV:%NB_ORA_SERV%%RMAN_LOG_FILE%@echoNB_ORA_FULL:%NB_ORA_FULL%%RMAN_LOG_FILE%@echoNB_ORA_INCR:%NB_ORA_INCR%%RMAN_LOG_FILE%@echoNB_ORA_CINC:%NB_ORA_CINC%%RMAN_LOG_FILE%@echoNB_ORA_CLASS:%NB_ORA_CLASS%%RMAN_LOG_FILE%@if%NB_ORA_FULL%EQU1@setBACKUP_TYPE=INCREMENTALLevel=0@if%NB_ORA_INCR%EQU1@setBACKUP_TYPE=INCREMENTALLevel=1@if%NB_ORA_CINC%EQU1@setBACKUP_TYPE=INCREMENTALLevel=1CUMULATIVE@ifNOTDEFINEDBACKUP_TYPE@setBACKUP_TYPE=INCREMENTALLevel=0@(echoRUN{echoALLOCATECHANNELch00TYPE'SBT_TAPE';echoBACKUPecho%BACKUP_TYPE%echoFORMAT'bk_u%%u_s%%s_p%%p_t%%t'echoDATABASE;echosql'altersystemarchivelogcurrent';echoRELEASECHANNELch00;echo#BackupallarchivelogsechoALLOCATECHANNELch00TYPE'SBT_TAPE';echoBACKUPechoFILESPERSET20echoFORMAT'arch-s%%s-p%%p'echoARCHIVELOGALL;echoRELEASECHANNELch00;echoallocatechannelch00typedisk;echocopycurrentcontrolfileto'c:\poracl1.ctl';echoreleasechannelch00;echo})|%RMAN%target%TARGET_CONNECT_STR%nocatalogmsglog'%RMAN_LOG_FILE%'append@setERRLEVEL=%ERRORLEVEL%@if%ERRLEVEL%NEQ0@gotoerr@setLOGMSG=endedsuccessfully@if%STATUS_FILE%EQUgotoend@echo0%STATUS_FILE%@gotoend:err@setLOGMSG=endediner

1 / 9
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功