Using dump and load with the same and different databases

To dump and then load a database and transaction to a different database, when both databases are on the same Adaptive Server, use the -D option with the load command.

For example, to dump a database “testdb” to a TSM backup object named “obj1.1”, first dump “obj1.1” to the same database, then load “obj1.1” to a different database,

dump database testdb to "syb_tsm::obj1.1"

Backup Server prints the following, which provides the backup object identifiers:

Backup Server session id is: 5. Use this value when executing the 'sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.Backup Server: 4.132.1.1: Attempting to open byte stream device:'syb_tsm::obj1.1::00'Backup Server: 6.28.1.1: Dumpfile name 'testdb091840CA13 ' section number 1 mounted on byte stream 'syb_tsm::obj1.1::00'Backup Server: 4.188.1.1: Database testdb: 854 kilobytes (84%) DUMPED.
Backup Server: 3.43.1.1: Dump phase number 1 completed.
Backup Server: 3.43.1.1: Dump phase number 2 completed.Backup Server: 3.43.1.1: Dump phase number 3 completed.
Backup Server: 4.188.1.1: Database testdb: 870 kilobytes (100%) DUMPED.
Backup Server: 3.42.1.1: DUMP is complete (database testdb).Additional message in Backup Server error log indicating corresponding TSM backup object name and ids. Please check the complete Backup Server error log attached as well.

Check the Backup Server error log to see the TSM backup object name and id:

Jul  3 14:30:19 2009: A00: Database 'testdb' dumped. Tivoli Storage Manager backup object name: fs = /demo_srv1, high = /testdb.DB, low = /obj1.1.0,  Copyids: (0, 36913).

Backup Server also prints the backup object identifiers to the error log. In this example, they are:

To load the backup object “obj1.1.0” to the same database, “testdb,” enter:

load database testdb from "syb_tsm::obj1.1"

Alternatively, to load the backup object “obj1.1” to another database, “anotherdb,” enter:

load database anotherdb from 
"syb_tsm::-D testdb::obj1.1"