We need to back up MSSQL databases, but they need to be closed to the RDMS

first.  Has anyone done that?  We do not have the Tivoli TDP agent, nor any
other

agents that handle open database files.  I am not the best script writer,
but I was

thinking to build a script somewhat like the following:





            preschedulecmd detach-script

            cd \Program Files\Tivoli\TSM\baclient

            dsmc selective -Filelist=f:\mssql\jobs\DBs.txt >
f:\mssql\log\DB-%1-bkup.log

            postschedulecmd attach-script



detach-script:

            exec sp_detach_db 'dbname1' 'true'

            go

            exec sp_detach_db 'dbname2' 'true'

            go



attach-script:

            exec sp_attach_db 'dbname1'

            go

            exec sp_attach_db 'dbname2'

            go





Thanks!



Vicki

Verizon Business

Reply via email to