The Transaction Log utility (dblog)

Sybase IQ automatically handles the creation and deletion of the transaction log for a database. The command-line Transaction Log utility dblog displays or changes the name of the transaction log or transaction log mirror associated with your database. You can also use dblog to stop a database from maintaining a transaction log mirror, or start maintaining a transaction log mirror.

The database must run with a transaction log. The Sybase IQ server will not start without a transaction log. A transaction log mirror is a duplicate copy of a transaction log, maintained by the database in tandem. While a transaction log mirror is not required, it is always recommended, especially for sites that do not back up their IQ database frequently.

Syntax

dblog [options] database-file

Parameters

The following table lists the options available for the dblog utility.

Table 3-8: dblog options

Option

Description

-m mirror-name

Set transaction log mirror name.

-o filename

Log output messages to a file

-q

Quiet mode—do not print messages

-r

No longer use a transaction log mirror

-t log-name

Set the transaction log name

Usage

The dblog command line utility allows you to display or change the name of the transaction log or transaction log mirror. You can also stop or start maintaining a transaction log mirror.

The name of the transaction log is first set when the database is created. The database must not be running when you change its transaction log filename.

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:

You can use dblog to rename the transaction log even if you have not restored the database, given these restrictions:

The dblog utility displays additional information about the transaction log, including the following:

For information on truncating the transaction log file, see “The transaction log file” in Chapter 4, “Managing System Resources” of the Sybase IQ Performance and Tuning Guide.

Options

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 file as its transaction log mirror.

Log output messages to file (-o) Write output messages to the named file.

Operate quietly (-q) Do not display output messages. This option is available only from the command-line utility.

No longer use a transaction log mirror (-r) For databases that maintain 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, including an optional directory path, for a new transaction log. The database changes to using the new file as its transaction log.

Do not use the dblog -n option. This option is not supported for IQ databases.