With the Transaction Log utility you can 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.
A transaction log mirror is a duplicate copy of a transaction log, maintained by a database in tandem.
The name of the transaction log is first set when the database is initialized. The Transaction Log utility works with database files or with write files. The database engine must not be running on that database when the transaction log filename is changed (an error message is displayed if it is).
You can access the Transaction Log utility in the following ways:
For full information on changing a log file name from Sybase Central, see the Sybase Central online Help.
DBTOOL ALTER DATABASE name
... NO [ TRANSACTION ] LOG
| SET [ TRANSACTION ] LOG TO filename
You can rename the database filename as well as the transaction log name from the DBTOOL statement.
dblog[switches] database-file
dblogw [switches] database-file
Switch | Description |
---|---|
-gn | Sets the generation number to n |
-il | Ignores the LTM truncation offset stored in the database |
-ir | Ignores the SQL Remote truncation offset stored in the database |
-mmirror-name | Set transaction log mirror name |
-n | No longer use a transaction log |
-o | Output messages to file |
-q | Quiet mode---do not print messages |
-r | No longer use a transaction log mirror |
-tlog-name | Set transaction log name |
For more information about the command-line switches, see "Transaction log utility options".
Set the generation number (-g ) This option is for use when using the SQL Anywhere Log Transfer Manager in order to participate in a Replication Server installation. It can be used after a backup is restored to set the generation number. It performs the same function as the following Replication Server function:
dbcc settrunc( 'ltm', 'gen_id', n ).
For information on generation numbers and dbcc, see your Replication Server documentation.
Ignore the LTM truncation offset (-il ) This option is for use when using the SQL Anywhere Log Transfer Manager in order to participate in a Replication Server installation. It performs the same function as the following Replication Server function:
dbcc settrunc( 'ltm', 'gen_id', n ).
For information on dbcc, see your Replication Server documentation.
Ignore the SQL Remote truncation offset (-ir ) This option is for use when using the SQL Anywhere Log Transfer Manager in order to participate in a Replication Server installation and a SQL Remote installation. It resets the offset that is kept for the purposes of the DELETE_OLD_LOGS option, allowing transaction logs to be deleted when they are no longer needed.
Set the name of the transaction log mirror file (-m ) 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 filename as its transaction log mirror.
No longer use a transaction log (-n ) Stop using a transaction log. Without a transaction log, the database will no longer be able to participate in data replication or use the transaction log in data recovery.
Output log messages to file (-o ) Redirect log messages to the named file.
Operate quietly (-q ) Do not display messages on a window. This option is available only from the command-line utility.
No longer use a transaction log mirror (-r ) For databases maintaining a mirrored transaction log, this option changes their behavior to maintain only a single transaction log.
Set the name of the transaction log file (-t ) This option sets a filename for a new transaction log. If the database is not currently using a transaction log, it starts using one. If the database is already using a transaction log, it changes to using the new filename as its transaction log.