Contents IndexThe Stop utility The Uncompression utility

User's Guide
   Part VI. SQL Anywhere Reference
     Chapter 39. SQL Anywhere Components
      The Transaction Log utility

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:

Top of page


Changing a log file name from Sybase Central

To change a transaction log file name:

  1. Open the Database Utilities folder in the left panel.
  2. Double-click Change Log File in the right panel. The Transaction Log Wizard is displayed
  3. Follow the instructions in the Wizard.

For full information on changing a log file name from Sybase Central, see the Sybase Central online Help.

Top of page


Changing a log file name from the ISQL Database Tools window

To use the Translation Log utility from the ISQL Database Tools window to change a log filename:

  1. Select Database Tools from the Window menu.
  2. Click Change Transaction Log Name on the Tools list.
  3. Enter the database filename (with path).
  4. Click Change, and select from the options on the dialog.
  5. Click OK to change the name of the transaction log, or to run without a transaction log.

Top of page


Changing a log filename from the DBTOOL statement

Syntax

     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.

Top of page


The DBLOG command-line utility

Syntax

     dblog[switches] database-file

Windows 3.x syntax

     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".

Top of page


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.

Top of page


Contents IndexThe Stop utility The Uncompression utility