Re: SQL agent on TSM

From: Lawrence Clark (Larry_Clark@THRUWAY.STATE.NY.US)
Date: Thu Aug 21 2003 - 14:22:42 EDT


@ECHO OFF
rem
==================================================================
rem sqlfull.smp sample command file
rem
rem Sample command file containing commands to do a scheduled full
backup
rem of all of the SQL databases to ADSM.
rem
rem This file is meant to be executed by the ADSM central scheduler
rem in response to a defined schedule on the ADSM server.
rem
rem Complete paths must be given for all file names and non-system
rem commands.
rem
rem
==================================================================

rem
==================================================================
rem Replace "X:" with the drive where SQL agent is installed.
rem ( ensure the correct path is where this sample is in the
rem default install path )
rem
==================================================================

set sql_dir=C:\PROGRA~1\tivoli\tsm\tdpsql

c:

cd %sql_dir%

rem
==================================================================
rem 2 lines below put a date and time stamp in a log file for you.
rem
rem Note: you can change "sqlsched.log" to
rem whatever you prefer in lines below:
rem
==================================================================
date < NUL >> %sql_dir%\tdpsched.log
time < NUL >> %sql_dir%\tdpsched.log

rem
==================================================================
rem Replace "srvrname" with the name of the options file name you
rem plan to use.
rem
rem If you have not stored the SQL login settings in dsm.opt or
rem via the GUI, you must also specify /sqluser: and /sqlpwd:, if
rem applicable, on the command lines below.
rem
rem In this example, we use the '*' to back up all of the databases
rem on the SQL server. This will work as long as all databases are
rem allowed to be backed up. Note that, currently, this will also
rem back up the 'tempdb' database as well, even though that database

rem is not really restorable. If this causes concern and you would
rather
rem change to only back up pertinent databases, simple copy the
rem next line and replace the '*' with each of the databases you
rem need to back up.
rem
rem Note: you can change "sqlsched.log" and "sqlsfull.log" to
rem whatever you prefer.

%sql_dir%\tdpsqlc backup * full /tsmoptfile=%sql_dir%\dsm.opt
/logfile=%sql_dir%\tdpsched.log /sqlp=<YOUR PASSWORD

>>> aixgeek@YAHOO.COM 08/21/03 01:28PM >>>
I know that there is probably a better audience for
this over on adsm.org, but does anyone here have a
sample script on how to backup SQL databases on
Windows using the SQL agent (TSM server is AIX)?

- pAG

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:09 EDT