Professional Documents
Culture Documents
Table of Contents
SQL-BackTrack installation ............................................................................................................................ 3 Links: ............................................................................................................................................................. 3 To verify that the Environment Variables are Set Correctly: ........................................................................ 7 Schedules: ..................................................................................................................................................... 9 Exclusions during backup:-............................................................................................................................ 9 SQL Backtrack schedule when running: ........................................................................................................ 9 Query Backups ............................................................................................................................................ 10 Daily Scripts:- .............................................................................................................................................. 10 Daily Backup: ........................................................................................................................................... 10 prod_full_backup.sh Backup Script:- .................................................................................................. 13 Weekly scripts: ........................................................................................................................................ 14 prod_cold_backup.sh.......................................................................................................................... 18 nbdp_cold_backup.sh ......................................................................................................................... 18 nbep_cold_backup.sh ......................................................................................................................... 19 sylp_cold_backup.sh ........................................................................................................................... 20 caip_cold_backup.sh ........................................................................................................................... 21
SQL-BackTrack installation
If you are using a 64-bit operating system, BMC Software recommends that you install the 64-bit SQLBackTrack Module for IBM TSM. The 64-bit SQL-BackTrack Module version requires a 64-bit IBM TSM API Client, and the 32-bit SQL-BackTrack Module version requires a 32-bit IBM TSM API Client.
Links:
/usr/lib: If you are installing on Unix, you must verify that the links to the IBM TSM library exist. The library file libApiDS.x or libApiDS64.x should be linked to libApiDS.x or libApiDS64.x file (respectively) in the /usr/lib directory, as below
lrwxrwxrwx 1 bin
bin
lrwxrwxrwx 1 bin bin 45 Apr 10 00:16 libApiDS64.a -> /usr/tivoli/tsm/client/api/bin64/libApiDS64.a lrwxrwxrwx 1 bin bin 42 Apr 10 01:16 libobk.a -> /usr/tivoli/tsm/client/oracle/bin/libobk.a
DTBASE: /u01/datatools
The installation process performs the following operations: adds the obsi.adsm-3.1.00 directory for 32-bit installations and obsi.adsm-3.1.00-64bit directory for 64-bit installations where the SQL-BackTrack Module for IBM TSM software resides in the DTBASE directory adds an obsi.adsm link pointing to the obsi.adsm-3.1.00 directory or obsi.adsm-3.1.00-64bit directory in the DTBASE directory.
torpym@nrbhfin1:/u01/datatools/obacktrack-3.2.00/links> ls -ltr total 0 lrwxrwxrwx lrwxrwxrwx lrwxrwxrwx lrwxrwxrwx 1 oracle 1 oracle 1 oracle 1 oracle dba dba dba dba 22 Oct 09 2009 obsi.tape -> ../../obsi.tape-5.2.10 22 Oct 09 2009 obsi.disk -> ../../obsi.disk-5.1.30 15 Oct 09 2009 obsi.adsm -> ../../obsi.adsm 9 Oct 09 2009 mls -> ../../mls
torpym@nrbhfin1:/u01/datatools> drwxr-sr-x 13 oracle dba drwxr-sr-x 11 oracle dba drwxr-sr-x 7 oracle dba drwxr-sr-x 5 oracle dba drwxr-sr-x 4 oracle dba drwxr-sr-x 4 oracle dba drwxr-sr-x 22 oracle dba lrwxrwxrwx 1 oracle dba lrwxrwxrwx 1 oracle dba lrwxrwxrwx 1 oracle dba lrwxrwxrwx 1 oracle dba drwxr-sr-x 6 oracle dba 512 Oct 09 2009 obacktrack-3.2.00 512 Oct 09 2009 obacktrack_stat 512 Oct 09 2009 obsi.adsm-2.4.10 512 Oct 09 2009 obsi.disk-5.1.30 512 Oct 09 2009 obsi.tape-5.2.10 512 Oct 09 2009 utilities 512 Oct 09 2009 oracatalog_old 16 Oct 09 2009 obsi.tape -> obsi.tape-5.2.10 16 Oct 09 2009 obsi.disk -> obsi.disk-5.1.30 16 Oct 09 2009 obsi.adsm -> obsi.adsm-2.4.10 33 Oct 09 2009 obacktrack -> /u01/datatools/obacktrack-3.2.00/ 512 Dec 07 2009 oracatalog
This directory contains the following: the adsmpw utility for seeding or changing the password for the IBM TSM nodename, used if the PASSWORDAccess option is set to generate. the adsmrc utility for verifying the IBM TSM API client message files and accessing error codes the adsm_del utility for expiring residual SQL-BackTrack objects the obsitest utility for validating the SQL-BackTrack Module for IBM TSM configuration
SQL Backtrack executable: obacktrack -> /u01/datatools/obacktrack-3.2.00/ torpym@nrbhfin1:/u01/datatools/obsi.adsm/bin> ls -ltr total 15016 -rwxr-xr-x 1 oracle dba -rwxr-xr-x 1 oracle dba -rwxr-xr-x 1 oracle dba -rwxr-xr-x 1 oracle dba -rwxr-xr-x 1 oracle dba drwxr-sr-x 2 oracle dba -rwxr-xr-x 2 oracle dba -rw-r--r-- 1 root dba drwxr-sr-x 3 oracle dba
1470263 Jan 12 2000 adsmpw 1468508 Jan 12 2000 adsmrc 1476957 Jan 12 2000 adsm_del 9160 Jan 12 2000 unroot 1744659 Jan 12 2000 obsitest 512 Jan 12 2000 obsi 1498930 Jan 12 2000 adsm 744 Sep 14 2003 dsmerror.log 512 Oct 09 2009 tmp-control-dir
Environmental Variables Variable DTBASE Description specifies the SQL-BackTrack Module for IBM TSM installation directory specifies the TSM API client installation, the path containing dsm.sys, dsmtca, the en_US subdirectory, and any other national language support (NLS) specifies the fully qualified file name for the dsm.opt (user options) file Path /u01/datatools
DSMI_DIR DSMI_CONFIG
DSMI_LOG
specifies the directory where the dsierror.log file is created to record some of the IBM TSM error
torpym@nrbhfin1:/usr/tivoli/tsm/client/api/bin> cd /u01/datatools/obsi.adsm-2.4.10 torpym@nrbhfin1:/u01/datatools/obsi.adsm-2.4.10> cd bin torpym@nrbhfin1:/u01/datatools/obsi.adsm-2.4.10/bin> ls -ltr total 15016 -rwxr-xr-x 1 oracle dba 1470263 Jan 12 2000 adsmpw -rwxr-xr-x 1 oracle dba 1468508 Jan 12 2000 adsmrc -rwxr-xr-x 1 oracle dba 1476957 Jan 12 2000 adsm_del -rwxr-xr-x 1 oracle dba 9160 Jan 12 2000 unroot -rwxr-xr-x 1 oracle dba 1744659 Jan 12 2000 obsitest drwxr-sr-x 2 oracle dba 512 Jan 12 2000 obsi -rwxr-xr-x 2 oracle dba 1498930 Jan 12 2000 adsm -rw-r--r-- 1 root dba 744 Sep 14 2003 dsmerror.log drwxr-sr-x 3 oracle dba 512 Oct 09 2009 tmp-control-dir torpym@nrbhfin1:/u01/datatools/obsi.adsm-2.4.10/bin> adsmrc 0 0 : ANS0302I (RC0) Successfully done.
Schedules:
torpym@nrbhfin1:/u01/datatools/obsi.adsm-2.4.10/bin> ps -ef|grep dsm root 75560 1 0 May 02 servername=DPSched root 96392 1 0 Mar 20 servername=DPSched_Sun - 0:40 /usr/tivoli/tsm/client/ba/bin/dsmc schedule -
torpym 99258 138160 1 12:55:56 pts/12 0:00 grep dsm root 118154 1 0 Apr 25 - 282:13 /usr/tivoli/tsm/client/ba/bin/dsmc schedule
Exclusions during backup:torpym@nrbhfin1:/usr/tivoli/tsm/client/ba/bin> cat inclexcl.def exclude /scratch/*.log exclude /scratch/*.rep exclude /scratch/log/* exclude /u01/drawings/* exclude /u01/inbox/* exclude /u01/outbox/* exclude /u01/processed/* exclude /u01/toroap1/bad/* exclude /u01/toroap1/discard/* exclude /u01/toroap1/loaderlog/* exclude /u01/app/oracle/product/734/rdbms/audit/*
- 0:00 /u01/datatools/obacktrack/links/../../obsi.adsm-
Query Backups
torpym@nrbhfin1:/usr/tivoli/tsm/client/api/bin> dsmc -se=tsm_nabk3_ora Tivoli Storage Manager Command Line Backup/Archive Client Interface - Version 5, Release 1, Level 5.0 (C) Copyright IBM Corporation 1990, 2002 All Rights Reserved. tsm> q f Node Name: NRBHFIN1_ORA Session established with server TSM_NABK3: AIX-RS/6000 Server Version 5, Release 5, Level 3.0 Server date/time: 05/20/13 05:16:47 Last access: 05/20/13 04:40:19 Num Last Incr Date Type File Space Name --- -------------- ---- --------------1 00/00/00 00:00:00 API:BACKTRACK /BACKTRACK:tmp-control-dir 2 00/00/00 00:00:00 API:BACKTRACK /caip:oracatalog 3 00/00/00 00:00:00 API:BACKTRACK /fin:oracatalog 4 00/00/00 00:00:00 API:BACKTRACK /nbdp:oracatalog 5 00/00/00 00:00:00 API:BACKTRACK /nbep:oracatalog 6 00/00/00 00:00:00 API:BACKTRACK /prod:oracatalog 7 00/00/00 00:00:00 API:BACKTRACK /sylp:oracatalog
Scripts:
then su - oracle -c /bin/ksh /torrington/operator/daily/db_stats_prod su - oracle -c /bin/ksh /torrington/operator/daily/db_stats_nbdp su - oracle -c /bin/ksh /torrington/operator/daily/db_stats_nbep fi # -----------------------# Shrink Rollback Segments # -----------------------su - oracle -c /torrington/db_admin/shrink_rbs_prod.sh # ------------------------------------------# Hot Backup of PROD database (SQL*Backtrack) # ------------------------------------------echo PROD hot backup started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/prod_full_backup.sh status=$? echo PROD hot backup ended with return code $status `date` >> /u01/toroap1/log/logfile # ------------------------------------------# Hot Backup of NBDP database (SQL*Backtrack) # ------------------------------------------echo NBDP hot backup started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/nbdp_full_backup.sh status=$? echo NBDP hot backup ended with return code $status `date` >> /u01/toroap1/log/logfile # ------------------------------------------# Hot Backup of NBEP database (SQL*Backtrack) # ------------------------------------------echo NBEP hot backup started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/nbep_full_backup.sh status=$? echo NBEP hot backup ended with return code $status `date` >> /u01/toroap1/log/logfile # ------------------------------------------# Hot Backup of SYLP database (SQL*Backtrack) # ------------------------------------------echo SYLP hot backup started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/sylp_full_backup.sh status=$? echo SYLP hot backup ended with return code $status `date` >> /u01/toroap1/log/logfile
# ------------------------------------------# Hot Backup of CAIP database (SQL*Backtrack) # ------------------------------------------echo CAIP hot backup started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/caip_full_backup.sh status=$? echo CAIP hot backup ended with return code $status `date` >> /u01/toroap1/log/logfile # -----------------------# Export the NBDP Database # -----------------------echo NBDP full export started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/nbdp_full_export.sh status=$? echo NBDP full export completed with return code $status `date` >> /u01/toroap1/log/logfile # -----------------------# Export the NBEP Database # -----------------------echo NBEP full export started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/nbep_full_export.sh status=$? echo NBEP full export completed with return code $status `date` >> /u01/toroap1/log/logfile # -----------------------# Export the SYLP Database # -----------------------echo SYLP full export started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/sylp_full_export.sh status=$? echo SYLP full export completed with return code $status `date` >> /u01/toroap1/log/logfile # -----------------------# Export the CAIP Database # -----------------------echo CAIP full export started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/caip_full_export.sh status=$? echo CAIP full export completed with return code $status `date` >> /u01/toroap1/log/logfile # -------------------------------# Backup the SQL*Backtrack Catalog # --------------------------------
/u01/toroap1/bin/backup_SQLB.sh # ---------------------------# Backup system to tape (ADSM) # ---------------------------/torrington/operator/daily/adsm_backups_system cat /scratch/daily_backup.log | mail -s "PROD Daily Backup" murali_dontu@satyam.com #cat /scratch/daily_backup.log | mail -s "PROD Daily Backup" lewis@timken.com day_of_month=`date +%d` cp /scratch/daily_backup.log /torrington/statistics/backups/prod_backup.log$day_of_month exit 0
prod_full_backup.sh Backup Script:nrbhfin1:/torrington/db_admin===> cat prod_full_backup.sh #!/bin/sh #%DT% SQL-BackTrack <DO NOT REMOVE OR CHANGE THIS LINE> # SQL-BackTrack for Oracle - Copyright 1995-1997 # # This is a generated scrip t; call this script from cron or # from other schedulers to perform the requested operation at regular # intervals. DTBASE=/u01/datatools; export DTBASE # cd to a known directory... cd /u01/datatools /u01/datatools/obacktrack-3.2.00/bin/dtobackup /u01/datatools/oracatalog -database PROD -online full -noprompt status=$? # Be sure to exit the script with the exit status. If you add # anything to the script after the command you should be sure # to exit with the correct status. exit $status
Weekly scripts:
Weekly_backup.sh:torpym@nrbhfin1:/oracle/bin> cat weekly_backup.sh # # Weekly Database Shutdown, System Backup and Database Restart # W. Cote 1/8/2002 # ---------------------# Notify logged on users # ---------------------wall "Database shutdown in two (2) minutes......" # ---------------------------# Shutdown Concurrent Managers # ---------------------------su - applmgr -c /torrington/custom/fnd/bin/prod_stop_mgr # -----------------------# Shrink Rollback Segments # -----------------------su - oracle -c /torrington/db_admin/shrink_rbs_prod.sh #su - oracle -c /torrington/db_admin/shrink_rbs_oapp.sh # ----------------------------------# Backup PROD database (Cold Offline) # ----------------------------------echo PROD cold backup started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/prod_cold_backup.sh status=$? echo PROD cold backup completed with return code $status `date` >> /u01/toroap1/log/logfile # --------------------------------------# Keep packages pinned in the shared pool # --------------------------------------su - oracle -c sqlplus sys/f4b8cx @/torrington/db_admin/sql/keep_objects # -----------------# start the listener # ------------------
su - oracle -c lsnrctl start # ------------------------------# Restart the Concurrent Managers # ------------------------------su - applmgr -c /torrington/custom/fnd/bin/prod_start_mgr # -------------------------------# Backup the SQL*Backtrack Catalog # -------------------------------/u01/toroap1/bin/backup_SQLB.sh # --------------------------------------------------# Notify logged on users that the database is back up # --------------------------------------------------wall "Database is back up ......" # ---------------------------# Backup system to tape (ADSM) # ---------------------------/torrington/operator/daily/adsm_backups_system #/torrington/operator/daily/adsm_backups_system_full # -----------------------# Export the Prod Database # -----------------------echo PROD full export started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/prod_full_export.sh status=$? echo PROD full export completed with return code $status `date` >> /u01/toroap1/log/logfile # -------------------------------# Backup the SQL*Backtrack Catalog # -------------------------------/u01/toroap1/bin/backup_SQLB.sh cat /scratch/weekly_backup.log | mail -s "PROD Weekly Backup" murali_dontu@satyam.com day_of_month=`date +%d` cp /scratch/weekly_backup.log /torrington/statistics/backups/prod_backup.log$day_of_month exit 0
-----------------------------------------------------------------------------------------------------------Weekly_nbd_backups.sh:torpym@nrbhfin1:/oracle/bin> cat weekly_nbd_backup.sh # # Weekly Database Shutdown, System Backup and Database Restart - NBD # W. Cote 12/15/2003 # ----------------------------------# Backup NBDP database (Cold Offline) # ----------------------------------echo NBDP cold backup started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/nbdp_cold_backup.sh status=$? echo NBDP cold backup completed with return code $status `date` >> /u01/toroap1/log/logfile # ----------------------------------# Backup NBEP database (Cold Offline) # ----------------------------------echo NBEP cold backup started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/nbep_cold_backup.sh status=$? echo NBEP cold backup completed with return code $status `date` >> /u01/toroap1/log/logfile # ----------------------------------# Backup SYLP database (Cold Offline) # ----------------------------------echo SYLP cold backup started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/sylp_cold_backup.sh status=$? echo SYLP cold backup completed with return code $status `date` >> /u01/toroap1/log/logfile # ----------------------------------# Backup CAIP database (Cold Offline) # ----------------------------------echo CAIP cold backup started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/caip_cold_backup.sh status=$? echo CAIP cold backup completed with return code $status `date` >> /u01/toroap1/log/logfile # -------------------------------# Backup the SQL*Backtrack Catalog
# -------------------------------/u01/toroap1/bin/backup_SQLB.sh # -----------------------# Export the NBDP Database # -----------------------echo NBDP full export started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/nbdp_full_export.sh status=$? echo NBDP full export completed with return code $status `date` >> /u01/toroap1/log/logfile # -----------------------# Export the NBEP Database # -----------------------echo NBEP full export started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/nbep_full_export.sh status=$? echo NBEP full export completed with return code $status `date` >> /u01/toroap1/log/logfile # -----------------------# Export the SYLP Database # -----------------------echo SYLP full export started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/sylp_full_export.sh status=$? echo SYLP full export completed with return code $status `date` >> /u01/toroap1/log/logfile # -----------------------# Export the CAIP Database # -----------------------echo CAIP full export started `date` >> /u01/toroap1/log/logfile su - oracle -c /torrington/db_admin/caip_full_export.sh status=$? echo CAIP full export completed with return code $status `date` >> /u01/toroap1/log/logfile # -------------------------------# Backup the SQL*Backtrack Catalog # -------------------------------/u01/toroap1/bin/backup_SQLB.sh cat /scratch/weekly_nbd_backup.log | mail -s "PROD Weekly NBD Backup" murali_dontu@satyam.com
#!/bin/sh #%DT% SQL-BackTrack <DO NOT REMOVE OR CHANGE THIS LINE> # SQL-BackTrack for Oracle - Copyright (c) 1995-1997 # # This is a generated script; call this script from cron or # from other schedulers to perform the requested operation at regular # intervals. # The parameter 'shutdown' directs the program to issue # a sqldba 'shutdown' command before beginning the operation. # Note that the database will be restored to its original state # after the operation is completed. . .profile DTBASE=/u01/datatools; export DTBASE # cd to a known directory... cd /u01/datatools /u01/datatools/obacktrack-3.2.00/bin/dtobackup /u01/datatools/oracatalog -database PROD -cold shutdown -full -noprompt status=$? # Be sure to exit the script with the exit status. If you add # anything to the script after the command you should be sure # to exit with the correct status. exit $status nbdp_cold_backup.sh **************** nbdp_cold_backup.sh **************** #!/bin/sh #%DT% SQL-BackTrack <DO NOT REMOVE OR CHANGE THIS LINE> # SQL-BackTrack for Oracle - Copyright (c) 1995-1997 # # This is a generated script; call this script from cron or # from other schedulers to perform the requested operation at regular
# intervals. # The parameter 'shutdown' directs the program to issue # a sqldba 'shutdown' command before beginning the operation. # Note that the database will be restored to its original state # after the operation is completed. DTBASE=/u01/datatools; export DTBASE # cd to a known directory... cd /u01/datatools /u01/datatools/obacktrack-3.2.00/bin/dtobackup /u01/datatools/oracatalog -database NBDP -cold shutdown -full -noprompt status=$? # Be sure to exit the script with the exit status. If you add # anything to the script after the command you should be sure # to exit with the correct status. exit $status nbep_cold_backup.sh **************** nbep_cold_backup.sh ****************
#!/bin/sh #%DT% SQL-BackTrack <DO NOT REMOVE OR CHANGE THIS LINE> # SQL-BackTrack for Oracle - Copyright (c) 1995-1997 # # This is a generated script; call this script from cron or # from other schedulers to perform the requested operation at regular # intervals. # The parameter 'shutdown' directs the program to issue # a sqldba 'shutdown' command before beginning the operation. # Note that the database will be restored to its original state # after the operation is completed. DTBASE=/u01/datatools; export DTBASE # cd to a known directory... cd /u01/datatools /u01/datatools/obacktrack-3.2.00/bin/dtobackup /u01/datatools/oracatalog -database NBEP -cold shutdown -full -noprompt status=$?
# Be sure to exit the script with the exit status. If you add # anything to the script after the command you should be sure # to exit with the correct status. exit $status sylp_cold_backup.sh **************** sylp_cold_backup.sh ****************
:q /torrington/db_admin==> vi -R sylp_cold_backup.sh "sylp_cold_backup.sh" [Read only] [Last line is not complete] 26 lines, 886 characters #!/bin/sh #%DT% SQL-BackTrack <DO NOT REMOVE OR CHANGE THIS LINE> # SQL-BackTrack for Oracle - Copyright (c) 1991-2000 # # This is a generated script; call this script from cron or # from other schedulers to perform the requested operation at regular # intervals. # The parameter 'shutdown' directs the program to issue # a sqldba 'shutdown' command before beginning the operation. # Note that the database will be restored to its original state # after the operation is completed. DTBASE=/u01/dt817bmc; export DTBASE # cd to a known directory... cd /u01/dt817bmc /u01/dt817bmc/obacktrack-3.3.00-32-o8lib/bin/dtobackup /u01/dt817bmc/oracatalog -database SYLP cold -shutdown -full -quiet -noprompt status=$? # Be sure to exit the script with the exit status. If you add # anything to the script after the command you should be sure # to exit with the correct status. exit $status
caip_cold_backup.sh **************** caip_cold_backup.sh **************** #!/bin/sh #%DT% SQL-BackTrack <DO NOT REMOVE OR CHANGE THIS LINE> # SQL-BackTrack for Oracle - Copyright (c) 1991-2000 # # This is a generated script; call this script from cron or # from other schedulers to perform the requested operation at regular # intervals. # The parameter 'shutdown' directs the program to issue # a sqldba 'shutdown' command before beginning the operation. # Note that the database will be restored to its original state # after the operation is completed. DTBASE=/u01/dt817bmc; export DTBASE # cd to a known directory... cd /u01/dt817bmc /u01/dt817bmc/obacktrack-3.3.00-32-o8lib/bin/dtobackup /u01/dt817bmc/oracatalog -database CAIP cold -shutdown -full -quiet -noprompt status=$? # Be sure to exit the script with the exit status. If you add # anything to the script after the command you should be sure # to exit with the correct status. exit $status