• Please help support our sponsors by considering their products and services.
    Our sponsors enable us to serve you with this high-speed Internet connection and fast webservers you are currently using at ADSM.ORG.
    They support this free flow of information and knowledge exchange service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions
  • Community Tip: Please Give Thanks to Those Sharing Their Knowledge.

    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.

  • Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)

    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

Making SQL backup script - need some help

bostjanc

ADSM.ORG Member
#1
Hi guys.
We are in the phase of implementing TSM DP For SQL.
We are trying to create FULL-backup-sql.bat and DIFF-backup-sql.bat.
So far we are at creating FULL-backup script and got stucked on "inactivating" databases.

The idea is to make full backup on sunday's and differential backups between monday and saturday.
When we run full backup we would also like to delete any previous full backups (for example: delete full backups older then 1 day)

Currently the script for full backup looks like this:

set TSMERROR=0
set sql_dir=C:\Progra~1\Tivoli\TSM\TDPSql
C:
cd %sql_dir%
CALL %sql_dir%\tdpsqlc backup "Analysis Repository" full /SQLSERVER=srvname /tsmoptfile=%sql_dir%\dsm.opt /logfile=%sql_dir%\sqlschedFULL.log >> %sql_dir%\sqlschedFULL.log
CALL %sql_dir%\tdpsqlc inactiv "Analysis Repository" full /FROMSQLSERVer=srvname /olderthan=0 >> %sql_dir%\sqlschedFULL.log
CALL %sql_dir%\tdpsqlc delete backup "Analysis Repository" full /FROMSQLSERVer=srvname >> %sql_dir%\sqlschedFULL.log

The thing is that inactiv command does not do anything.
It gives error: FMY5551I There are no backups matching the criteria specified for server name

* Please advise us how to achieve to delete full backups older then one day
* My next question is Will the logs be automatically truncated or do we need to "push" them also with tdpsqlc command?
With best regards
 

marclant

ADSM.ORG Moderator
#4
It's not dead, but it's possible that nobody knows the answer to your question.

I have never used TDP SQL, so I can't be much help, other than giving you general troubleshooting tips.

With a script, I find sometimes it's harder to troubleshoot, if you have not done so, try every command in the script one by one, in the same order until you can get them all to run without errors.

Double-check the syntax in the manual also make sure you have the right order of operations.
 

smajl

ADSM.ORG Senior Member
#6
Do you really need to deactivate and delete older backups manually from within script?
After you backup database "Analysis Repository" the previous backup is marked as inactive. Inactive backup objects will be expired and deleted during "expire inventory" daily TSM maintenance based on copy group settings. Just set your backup copy group to 0 inactive version (but think before you are changing it as you might set it also for other nodes)
 

marclant

ADSM.ORG Moderator
#7
Do you really need to deactivate and delete older backups manually from within script?
After you backup database "Analysis Repository" the previous backup is marked as inactive. Inactive backup objects will be expired and deleted during "expire inventory" daily TSM maintenance based on copy group settings. Just set your backup copy group to 0 inactive version (but think before you are changing it as you might set it also for other nodes)
smajl is right: http://www-01.ibm.com/support/knowl...tsm.db.sql.doc/dps_tsk_gui_inactivatedbs.html
 

fidel

ADSM.ORG Member
#8
Hi guys.
We are in the phase of implementing TSM DP For SQL.
We are trying to create FULL-backup-sql.bat and DIFF-backup-sql.bat.
So far we are at creating FULL-backup script and got stucked on "inactivating" databases.

The idea is to make full backup on sunday's and differential backups between monday and saturday.
When we run full backup we would also like to delete any previous full backups (for example: delete full backups older then 1 day)

Currently the script for full backup looks like this:

set TSMERROR=0
set sql_dir=C:\Progra~1\Tivoli\TSM\TDPSql
C:
cd %sql_dir%
CALL %sql_dir%\tdpsqlc backup "Analysis Repository" full /SQLSERVER=srvname /tsmoptfile=%sql_dir%\dsm.opt /logfile=%sql_dir%\sqlschedFULL.log >> %sql_dir%\sqlschedFULL.log
CALL %sql_dir%\tdpsqlc inactiv "Analysis Repository" full /FROMSQLSERVer=srvname /olderthan=0 >> %sql_dir%\sqlschedFULL.log
CALL %sql_dir%\tdpsqlc delete backup "Analysis Repository" full /FROMSQLSERVer=srvname >> %sql_dir%\sqlschedFULL.log

The thing is that inactiv command does not do anything.
It gives error: FMY5551I There are no backups matching the criteria specified for server name

* Please advise us how to achieve to delete full backups older then one day
* My next question is Will the logs be automatically truncated or do we need to "push" them also with tdpsqlc command?
With best regards
The inactivation of full backup is automatically done when you launch a new full backup.
see http://www-01.ibm.com/support/knowl...dps_ref_opt_inactivatepositional.html?lang=en
 

Advertise at ADSM.ORG

If you are reading this, so are your potential customer. Advertise at ADSM.ORG right now.

UpCloud high performance VPS at $5/month

Get started with $25 in credits on Cloud Servers. You must use link below to receive the credit. Use the promo to get upto 5 month of FREE Linux VPS.

The Spectrum Protect TLA (Three-Letter Acronym): ISP or something else?

  • Every product needs a TLA, Let's call it ISP (IBM Spectrum Protect).

    Votes: 12 15.8%
  • Keep using TSM for Spectrum Protect.

    Votes: 48 63.2%
  • Let's be formal and just say Spectrum Protect

    Votes: 9 11.8%
  • Other (please comement)

    Votes: 7 9.2%

Forum statistics

Threads
31,344
Messages
133,509
Members
21,469
Latest member
guidocaffa
Top