Beruflich Dokumente
Kultur Dokumente
CommentsWritten by Yannick
TableOfContents
1.
Preamble
2.
TSM Configuration
3.
Oracle Configuration
4.
RMAN backup
5.
References
Preamble
The configuration and testing described in this document have been done on Red
Hat Enterprise Linux Server release 5.5 (Tikanga) 64 bits with Oracle 11gR2
(11.2.0.2.0) and 10gR2 (10.2.0.5.0).
First let you preferred system administrator install the product for you, you
should find it in:
[root@oracleserver.domainname /]# ll
total 20
drwxr-xr-x 4 root bin 4096 Jun 7
drwxr-xr-x 3 root bin 4096 Jun 7
drwxr-xr-x 3 root bin 4096 Jun 7
drwxr-xr-x 3 root bin 4096 Jun 7
drwxr-xr-x 5 root root 4096 Jun 7
/opt/tivoli/tsm/client
15:28
15:27
15:28
15:27
15:29
api
icc32
icc64
lang
oracle
TSM Configuration
Configuration is made of four files:
[root@oracleserver.domainname /]# cat /opt/tivoli/tsm/client/api/bin64/dsm.opt
Servername tsmserver.sgp.st.com
[root@oracleserver.domainname /]# cat /opt/tivoli/tsm/client/api/bin64/dsm.sys
SErvername tsmserver.sgp.st.com
COMMMethod
TCPip
TCPPort
1511
TCPServeraddress
tsmserver.sgp.st.com
NODENAME
oracleserver.domainname
PASSWORDACCESS PROMPT
PASSWORDDIR /opt/tivoli/tsm
SCHEDLOGNAME "/var/log/tsm/dsmsched.log"
SCHEDLOGRETENTION 3
ERRORLOGNAME "/var/log/tsm/dsmerror.log"
ERRORLOGRETENTION 5
[root@oracleserver.domainname /]# cat /opt/tivoli/tsm/client/oracle/bin64/tdpo.opt
DSMI_ORC_CONFIG
/opt/tivoli/tsm/client/oracle/bin64/dsm.opt
DSMI_LOG
/opt/tivoli/tsm/client/oracle/bin64
TDPO_FS
TDPO_NODE
TDPO_OWNER
TDPO_PSWDPATH
/adsmorc
oracleserver.domainname
root
/opt/tivoli/tsm/client/oracle/bin64
TDPO_DATE_FMT
TDPO_NUM_FMT
TDPO_TIME_FMT
1
1
1
TDPO_MGMT_CLASS_2
TDPO_MGMT_CLASS_3
TDPO_MGMT_CLASS_4
mgmtclass2
mgmtclass3
mgmtclass4
Server Information
tsmserver.sgp.st.com
tsmserver.sgp.st.com
Linux/x86_64
1511
TCP/IP
Session Information
Owner Name:
Node Name:
Node Type:
DSMI_DIR:
DSMI_ORC_CONFIG:
TDPO_OPTFILE:
Password Directory:
Compression:
License Information:
root
oracleserver.domainname
TDPO LinuxAMD64
/opt/tivoli/tsm/client/api/bin64
/opt/tivoli/tsm/client/oracle/bin64/dsm.opt
/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt
/opt/tivoli/tsm/client/oracle/bin64
FALSE
License file exists and contains valid license data.
Oracle Configuration
The Oracle configuration is quite simple, you just need to create a symbolic link
on TDPO library in all your $ORACLE_HOME/lib directory:
[oracleg@oracleserver.domainname ~]$ ln -s /opt/tivoli/tsm/client/oracle/bin64/libobk.so
$ORACLE_HOME/lib
[oracle@oracleserver.domainname ~]$ ll $ORACLE_HOME/lib/libobk.so
lrwxrwxrwx 1 oraracle dba 45 Jul 13 12:00 /oracle/software/lib/libobk.so ->
/opt/tivoli/tsm/client/oracle/bin64/libobk.so
Then ensure dba Unix group (better to provide access to DBA group in case you
have multiple Oracle accounts on your server) is able to write in all log files you
defined in all TSM configuration files and be able to read tdpo.opt configuration
file.
With Unix commands it gives something like:
[root@oracleserver.domainname
[root@oracleserver.domainname
[root@oracleserver.domainname
[root@oracleserver.domainname
[root@oracleserver.domainname
/]#
/]#
/]#
/]#
/]#
All errors I personally encountered were linked to missing rights on either log
files (write permission) and read rights on configuration files. Dont be too
generous while giving those rights
And thats it ! You are done, you can test all is working with (even before starting
RMAN):
[oracle@oracleserver.domainname admin]$ sbttest test
The sbt function pointers are loaded from libobk.so library.
-- sbtinit succeeded
Return code -1 from sbtinit, bsercoer = 0, bsercerrno = 0
Message 0 not found; product=RDBMS; facility=SBT
RMAN backup
Im not entering in all options of powerful RMAN command but below simple
script will perform your first tape backup:
#!/bin/ksh
# Trapping errors ------------------------------------------------------------trap 'STATUS=$?;set +x;echo;echo error $STATUS at line nb $LINENO executing :`sed -n "${LINENO}p"
$0`;echo;exit $STATUS' ERR
# OS management --------------------------------------------------------------OSTYPE=$(uname -s)
case $OSTYPE in
"AIX" ) alias bdf="/usr/bin/df -Ik"
alias ll="/usr/bin/ls -l" ;;
"SunOS") alias bdf="/usr/bin/df -k"
alias ll="/usr/bin/ls -l"
alias awk="/usr/xpg4/bin/awk"
alias grep="/usr/xpg4/bin/grep" ;;
"Linux") alias bdf="/bin/df -k"
alias grep=egrep
alias echo="echo -e"
alias ll="ls -l" ;;
esac
# Variables ------------------------------------------------------------------JOB_NAME=$(basename $0)
TODAY=`date +'%Y%m%d_%H%M%S'`
LOG_FILE=/tmp/${JOB_NAME}_${TODAY}_$$.log
# Main Here ------------------------------------------------------------------JOB_START=`date +%s`
echo "\nStarting at `date +'%Y%m%d_%H%M%S'`\n"
rman << EOF
connect target /
connect catalog rman/rman@rmanrepository
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 9 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
CONFIGURE DEFAULT DEVICE TYPE TO sbt;
CONFIGURE CHANNEL DEVICE TYPE sbt PARMS
'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
CONFIGURE DEVICE TYPE sbt PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
run
{
allocate
allocate
allocate
allocate
channel
channel
channel
channel
sbt1
sbt2
sbt3
sbt4
type
type
type
type
sbt
sbt
sbt
sbt
parms
parms
parms
parms
'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
channel
channel
channel
channel
sbt1;
sbt2;
sbt3;
sbt4;
EOF
JOB_END=`date +%s`
echo "\nEnding at `date +'%Y%m%d_%H%M%S'`"
echo "\nCompleted in $((($JOB_END - $JOB_START)/60)) minutes"
echo "\nNormal Exit"