Log into the Adaptive Server that contains the new master device. No password is needed.
Delete the sysconfigures table. You will replace the rows in step 4.
Remove the rows in the sysusages output file /directory.spec/usages for dbid 1 (master), 2 (tempdb), and 3 (model). dbid is the leftmost value in each row.
This step prevents incorrect sysusages errors. Otherwise, databases try to use uninitialized space from rows in the output file that are not in the new sysusages table.
Copy the files back into the system tables by entering the following commands at a Sybase bin directory prompt:
bcp master..sysdevices in /directory.spec/devs -Usa -P -b 1 -c bcp master..sysdatabases in /directory.spec/dbs -Usa -P -b 1 -c bcp master..sysusages in /directory.spec/usages -Usa -P -b 1 -c bcp master..syslogins in /directory.spec/logins -Usa -P -b 1 -c bcp master..sysconfigures in /directory.spec/configures -Usa -P -b 1 -c bcp master..syscharsets in /directory.spec/charsets -Usa -P -b 1 -c
The -b 1 parameter allows processing to continue when bcp encounters duplicate records, such as the SA login created during the initial buildmaster process.
Remember to run bcp...in for any other tables that you included in the step “Copy the System Tables to Files”.
Look at your error log prior to failure for the default sort order and character set ID. Then invoke isql and enter:
1> update sysconfigures set value = <new-sort-id> 2> where comment like “%default sort%” 3> go 1> update sysconfigures set value = <new-charset> 2> where comment like “%default character%” 3> go
Invoke isql and run checkpoint on the master database:
1> checkpoint 2> go