Mark Tindall wrote:
I am new to Tivoli and am having problems trying to get scheduling working for the TDP side of things via the TSM scheduler. I have so far found out that I need to have 3 stanzas in the dsm.sys file - 1 for normal backups, 1 for Oracle and 1 for the scheduler for Oracle - and that I need to run a second dsmc process which then refers to the severname set up in the dsm.sys file for the scheduler for Oracle. When I schedule stuff to run it seems to acually execute the script listed in the "Command" section, though this sems to error as it is missing some environment varuables setup? I know I can backup the databaes fine if I either run from the command line or I use the cron facility.
Could someone explain how I should setup the scheduling via TSM so that it works?
Quick question; Do you execute the script as an oracle user? Generally, the root user doesn't have Oracle specific environment. The scheduler is probably running as root user.
I use a wrapper script that is executed as root, which executes the actual script to be run as oracle user. Something like; su - oracle -c "/oracle/local/rman/run_full.sh"
The run_full.sh then contains all RMAN specific commands; #!/bin/sh
. /oracle/db_env.sh
cd /oracle/local/rman echo "*** Backup started at" `date` "***" >> /oracle/local/rman/backup.log rman target / catalog rman/[EMAIL PROTECTED] cmdfile bkp_full_open.rcv log="/oracle/local/rman/backup.log" append echo "*** Backup ended at" `date` "***" >> /oracle/local/rman/backup.log
Replace username/password as fit of course. I use a file which have the commands, but you could also re-direct into rman commands... Most likely there are a multitiude of other neater ways of doing it...
You see that I load the db_env.sh which is containing ORACLE_HOME, ORACLE_BASE, PATH and ORACLE_SID.
As you say it works when run locally as cron job or command line, and that the scheduled command seems to be executed means passwords and so are OK. I think what I have mentioned is quite likely...
Regards, Andreas
