已阅读5页,还剩40页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
TSM5.5备份和恢复Oracle 11gR2IBM Tivoli Storage Manager for Databases Data Protection for Oracle,以下简称:TDPO1、安装TDPO1.1、软件选择tivoli.tsm.client.api.32bittivoli.tsm.client.api.64bittivoli.tsm.client.oracle.aix.64bittivoli.tsm.client.oracle.tools.aix.64bittivoli.tsm.loc.client.oracle.aix.64bit.ela1.2、软件安装1.2.1、将所有需要安装的文件集上传到服务器上,假设上传到/tmp/soft/tsm/oracle目录。1.2.2、进入软件集目录,然后执行安装命令:bash-3.2# cd /tmp/soft/tsm/oraclebash-3.2# smitty installInstall and Update SoftwareInstall and Update from ALL Available Software在* INPUT device / directory for software中输入./SOFTWARE to install中输入allACCEPT new license agreements?选项中no改为yes然后按回车键安装,再按回车键确认后,软件安装完成。2、将RMAN与TDPO重新链接a、设置Oracle LD_LIBRARY_PATH选项修改.proflie文件,将$ORACLE_HOME/lib放在LD_LIBRARY_PATH选项第一位,即:LD_LIBRARY_PATH=$ORACLE_HOME/libb、关闭使用$ORACLE_HOME的所有Oracle实例c、转至$ORACLE_HOME目录d、将库文件符号连接到libobk.aln -s /usr/lib/libobk64.a $ORACLE_HOME/lib/libobk.a3、定义tdpo.opt文件中的TDPO选项bash-3.2# cd /usr/tivoli/tsm/client/oracle/bin64bash-3.2# vi tdpo.optDSMI_ORC_CONFIG /usr/tivoli/tsm/client/oracle/bin64/dsm.optDSMI_LOG /usr/tivoli/tsm/client/oracle/bin64TDPO_FS db01_oraTDPO_NODE db01_oracleTDPO_OWNER oracle TDPO_PSWDPATH /usr/tivoli/tsm/client/oracle/bin64TDPO_DATE_FMT 1TDPO_NUM_FMT 1TDPO_TIME_FMT 14、将TDPO节点注册到TSM服务器register node db01_oracle password maxnummp=2 passexp=0 backdelete=yes5、在dsm.opt和dsm.sys文件中定义TSM选项5.1、配置dsm.optbash-3.2# cd /usr/tivoli/tsm/client/oracle/bin64bash-3.2# vi dsm.optSErvername tsmserver注意:此文件必须位于tdpo.opt中的dsmi_orc_config指定的目录中。5.2、配置dsm.sysbash-3.2# cd /usr/tivoli/tsm/client/api/bin64bash-3.2# vi dsm.sysSErvername tsmserver COMMMethod TCPip TCPPort 1500 TCPServeraddress 6 NODEname db01_oracle PASSWORDAccess prompt6、修改TSM API和TDPO目录的权限bash-3.2# chmod -R 777 /usr/tivoli/tsm/client/api/bin64/bash-3.2# chmod -R 777 /usr/tivoli/tsm/client/oracle/bin64/6、配置TSM服务器6.1、定义策略域tsm: TSMSERVERdefine domain oradomainANR1500I Policy domain ORADOMAIN defined.6.2、定义策略tsm: TSMSERVERdefine pol oradomain orapolANR1510I Policy set ORAPOL defined in policy domain ORADOMAIN.6.3、定义管理类tsm: TSMSERVERdefine mgmt oradomain orapol oramgmtANR1520I Management class ORAMGMT defined in policy domain ORADOMAIN, set ORAPOL.6.4、指派缺省管理类tsm: TSMSERVERassign defmgmt oradomain orapol oramgmtANR1538I Default management class set to ORAMGMT for policy domain ORADOMAIN, set ORAPOL.6.5、定义存储池tsm: TSMSERVERdefine stgpool orapool diskANR2200I Storage pool ORAPOOL defined (device class DISK).6.6、定义存储池卷tsm: TSMSERVERdefine volume orapool /tsm1/ora.dsm formatsize=512 wait=yesANR0984I Process 9 for DEFINE VOLUME started in the FOREGROUND at 12:19:20.ANR2206I Volume /tsm1/ora.dsm defined in storage pool ORAPOOL (device class DISK).ANR0986I Process 9 for DEFINE VOLUME running in the FOREGROUND processed 1 items for a total of 536,870,912 bytes with a completion state of SUCCESS at 12:19:26.6.7、定义存储池空间触发器tsm: TSMSERVERdefine spacetrigger stg stgpool=orapool spaceexpansion=50 expansionprefix=/tsm1/ANR4485I A storage pool space trigger has been defined and enabled for storage pool ORAPOOL.6.8、定义副本组tsm: TSMSERVERdefine copy oradomain orapol oramgmt dest=orapool verdeleted=0 retonly=0Session established with server TSMSERVER: AIX-RS/6000 Server Version 5, Release 5, Level 4.0 Server date/time: 09/03/10 12:58:21 Last access: 09/03/10 12:14:15ANR1530I Backup copy group STANDARD defined in policy domain ORADOMAIN, set ORAPOL, management class ORAMGMT.6.9、激活备份策略ANR1554W DEFAULT Management class ORAMGMT in policy set ORADOMAIN ORAPOL does not have an ARCHIVE copygroup: files will not bearchived by default if this set is activated.Do you wish to proceed? (Yes (Y)/No (N) yANR1554W DEFAULT Management class ORAMGMT in policy set ORADOMAIN ORAPOL does not have an ARCHIVE copygroup: files will not bearchived by default if this set is activated.ANR1514I Policy set ORAPOL activated in policy domain ORADOMAIN.6.10、更新客户端节点信息tsm: TSMSERVERupdate node db01_oracle domain=oradomainANR2063I Node DB01_ORACLE updated.注:将节点db01_oracle的策略域改为oradomain.7、修改TDPO节点密码bash-3.2# cd /usr/tivoli/tsm/client/oracle/bin64/bash-3.2# tdpoconf password8、查看TDOP配置信息bash-3.2# cd /usr/tivoli/tsm/client/oracle/bin64/bash-3.2# tdpoconf Showenvironment9、将数据库改为归档模式10、测试TDPO与Oracle数据库的连接db01:/home/oracle$sbttest testThe sbt function pointers are loaded from libobk.a(shr.o) library.- sbtinit succeededReturn code -1 from sbtinit, bsercoer = 0, bsercerrno = 0Message 0 not found; product=RDBMS; facility=SBT如图:显示如上,表示测试成功,如果不成功,有可能是TDPO目录或TSM API目录权限设置不对或者tdpo.opt文件配置错误。10、备份数据库10.1、备份数据文件通过RMAN执行备份数据文件脚本,过程如下:db01:/home/oracle$rmanRecovery Manager: Release .0 - Production on Sat Sep 4 06:46:33 2010Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.RMAN connect targetconnected to target database: ZGWANG (DBID=747272013)MAN run2 3 allocate channel t1 type sbt_tape parms4 ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);5 backup6 filesperset 57 format df_%t_%s_%p8 (database);9 allocated channel: t1channel t1: SID=237 instance=zgwang1 device type=SBT_TAPEchannel t1: Data Protection for Oracle: version Starting backup at 04-SEP-10channel t1: starting full datafile backup setchannel t1: specifying datafile(s) in backup setinput datafile file number=00002 name=+ZGWANG/zgwang/sysaux02.dbfinput datafile file number=00001 name=+ZGWANG/zgwang/system01.dbfinput datafile file number=00003 name=+ZGWANG/zgwang/undotbs103.dbfinput datafile file number=00005 name=+ZGWANG/zgwang/undotbs205.dbfinput datafile file number=00004 name=+ZGWANG/zgwang/users04.dbfchannel t1: starting piece 1 at 04-SEP-10channel t1: finished piece 1 at 04-SEP-10piece handle=df_728809085_4_1 tag=TAG20100904T065805 comment=API Version 2.0,MMS Version channel t1: backup set complete, elapsed time: 00:05:07channel t1: starting full datafile backup setchannel t1: specifying datafile(s) in backup setincluding current control file in backup setincluding current SPFILE in backup setchannel t1: starting piece 1 at 04-SEP-10channel t1: finished piece 1 at 04-SEP-10piece handle=df_728809393_5_1 tag=TAG20100904T065805 comment=API Version 2.0,MMS Version channel t1: backup set complete, elapsed time: 00:02:23Finished backup at 04-SEP-10released channel: t1如下图:10.2、全备数据库(包括spfile文件、数据文件、控制文件、归档日志文件)脚本如下:# Backup Database Fullrman target / EOF_RMANrunallocate channel t1 type sbt_tape parms ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);allocate channel t2 type sbt_tape parms ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);allocate channel t3 type sbt_tape parms ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);allocate channel t4 type sbt_tape parms ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);allocate channel t5 type sbt_tape parms ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);allocate channel t6 type sbt_tape parms ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);backup full tag dbfull format dbfull_%t_%s_%p diskratio=0 database include current controlfile;sql alter system archive log current;backup format arch%t_%s_%p diskratio=0 archivelog all delete input;release channel t1;release channel t2;release channel t3;release channel t4;release channel t5;release channel t6;EOF_RMAN# Delete Old Backupsrman EOF_RMANconnect target;allocate channel for maintenance type sbt_tape parms ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);crosscheck backup;crosscheck archivelog all;report obsolete;delete noprompt obsolete recovery window of 90 days;delete noprompt expired backup;release channel;EOF_RMAN10.3、增量备份数据库(包括spfile文件、数据文件、控制文件、归档日志文件)脚本如下:# Backup Database Fullrman target / EOF_RMANrunallocate channel t1 type sbt_tape parms ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);allocate channel t2 type sbt_tape parms ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);allocate channel t3 type sbt_tape parms ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);allocate channel t4 type sbt_tape parms ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);allocate channel t5 type sbt_tape parms ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);allocate channel t6 type sbt_tape parms ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);backup incremental level 1 tag dbincr format %d_full_%s_%p filesperset 5 diskratio=0 database include current controlfile;sql alter system archive log current;backup format arch%t_%s_%p diskratio=0 archivelog all delete input;release channel t1;release channel t2;release channel t3;release channel t4;release channel t5;release channel t6;EOF_RMAN# Delete Old Backupsrman list backup;List of Backup Sets=BS Key Type LV Size Device Type Elapsed Time Completion Time- - - - - - -3 Full 1.23G SBT_TAPE 00:05:03 04-SEP-10 BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20100904T065805 Handle: df_728809085_4_1 Media: 26 List of Datafiles in backup set 3 File LV Type Ckp SCN Ckp Time Name - - - - - - 1 Full 3529647 04-SEP-10 +ZGWANG/zgwang/system01.dbf 2 Full 3529647 04-SEP-10 +ZGWANG/zgwang/sysaux02.dbf 3 Full 3529647 04-SEP-10 +ZGWANG/zgwang/undotbs103.dbf 4 Full 3529647 04-SEP-10 +ZGWANG/zgwang/users04.dbf 5 Full 3529647 04-SEP-10 +ZGWANG/zgwang/undotbs205.dbfBS Key Type LV Size Device Type Elapsed Time Completion Time- - - - - - -4 Full 13.75M SBT_TAPE 00:02:17 04-SEP-10 BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20100904T065805 Handle: df_728809393_5_1 Media: 26 SPFILE Included: Modification time: 04-SEP-10 SPFILE db_unique_name: ZGWANG Control File Included: Ckp SCN: 3531130 Ckp time: 04-SEP-10如下图:12、恢复数据库12.1、恢复单个控制文件注:此恢复与备份无关,完全是测试Oracle自身的多文件备份功能。以下为测试步骤12.1.1、模拟单个控制文件丢失:bash-3.2# su - griddb01:/home/grid$lsoradiag_griddb01:/home/grid$asmcmdASMCMD lsDATA/ZGWANG/ASMCMD cd zgwang/zgwangASMCMD lsARCHIVELOG/CONTROLFILE/DATAFILE/ONLINELOG/TEMPFILE/UNDOTBS205.dbfarchive/control01.ctlcontrol02.ctlredo01.logredo02.logredo03.logredo04.logspfilezgwang.orasysaux02.dbfsystem01.dbftemp01.dbfundotbs103.dbfusers04.dbfASMCMD cp control01.ctl archive/copying +zgwang/zgwang/control01.ctl - +zgwang/zgwang/archive/control01.ctlASMCMD lsARCHIVELOG/CONTROLFILE/DATAFILE/ONLINELOG/TEMPFILE/UNDOTBS205.dbfarchive/control01.ctlcontrol02.ctlredo01.logredo02.logredo03.logredo04.logspfilezgwang.orasysaux02.dbfsystem01.dbftemp01.dbfundotbs103.dbfusers04.dbfASMCMD rm control01.ctlASMCMD lsARCHIVELOG/CONTROLFILE/DATAFILE/ONLINELOG/TEMPFILE/UNDOTBS205.dbfarchive/control02.ctlredo01.logredo02.logredo03.logredo04.logspfilezgwang.orasysaux02.dbfsystem01.dbftemp01.dbfundotbs103.dbfusers04.dbfASMCMD exit12.1.2、试图启动Oracle数据库db01:/home/oracle$sqlplus /as sysdbaSQL*Plus: Release .0 Production on Tue Sep 7 15:25:38 2010Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to an idle instance.SQL startupORACLE instance started.Total System Global Area 3.7814E+10 bytesFixed Size 2214712 bytesVariable Size 1.8119E+10 bytesDatabase Buffers 1.9596E+10 bytesRedo Buffers 96641024 bytesORA-00205: error in identifying control file, check alert log for more infoSQL exitDisconnected from Oracle Database 11g Enterprise Edition Release .0 - 64bit ProductionWith the Partitioning, Real Application Clusters, OLAP, Data Miningand Real Application Testing options12.1.3、恢复单个控制文件db01:/home/grid$asmcmdASMCMD cd zgwang/zgwangASMCMD lsARCHIVELOG/CONTROLFILE/DATAFILE/ONLINELOG/TEMPFILE/UNDOTBS205.dbfarchive/control02.ctlredo01.logredo02.logredo03.logredo04.logspfilezgwang.orasysaux02.dbfsystem01.dbftemp01.dbfundotbs103.dbfusers04.dbfASMCMD cp control02.ctl control01.ctlcopying +zgwang/zgwang/control02.ctl - +zgwang/zgwang/control01.ctlASMCMD exit12.1.4、重新启动Oracle数据库bash-3.2# su - oracledb01:/home/oracle$sqlplus /as sysdbaSQL*Plus: Release .0 Production on Tue Sep 7 15:26:36 2010Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release .0 - 64bit ProductionWith the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,Data Mining and Real Application Testing optionsSQL startupORA-01081: cannot start already-running ORACLE - shut it down firstSQL shutdown immediateORA-01507: database not mountedORACLE instance shut down.SQL startupORACLE instance started.Total System Global Area 3.7814E+10 bytesFixed Size 2214712 bytesVariable Size 1.8119E+10 bytesDatabase Buffers 1.9596E+10 bytesRedo Buffers 96641024 bytesDatabase mounted.Database opened.SQL exitDisconnected from Oracle Database 11g Enterprise Edition Release .0 - 64bit ProductionWith the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,Data Mining and Real Application Testing options12.2、恢复spfile文件注:此功能与备份无关,只是测试通过pfile文件重建spfile文件的功能。12.2.1、模拟spfile文件丢失db01:/home/grid$asmcmdASMCMD cd zgwang/zgwangASMCMD lsARCHIVELOG/CONTROLFILE/DATAFILE/ONLINELOG/TEMPFILE/UNDOTBS205.dbfarchive/control01.ctlcontrol02.ctlredo01.logredo02.logredo03.logredo04.logspfilezgwang.orasysaux02.dbfsystem01.dbftemp01.dbfundotbs103.dbfusers04.dbfASMCMD cp spfilezgwang.ora archive/copying +zgwang/zgwang/spfilezgwang.ora - +zgwang/zgwang/archive/spfilezgwang.oraASMCMD lsARCHIVELOG/CONTROLFILE/DATAFILE/ONLINELOG/TEMPFILE/UNDOTBS205.dbfarchive/control01.ctlcontrol02.ctlredo01.logredo02.logredo03.logredo04.logspfilezgwang.orasysaux02.dbfsystem01.dbftemp01.dbfundotbs103.dbfusers04.dbfASMCMD rm spfilezgwang.oraASMCMD lsARCHIVELOG/CONTROLFILE/DATAFILE/ONLINELOG/TEMPFILE/UNDOTBS205.dbfarchive/control01.ctlcontrol02.ctlredo01.logredo02.logredo03.logredo04.logsysaux02.dbfsystem01.dbftemp01.dbfundotbs103.dbfusers04.dbfASMCMD exit12.2.2、试图启动Oracle数据库db01:/home/oracle$sqlplus /as sysdbaSQL*Plus: Release .0 Production on Tue Sep 7 15:13:37 2010Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release .0 - 64bit ProductionWith the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,Data Mining and Real Application Testing optionsSQL shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL startupORA-01078: failure in processing system parametersORA-01565: error in identifying file +ZGWANG/zgwang/spfilezgwang.oraORA-17503: ksfdopn:2 Failed to open file +ZGWANG/zgwang/spfilezgwang.oraORA-15056: additional error messageORA-17503: ksfdopn:DGOpenFile05 Failed to open file +ZGWANG/zgwang/spfilezgwang.oraORA-17503: ksfdopn:2 Failed to open file +ZGWANG/zgwang/spfilezgwang.oraORA-15173: entry spfilezgwang.ora does not exist in directory zgwangORA-06512: at line 412.2.3、重建spfile文件SQL create spfile=+ZGWANG/zgwang/spfilezgwang.ora from pfile=/data/app/oracle/admin/zgwang/scripts/init.ora;File created.12.2.4、启动Oracle数据库SQL startupORACLE instance started.Total System Global Area 3.7814E+10 bytesFixed Size 2214712 bytesVariable Size 1.8119E+10 bytesDatabase Buffers 1.9596E+10 bytesRedo Buffers 96641024 bytesDatabase mounted.Database opened.12.3、恢复users.dbf文件12.3.1、模拟users*.dbf文件丢失db01:/home/grid$asmcmdlsASMCMD DATA/ZGWANG/ASMCMD cd zgwang/zgwangASMCMD lsARCHIVELOG/CONTROLFILE/DATAFILE/ONLINELOG/TEMPFILE/UNDOTBS205.dbfarchive/control01.ctlcontrol02.ctlredo01.logredo02.logredo03.logredo04.logspfilezgwang.orasysaux02.dbfsystem01.dbftemp01.dbfundotbs103.dbfusers04.dbfASMCMD rm users04.dbfASMCMD lsARCHIVELOG/CONTROLFILE/DATAFILE/ONLINELOG/TEMPFILE/UNDOTBS205.dbfarchive/control01.ctlcontrol02.ctlredo01.logredo02.logredo03.l
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026国网北京市电力公司高校毕业生提前批招聘(约450人)笔试备考题库浓缩500题含答案详解(预热题)
- 2026秋季国家管网集团油气调控中心高校毕业生招聘14人笔试参考题库(浓缩500题)含答案详解(达标题)
- 2026国网四川省电力公司高校毕业生提前批招聘笔试参考题库浓缩500题含答案详解(满分必刷)
- 2026秋季国家管网集团共享运营分公司高校毕业生招聘笔试参考题库(浓缩500题)及参考答案详解(培优b卷)
- 2026秋季国家管网集团广西公司高校毕业生招聘考试参考试题(浓缩500题)附答案详解(典型题)
- 2026秋季国家管网集团云南公司高校毕业生招聘笔试备考试题(浓缩500题)及一套参考答案详解
- 2026年漯河市农村信用社联合社秋季校园招聘笔试备考题库(浓缩500题)含答案详解(新)
- 2026秋季国家管网集团西部管道公司高校毕业生招聘考试参考题库(浓缩500题)附答案详解(典型题)
- 2025国网山西高校毕业生提前批招聘(约450人)笔试模拟试题浓缩500题及1套完整答案详解
- 2026国网黑龙江省电力公司高校毕业生提前批招聘笔试参考题库浓缩500题含答案详解(达标题)
- 肺癌心包积液的护理查房
- 广东省幼儿园课程建设指导纲要(试行)2025
- 2025年上海美术馆公开招聘考试参考题库及答案解析
- 2025年音乐教师招聘考试音乐教育心理学实验操作试题
- 索尼微单相机A7 II(ILCE-7M2)使用说明书
- 土地租赁合同范本模板6篇
- 博弈论在多波次防空杀伤链算法设计中的应用
- LNG安全消防培训课件
- 2025新外研社版七年级上英语单词默写单(开学版)
- 煤矿液压支架工培训课件
- 2025年创业指导服务行业研究报告及未来行业发展趋势预测
评论
0/150
提交评论