Answers

Question and Answer:

  Home  Sybase

⟩ How to swap a db device with another?

Here are four approaches. Before attempting any of the following: Backup, Backup, Backup.

Dump and Restore

1. Backup the databases on the device, drop the databases, drop the devices.

2. Rebuild the new devices.

3. Rebuild the databases (Make sure you recreate the fragments correctly - See Ed Barlow's scripts (http://www.tiac.net/users/sqltech/) for an sp that helps you do this if you've lost your notes. Failure to do this will possibly lead to data on log segments and log on data segments).

4. Reload the database dumps!

Twiddle the Data Dictionary - for brave experts only.

1. Shut down the server.

2. Do a physical dump (using dd(1), or such utility) of the device to be moved.

3. Load the dump to the new device

4. Edit the data dictionary (sysdevices.physname) to point to the new device.

 188 views

More Questions for you: