When you use the RESTORE statement to move and/or rename a database, you can rename all of the files except the transaction log. Transactions continue to be written to the old log file name, in the location where the Catalog Store file (the .db file) is located after the database is restored.
When you rename or move all other files in the database, it is preferable to do the same for the log file. To move or rename the log file, you use the Transaction Log utility (DBLOG). You should run this utility:
•After using RESTORE with a new database name
•After using RESTORE with the RENAME option
Note The database server must not be running on that database when the transaction log filename is changed. If you try to use this utility on a running database, you get an error message.
You can access the Transaction Log utility from the system command line, using the DBLOG
The DBLOG |
|
| |
Syntax | dblog [switches] | ||
Switches | Switch |
| Description |
| |||
|
| ||
|
|
|
|
|
| Set transaction log mirror name. | |
|
|
|
|
|
| Set the transaction log name | |
|
|
|
|
Description | The DBLOG command line utility allows you to display or change the name | |
| of the transaction log or transaction log mirror associated with a database. You | |
| can also stop a database from maintaining a transaction log or mirror, or start | |
| maintaining a transaction log or mirror. |
|
Transaction log utility options |
| |
| Set the name of the transaction log mirror file | This option sets a |
filename for a new transaction log mirror. If the database is not currently using a transaction log mirror, it starts using one. If the database is already using a transaction log mirror, it changes to using the new file as its transaction log mirror. Most Adaptive Server IQ databases do not use a transaction log mirror, so this switch is rarely used.
43