How can I clear the Sybase master database logs when they are full? You can manage the master database by using the following methods. If you do not have enough space, you can consider resizing the master database.
1. In simple cases, dump trans with no_log is enough, and the master database is generally not full.
1> use master 2> go 1> checkpoint 2> go 1> dump tran master with no_log 2> go 00: 00000: 00011: 2006/02/22 14:53:38. 06 server WARNING :************************* ** 00: 00000: 00011: 2006/02/22 14:53:38. 06 server Attempt by user 1 to dump xact on Db master with NO_LOG 00: 00000: 00011: 2006/02/22 14:53:38. 06 server Attempt by user 1 to dump xact on Db master with NO_LOG was successful 00: 00000: 00011: 2006/02/22 14:53:38. 06 server WARNING :************************* ** |
2. for windows, find RUN_your_server_name.bat.
For Unix platforms, find the RUN_your_server_name file.
Edit the above Startup File and add-T3067 at the end of the line
Use the Startup File to start the database.
Dump tran master with truncate_onlyu
Go
1) back up the master database
Dump database master to 'backup path and file name'
2) Stop the sybase Service
Shutdown
3) edit the sybase Service Startup File (generally RUN _ service name in unix, and RUN _ service name in windows. bat ). Add-T3607 to the command line of the Startup File)
4) use the Startup File to start the service, and then dump tran master with truncate_only
5) at this time, the dump usually clears many logs and will be successful. Then stop the shutdown service, remove-T3607, and start the service normally.
3. If not, you need to create a device for expansion or reconstruction as follows:
1) back up the master database
Start the backup server and enter the isql environment for execution:
1> dump database master to '/sybase/master. dump'
2> go
(If not, dump the log with no log)
Hut down SQL/ASE Server
1> shutdown
2> go
2) create a new large enough master device
$ Buildmaster-d -Ssize (The unit of size is 2 K)
Example: $ buildmaster-d/sybase/data/master. dat-s102400
3) modify the RUN_servername File
Edit the RUN_server_name file. The-d parameter points to the new device name.
4) restart the server in single-user mode
$ Startserver-f RUN_servername-m
5) execute the installmaster script
6) load the master database from the backup file
1> load database master from '/sybase/master. dump'
2> go
7) Modify sysdevices Information
Sp_configure 'Allow updates', 1
Go
Begin tran
Go
Update sysdevices set high = 102399, phyname = 'e: \ sybase \ data \ master_test.dat 'where name = 'master'
Go
(102399 = 200*512-1 master device size: 200 M)
Commit tran
Go
8) extended master database
1> alter database master on master device name = size (in MB)
2> go
Example: alter database master on master = 10
Expand the master database to 10 MB on the master device.
This operation is dangerous. Be sure to back up the data first (such as GHOST)
(