16
Cannot extend the MASTER database onto any device other than 'master'. The ALTER DATABASE was aborted.
This error occurs when you try to extend the master database onto a device other than the master device.
It is recommended that you keep user objects out of the master database. If you keep user databases off the master device, you allow space in case the master database needs to grow. In addition, if you ever need to rebuild the master device, it will be easier if it does not contain user databases.
Adaptive Server users can move any “home-grown” system procedures that start with “sp_” to sybsystemprocs (by dropping them from the master database and creating them in sybsystemprocs).
Extend the master database only if absolutely necessary! If you are sure you must increase the master database size and have no room on the current master device, use the following procedure to remove user databases from the master device.
Dump the user databases with the dump database command.
Rename the dumped databases on the master device with sp_renamedb.
Re-create the databases with their original names on another device with create database. Be sure they are created exactly like the old databases, to avoid 2558 and other errors. Refer to “Error 2558” for more information.
Load the dumps with load database.
Use the online database command for each database to make the databases available for use.
Check the databases in their new location to make sure the load was successful (that is, perform a simple query with isql), and if everything loaded successfully, drop the old databases from the master device.
You can now try to increase the size of the master database on the master device with the alter database command.
If the master device contains only the master database and the master device is too small, then use the following procedure:
WARNING! Altering the master device is extremely risky! Avoid it if at all possible. Be familiar with the recovery methods in the chapter “Adaptive Server System Recovery” in the most recent version of Troubleshooting and Disaster Recovery in case you lose your master database or device.
Back up the master database with the dump database command.
Save the contents of key system tables such as sysdatabases, sysdevices, sysusages, and syslogins.
Use the buildmaster utility to build a new master device with enough extra space so that you will never need to increase the master device again. When buildmaster completes, a new master database will exist on the new master device.
Expand the size of the new master database with the alter database command, if necessary, so that it matches the size of the dumped master database.
Execute the following command in isql:
1> select name, high from master..sysdevices 2> where name = "master" 3> go
and note the “high” value for the master device.
Start Adaptive Server in single-user mode. Refer to “Starting Adaptive Server in single-user mode” in the chapter “Server Recovery Tasks” in the most recent version of Troubleshooting and Disaster Recovery.
Load the dump of the master database. Test the database to make sure it is functioning correctly before deleting any extra backups of master.
Allow updates to the system catalog:
1> sp_configure, "allow updates", 1 2> go
Reset the “high” value in master..sysdevices:
1> begin transaction 2> go
1> update master..sysdevices 2> set high = <value_of_high_from_step_5> 3> where name = "master" 4> go
If the previous update affected only one row, commit the transaction.
Restart Adaptive Server.
Turn off allow updates:
1> sp_configure, "allow updates", 0 2> go
All versions