原创TSM55备份和恢复Oracle 11gR2.docx
- 文档编号:4376582
- 上传时间:2022-12-01
- 格式:DOCX
- 页数:33
- 大小:183.86KB
原创TSM55备份和恢复Oracle 11gR2.docx
《原创TSM55备份和恢复Oracle 11gR2.docx》由会员分享,可在线阅读,更多相关《原创TSM55备份和恢复Oracle 11gR2.docx(33页珍藏版)》请在冰豆网上搜索。
原创TSM55备份和恢复Oracle11gR2
TSM5.5备份和恢复Oracle11gR2
IBMTivoliStorageManagerforDatabasesDataProtectionforOracle,以下简称:
TDPO
1、安装TDPO
1.1、软件选择
tivoli.tsm.client.api.32bit
tivoli.tsm.client.api.64bit
tivoli.tsm.client.oracle.aix.64bit
tivoli.tsm.client.oracle.tools.aix.64bit
tivoli.tsm.loc.client.oracle.aix.64bit.ela
1.2、软件安装
1.2.1、将所有需要安装的文件集上传到服务器上,假设上传到/tmp/soft/tsm/oracle目录。
1.2.2、进入软件集目录,然后执行安装命令:
bash-3.2#cd/tmp/soft/tsm/oracle
bash-3.2#smittyinstall
—InstallandUpdateSoftware
——InstallandUpdatefromALLAvailableSoftware
在*INPUTdevice/directoryforsoftware中输入./
SOFTWAREtoinstall中输入all
ACCEPTnewlicenseagreements?
选项中no改为yes
然后按回车键安装,再按回车键确认后,软件安装完成。
2、将RMAN与TDPO重新链接
a、设置OracleLD_LIBRARY_PATH选项
修改.proflie文件,将$ORACLE_HOME/lib放在LD_LIBRARY_PATH选项第一位,即:
LD_LIBRARY_PATH=$ORACLE_HOME/lib
b、关闭使用$ORACLE_HOME的所有Oracle实例
c、转至$ORACLE_HOME目录
d、将库文件符号连接到libobk.a
ln-s/usr/lib/libobk64.a$ORACLE_HOME/lib/libobk.a
3、定义tdpo.opt文件中的TDPO选项
bash-3.2#cd/usr/tivoli/tsm/client/oracle/bin64
bash-3.2#vitdpo.opt
DSMI_ORC_CONFIG/usr/tivoli/tsm/client/oracle/bin64/dsm.opt
DSMI_LOG/usr/tivoli/tsm/client/oracle/bin64
TDPO_FSdb01_ora
TDPO_NODEdb01_oracle
TDPO_OWNERoracle
TDPO_PSWDPATH/usr/tivoli/tsm/client/oracle/bin64
TDPO_DATE_FMT1
TDPO_NUM_FMT1
TDPO_TIME_FMT1
4、将TDPO节点注册到TSM服务器
registernodedb01_oraclepasswordmaxnummp=2passexp=0backdelete=yes
5、在dsm.opt和dsm.sys文件中定义TSM选项
5.1、配置dsm.opt
bash-3.2#cd/usr/tivoli/tsm/client/oracle/bin64
bash-3.2#vidsm.opt
SErvernametsmserver
注意:
此文件必须位于tdpo.opt中的dsmi_orc_config指定的目录中。
5.2、配置dsm.sys
bash-3.2#cd/usr/tivoli/tsm/client/api/bin64
bash-3.2#vidsm.sys
SErvernametsmserver
COMMMethodTCPip
TCPPort1500
TCPServeraddress192.168.2.16
NODEnamedb01_oracle
PASSWORDAccessprompt
6、修改TSMAPI和TDPO目录的权限
bash-3.2#chmod-R777/usr/tivoli/tsm/client/api/bin64/
bash-3.2#chmod-R777/usr/tivoli/tsm/client/oracle/bin64/
6、配置TSM服务器
6.1、定义策略域
tsm:
TSMSERVER>definedomainoradomain
ANR1500IPolicydomainORADOMAINdefined.
6.2、定义策略
tsm:
TSMSERVER>definepoloradomainorapol
ANR1510IPolicysetORAPOLdefinedinpolicydomainORADOMAIN.
6.3、定义管理类
tsm:
TSMSERVER>definemgmtoradomainorapoloramgmt
ANR1520IManagementclassORAMGMTdefinedinpolicydomainORADOMAIN,setORAPOL.
6.4、指派缺省管理类
tsm:
TSMSERVER>assigndefmgmtoradomainorapoloramgmt
ANR1538IDefaultmanagementclasssettoORAMGMTforpolicydomainORADOMAIN,setORAPOL.
6.5、定义存储池
tsm:
TSMSERVER>definestgpoolorapooldisk
ANR2200IStoragepoolORAPOOLdefined(deviceclassDISK).
6.6、定义存储池卷
tsm:
TSMSERVER>definevolumeorapool/tsm1/ora.dsmformatsize=512wait=yes
ANR0984IProcess9forDEFINEVOLUMEstartedintheFOREGROUNDat12:
19:
20.
ANR2206IVolume/tsm1/ora.dsmdefinedinstoragepoolORAPOOL(deviceclassDISK).
ANR0986IProcess9forDEFINEVOLUMErunningintheFOREGROUNDprocessed1itemsforatotalof536,870,912byteswitha
completionstateofSUCCESSat12:
19:
26.
6.7、定义存储池空间触发器
tsm:
TSMSERVER>definespacetriggerstgstgpool=orapoolspaceexpansion=50expansionprefix=/tsm1/
ANR4485IAstoragepoolspacetriggerhasbeendefinedandenabledforstoragepoolORAPOOL.
6.8、定义副本组
tsm:
TSMSERVER>definecopyoradomainorapoloramgmtdest=orapoolverdeleted=0retonly=0
SessionestablishedwithserverTSMSERVER:
AIX-RS/6000
ServerVersion5,Release5,Level4.0
Serverdate/time:
09/03/1012:
58:
21Lastaccess:
09/03/1012:
14:
15
ANR1530IBackupcopygroupSTANDARDdefinedinpolicydomainORADOMAIN,setORAPOL,managementclassORAMGMT.
6.9、激活备份策略
ANR1554WDEFAULTManagementclassORAMGMTinpolicysetORADOMAINORAPOLdoesnothaveanARCHIVEcopygroup:
fileswill
notbe
archivedbydefaultifthissetisactivated.
Doyouwishtoproceed?
(Yes(Y)/No(N))y
ANR1554WDEFAULTManagementclassORAMGMTinpolicysetORADOMAINORAPOLdoesnothaveanARCHIVEcopygroup:
fileswill
notbe
archivedbydefaultifthissetisactivated.
ANR1514IPolicysetORAPOLactivatedinpolicydomainORADOMAIN.
6.10、更新客户端节点信息
tsm:
TSMSERVER>updatenodedb01_oracledomain=oradomain
ANR2063INodeDB01_ORACLEupdated.
注:
将节点db01_oracle的策略域改为oradomain.
7、修改TDPO节点密码
bash-3.2#cd/usr/tivoli/tsm/client/oracle/bin64/
bash-3.2#tdpoconfpassword
8、查看TDOP配置信息
bash-3.2#cd/usr/tivoli/tsm/client/oracle/bin64/
bash-3.2#tdpoconfShowenvironment
9、将数据库改为归档模式
10、测试TDPO与Oracle数据库的连接
db01:
/home/oracle$sbttesttest
Thesbtfunctionpointersareloadedfromlibobk.a(shr.o)library.
--sbtinitsucceeded
Returncode-1fromsbtinit,bsercoer=0,bsercerrno=0
Message0notfound;product=RDBMS;facility=SBT
如图:
显示如上,表示测试成功,如果不成功,有可能是TDPO目录或TSMAPI目录权限设置不对或者tdpo.opt文件配置错误。
10、备份数据库
10.1、备份数据文件
通过RMAN执行备份数据文件脚本,过程如下:
db01:
/home/oracle$rman
RecoveryManager:
Release11.2.0.1.0-ProductiononSatSep406:
46:
332010
Copyright(c)1982,2009,Oracleand/oritsaffiliates.Allrightsreserved.
RMAN>connecttarget
connectedtotargetdatabase:
ZGWANG(DBID=747272013)
MAN>run
2>{
3>allocatechannelt1type'sbt_tape'parms
4>'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
5>backup
6>filesperset5
7>format'df_%t_%s_%p'
8>(database);
9>}
allocatedchannel:
t1
channelt1:
SID=237instance=zgwang1devicetype=SBT_TAPE
channelt1:
DataProtectionforOracle:
version5.4.1.0
Startingbackupat04-SEP-10
channelt1:
startingfulldatafilebackupset
channelt1:
specifyingdatafile(s)inbackupset
inputdatafilefilenumber=00002name=+ZGWANG/zgwang/sysaux02.dbf
inputdatafilefilenumber=00001name=+ZGWANG/zgwang/system01.dbf
inputdatafilefilenumber=00003name=+ZGWANG/zgwang/undotbs103.dbf
inputdatafilefilenumber=00005name=+ZGWANG/zgwang/undotbs205.dbf
inputdatafilefilenumber=00004name=+ZGWANG/zgwang/users04.dbf
channelt1:
startingpiece1at04-SEP-10
channelt1:
finishedpiece1at04-SEP-10
piecehandle=df_728809085_4_1tag=TAG20100904T065805comment=APIVersion2.0,MMSVersion5.4.1.0
channelt1:
backupsetcomplete,elapsedtime:
00:
05:
07
channelt1:
startingfulldatafilebackupset
channelt1:
specifyingdatafile(s)inbackupset
includingcurrentcontrolfileinbackupset
includingcurrentSPFILEinbackupset
channelt1:
startingpiece1at04-SEP-10
channelt1:
finishedpiece1at04-SEP-10
piecehandle=df_728809393_5_1tag=TAG20100904T065805comment=APIVersion2.0,MMSVersion5.4.1.0
channelt1:
backupsetcomplete,elapsedtime:
00:
02:
23
Finishedbackupat04-SEP-10
releasedchannel:
t1
如下图:
10.2、全备数据库
(包括spfile文件、数据文件、控制文件、归档日志文件)
脚本如下:
##BackupDatabaseFull
rmantarget/< run{ allocatechannelt1type'sbt_tape'parms'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; allocatechannelt2type'sbt_tape'parms'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; allocatechannelt3type'sbt_tape'parms'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; allocatechannelt4type'sbt_tape'parms'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; allocatechannelt5type'sbt_tape'parms'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; allocatechannelt6type'sbt_tape'parms'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; backupfulltag'dbfull'format'dbfull_%t_%s_%p'diskratio=0databaseincludecurrentcontrolfile; sql'altersystemarchivelogcurrent'; backupformat'arch%t_%s_%p'diskratio=0archivelogalldeleteinput; releasechannelt1; releasechannelt2; releasechannelt3; releasechannelt4; releasechannelt5; releasechannelt6; } EOF_RMAN ##DeleteOldBackups rman< connecttarget; allocatechannelformaintenancetype'sbt_tape'parms'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; crosscheckbackup; crosscheckarchivelogall; reportobsolete; deletenopromptobsoleterecoverywindowof90days; deletenopromptexpiredbackup; releasechannel; EOF_RMAN 10.3、增量备份数据库 (包括spfile文件、数据文件、控制文件、归档日志文件) 脚本如下: ##BackupDatabaseFull rmantarget/< run{ allocatechannelt1type'sbt_tape'parms'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; allocatechannelt2type'sbt_tape'parms'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; allocatechannelt3type'sbt_tape'parms'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; allocatechannelt4type'sbt_tape'parms'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; allocatechannelt5type'sbt_tape'parms'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; allocatechannelt6type'sbt_tape'parms'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; backupincrementallevel1tag'dbincr'format'%d_full_%s_%p'filesperset5diskratio=0databaseincludecurrentcontrolfile; sql'altersystemarchivelogcurrent'; backupformat'arch%t_%s_%p'diskratio=0archivelogalldeleteinput; releasechannelt1; releasechannelt2; releasechannelt3; releasechannelt4; releasechannelt5; releasechannelt6; } EOF_RMAN ##DeleteOldBackups rman< connecttarget; allocatechannelformaintenancetype'sbt_tape'parms'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; crosscheckbackup; crosscheckarchivelogall; reportobsolete; deletenopromptobsoleterecoverywindowof90days; deletenopromptexpiredbackup; releasechannel; EOF_RMAN 10.4、查看已备份的数据 RMAN>listbackup; ListofBackupSets =================== BSKeyTypeLVSizeDeviceTypeElapsedTimeCompletionTime ------------------------------------------------------------- 3Full1.23GSBT_TAPE00: 05: 0304-SEP-10 BPKey: 3Status: AVAILABLECompressed: NOTag: TAG20100904T065805 Handle: df_728809085_4_1Media: 26 ListofDatafilesinbackupset3
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 原创TSM55备份和恢复Oracle 11gR2 原创 TSM55 备份 恢复 Oracle 11 gR2
![提示](https://static.bdocx.com/images/bang_tan.gif)