Jeff, I didn't see anybody reply with anything better than what I know, so I thought I'd chime in. To do this, you will need to use TDPSQLC to query the TSM database for /ALL backups - not just the active ones. For example, "tdpsqlc query tsm mydatabase /all". Then you need to parse the output, looking at the "Backup Creation Date / Time" to select the backups you require. Then you need to make appropriate calls to tdpsqlc, using the strings listed as the "Database Object Name," so that you can perform the restores. Remember, if you are restoring more than just a single full backup, each restore command except the last one should specify /recovery=no. This prevents the rollback portion of the recovery process so that subsequent backups can be applied to move the recovery forward in time. The last restore command should specify /recovery=yes. This allows the rollback portion of recovery to complete so that the database can be opened for normal use.
I don't know of any way to force the /all query to return a subset of objects based on the time you want to recover to, or how to get the output in a more usable format. That would be nice, by the way, Del: a command to show me just the objects required to perform a PIT recovery to a time prior to the currently active backup. It would be even better if the objects came back in a more immediately usable format, such as a comma-separated list of TSM database object names or (to shoot the moon) a list of appropriate TDPSQLC commands. Maybe I can submit a request for that once my AIX friends tell me where to send them. Without such output, doing what Jeff is talking about is a little tedious ... and we haven't written a script yet to parse the "query tsm ... /all" output and automatically produce the correct restore commands. Has anybody else written an automatable script that can do this? Cheers, Chris | ------------------------------ | | Date: Mon, 16 Aug 2004 17:25:36 +0000 | From: Jeff White <[EMAIL PROTECTED]> | Subject: Restoring SQL Database Question | | Hi, | | TSM Server 5.1.5.2 | TDP/SQL 2.2.1 | TSM Client 5.1.5.0 | | What is the full command syntax, that i would enter from the | SQL/TDP command line client, to recover a database, but not | the latest database. | The user's guide shows the command syntax for recovering the | latest, but i have a DB Administrator who has asked that i | recover the backup PRIOR to the latest. This would be fine | via the GUI, but he asked if it was possible to do this on a | regular basis, overnight, so that it is recovered for him | prior to starting work. I was going to put this into a batch | file and run it via a schedule. | | Any suggestions would be appreciated. | | Jeff White | [EMAIL PROTECTED]
smime.p7s
Description: S/MIME cryptographic signature