NBU+Oracle+AIX安装配置手册副本.docx
《NBU+Oracle+AIX安装配置手册副本.docx》由会员分享,可在线阅读,更多相关《NBU+Oracle+AIX安装配置手册副本.docx(35页珍藏版)》请在冰豆网上搜索。
NBU+Oracle+AIX安装配置手册副本
NBU7.0OracleforAIX
安
装
配
置
手
册
一、NBU7.0AIX客户端安装配置
1、先设置客户端的hosts文件,包括备份服务器的hosts也要对应双向解析。
#[root@p550b:
/]#more/etc/hosts
127.0.0.1loopbacklocalhost#loopback(lo0)name/address
10.10.10.1p550a_boot1p550a
20.20.20.1p550a_boot2
172.16.1.7p550a_per
10.10.10.2p550b_boot1p550b
20.20.20.2p550b_boot2
172.16.1.8p550b_per
172.16.1.9ora_svr
=====NBUbackupserver=====
172.16.1.242hpdl380-backup
2、#放入NBU7.0ForAIX光盘,在系统挂载安装盘
[root@p550a:
/dev]#mount-vcdrfs-oro/dev/cd0/mnt
挂载ISO镜像
#loopmount-i/tmp/nbu/NB_7.0_AIX64.ISO-m/mnt-o"-Vcdrfs-oro"
3、执行安装,并选择2客户端安装,提示选择Y继续
[root@p550a:
/mnt]#./install
然后根据提示输入备份服务器的名称hpdl380-backup(一定要为备份服务器名,不建议用IP),提示选择Y继续
选择后则开始安装软件如下:
安装结束后选择3退出
4、修改客户端NBU配置参数
[root@p550b:
/usr/openv/netbackup]#vibp.conf
修改双机HACMP系统一台P550的/usr/openv/netbackup/bp.conf配置文件信息
SERVER=hpdl380-backup
CLIENT_NAME=p550a
改为
SERVER=hpdl380-backup
CLIENT_NAME=ora_svr
REQUIRED_INTERFACE=ora_svr
5、修改客户端oracle数据库为归档模式
[root@p550b:
/usr/openv/netbackup]#su-oracle
[oracle@p550b:
/home/oracle]$sqlplus"/assysdba"
SQL*Plus:
Release10.2.0.4.0-ProductiononFriFeb2515:
48:
482011
Copyright(c)1982,2007,Oracle.AllRightsReserved.
Connectedto:
OracleDatabase10gEnterpriseEditionRelease10.2.0.4.0-64bitProduction
WiththePartitioning,OLAP,DataMiningandRealApplicationTestingoptions
SQL>archiveloglist;
DatabaselogmodeArchiveMode
AutomaticarchivalEnabled
Archivedestination/oracle/product/10.2.0/dbs/arch
Oldestonlinelogsequence255
Nextlogsequencetoarchive257
Currentlogsequence257
SQL>shutdownimmediate
Databaseclosed.
Databasedismounted.
ORACLEinstanceshutdown.
SQL>startupmount;
ORACLEinstancestarted.
TotalSystemGlobalArea1610612736bytes
FixedSize2084400bytes
VariableSize436208080bytes
DatabaseBuffers1157627904bytes
RedoBuffers14692352bytes
Databasemounted.
SQL>alterdatabasearchivelog;
Databasealtered.
SQL>altersystemsetlog_archive_dest_1='location=/archlog'scope=spfile;
Systemaltered.
SQL>shutdownimmediate
Databaseclosed.
Databasedismounted.
ORACLEinstanceshutdown.
SQL>startup
ORACLEinstancestarted.
TotalSystemGlobalArea1610612736bytes
FixedSize2084400bytes
VariableSize436208080bytes
DatabaseBuffers1157627904bytes
RedoBuffers14692352bytes
Databasemounted.
Databaseopened.
SQL>archiveloglist;
DatabaselogmodeArchiveMode
AutomaticarchivalEnabled
Archivedestination/archlog
Oldestonlinelogsequence255
Nextlogsequencetoarchive257
Currentlogsequence257
SQL>createpfilefromspfile;
Filecreated.
至此oracle数据库归档开启完成;
6、oracle用户执行备份软件NBU和oracle数据库连接库程序oracle_link
[root@p550b:
/]#su-oracle
[oracle@p550b:
/home/oracle]$cd/usr/openv/netbackup/bin
[oracle@p550b:
/usr/openv/netbackup/bin]$./oracle_link
提示选择Y继续
至此NBU的oracle数据库客户端安装完成;
二、NBU7.0AIX客户端脚本配置
1、先创建相关目录和文件
[root@p550b:
/]#cd/usr/openv
[root@p550b:
/usr/openv]#mkdircontrolfile
[root@p550b:
/usr/openv]#mkdirorascripts
[root@p550b:
/usr/openv]#cdcontrolfile
[root@p550b:
/usr/openv/controlfile]#touchcontrol.ora
[root@p550b:
/usr/openv/controlfile]#cd..
[root@p550b:
/usr/openv]#cdorascripts
[root@p550b:
/usr/openv/orascripts]#touchaix_ora_full.sh
2、相关目录和文件赋予属主和权限
[root@p550b:
/usr/openv/orascripts]#cd..
[root@p550b:
/usr/openv]#ls-l
total72
drwxr-xr-x2rootsystem256Feb2516:
03controlfile
drwxr-xr-x5rootbin4096Feb2515:
40java
drwxr-xr-x7rootbin8192Feb2515:
37lib
drwxr-xr-x5rootsystem256Feb2515:
40logs
drwxr-xr-x2rootbin256Jan052010msg
drwxr-xr-x8rootbin4096Feb2515:
40netbackup
drwxr-xr-x2rootsystem256Feb2516:
04orascripts
-r--r--r--1rootbin5435Feb2515:
40regid.1992-.symantec,Enterprise_netbackup-7.0.0.0_1.swidtag
drwxr-xr-x2rootbin4096Jan052010resources
drwxr-xr-x2rootbin256Jan052010share
-r--r--r--1rootbin5435Jan052010swidtag.xml
drwxr-xr-x2rootbin256Feb2515:
43tmp
drwxr-xr-x5rootbin256Feb2515:
37var
[root@p550b:
/usr/openv]#chown-Roracle:
dbacontrolfile
[root@p550b:
/usr/openv]#chmod-R777controlfile
[root@p550b:
/usr/openv]#chown-Roracle:
dbaorascripts
[root@p550b:
/usr/openv]#chmod-R777orascripts
[root@p550b:
/usr/openv]#ls-l
total72
drwxrwxrwx2oracledba256Feb2516:
03controlfile
drwxr-xr-x5rootbin4096Feb2515:
40java
drwxr-xr-x7rootbin8192Feb2515:
37lib
drwxr-xr-x5rootsystem256Feb2515:
40logs
drwxr-xr-x2rootbin256Jan052010msg
drwxr-xr-x8rootbin4096Feb2515:
40netbackup
drwxrwxrwx2oracledba256Feb2516:
04orascripts
-r--r--r--1rootbin5435Feb2515:
40regid.1992-.symantec,Enterprise_netbackup-7.0.0.0_1.swidtag
drwxr-xr-x2rootbin4096Jan052010resources
drwxr-xr-x2rootbin256Jan052010share
-r--r--r--1rootbin5435Jan052010swidtag.xml
drwxr-xr-x2rootbin256Feb2515:
43tmp
drwxr-xr-x5rootbin256Feb2515:
37var
3、编辑NBU备份数据库的Rman脚本aix_ora_full.sh
[root@p550b:
/usr/openv/orascripts]#viaix_ora_full.sh
粘贴如下内容(完全备份oracle数据库和归档日志,并删除备份好的归档日志,注意修改实例名oracle_sid和oracle_home和实际环境一致)
=================================================================
#!
/bin/sh
#$Header:
hot_database_backup.sh,v1.92002/02/0616:
48:
56lstrubStab$
#
#bcpyrght
#***************************************************************************
#*$VRTScprght:
Copyright1993-2002VERITASSoftwareCorporation,AllRightsReserved$*
#***************************************************************************
#ecpyrght
#
#---------------------------------------------------------------------------
#hot_database_backup.sh
#---------------------------------------------------------------------------
#ThisscriptusesRecoveryManagertotakeahot(inconsistent)database
#backup.Ahotbackupisinconsistentbecauseportionsofthedatabaseare
#beingmodifiedandwrittentothediskwhilethebackupisprogressing.
#YoumustrunyourdatabaseinARCHIVELOGmodetomakehotbackups.Itis
#assumedthatthisscriptwillbeexecutedbyuserroot.InorderforRMAN
#toworkproperlyweswitchuser(su-)totheoracledbaaccountbefore
#execution.IfthisscriptrunsunderauseraccountthathasOracledba
#privilege,itwillbeexecutedusingthisuser'saccount.
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
#Determinetheuserwhichisexecutingthisscript.
#---------------------------------------------------------------------------
CUSER=`id|cut-d"("-f2|cut-d")"-f1`
#---------------------------------------------------------------------------
#Putoutputin.out.Changeasdesired.
#Note:
outputdirectoryrequireswritepermission.
#---------------------------------------------------------------------------
RMAN_LOG_FILE=${0}.`date+%Y%m%d%H%M%S`.out
#---------------------------------------------------------------------------
#Youmaywanttodeletetheoutputfilesothatbackupinformationdoes
#notaccumulate.Ifnot,deletethefollowinglines.
#---------------------------------------------------------------------------
if[-f"$RMAN_LOG_FILE"]
then
rm-f"$RMAN_LOG_FILE"
fi
#-----------------------------------------------------------------
#Initializethelogfile.
#-----------------------------------------------------------------
echo>>$RMAN_LOG_FILE
chmod666$RMAN_LOG_FILE
#---------------------------------------------------------------------------
#Logthestartofthisscript.
#---------------------------------------------------------------------------
echoScript$0>>$RMAN_LOG_FILE
echo====startedon`date`====>>$RMAN_LOG_FILE
echo>>$RMAN_LOG_FILE
#---------------------------------------------------------------------------
#Replace/db/oracle/product/ora81,below,withtheOraclehomepath.
#---------------------------------------------------------------------------
ORACLE_HOME=/oracle/product/10.2.0
exportORACLE_HOME
#---------------------------------------------------------------------------
#Replaceora81,below,withtheOracleSIDofthetargetdatabase.
#---------------------------------------------------------------------------
ORACLE_SID=orclyw
exportORACLE_SID
#---------------------------------------------------------------------------
#Replaceora81,below,withtheOracleDBAuserid(account).
#---------------------------------------------------------------------------
ORACLE_USER=oracle
#---------------------------------------------------------------------------
#Setthetargetconnectstring.
#Replace"sys/manager",below,withthetargetconnectstring.
#---------------------------------------------------------------------------
TARGET_CONNECT_STR=/
#---------------------------------------------------------------------------
#SettheOracleRecoveryManagername.
#---------------------------------------------------------------------------
RMAN=$ORACLE_HOME/bin/rman
#---------------------------------------------------------------------------
#Printoutthevalueofthevariablessetbythisscript.
#---------------------------------------------------------------------------
echo>>$RMAN_LOG_FILE
echo"RMAN:
$RMAN">>$RMAN_LOG_FILE
echo"ORACLE_SID:
$ORACLE_SID">>$RMAN_LOG_FILE
echo"ORACLE_USER:
$ORACLE_USER">>$RMAN_LOG_FILE
echo"ORACLE_HOME:
$ORACLE_HOME">>$RMAN_LOG_FILE
#---------------------------------------------------------------------------
#Printoutthevalueofthevariablessetbybphdb.
#---------------------------------------------------------------------------
echo>>$RMAN_LOG_FILE
echo"NB_ORA_FULL:
$N