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 in tandem by the database. A transaction log mirror is not required, but Sybase recommends that you use one, especially if you do not frequently back up your IQ database.

Syntax

dblog [options] database-file

Parameters

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

Table 3-9: dblog options

Option

Description

-ek key

Specify the encryption key for strongly encrypted databases directly in the command. If you have a strongly encrypted database, you must provide the encryption key to use the database or transaction log in any way. For strongly encrypted databases, you must specify either -ek or -ep, but not both. The command will fail if you do not specify the correct key for a strongly encrypted database.

-ep

Specify that you want to be prompted for the encryption key. This option causes a window to appear, in which you enter the encryption key. It provides an extra measure of security by never allowing the encryption key to be seen in clear text. For strongly encrypted databases, you must specify either -ek or -ep, but not both. The command will fail if you do not specify the correct key for a strongly encrypted database.

-g n

Use this option if you are using the Log Transfer Manager to participate in a Replication Server installation. It can be used after a backup is restored, to set the generation number.

-il

Use this option if you have stopped using the Log Transfer Manager to participate in a Replication Server installation on this database, but continue to use SQL Remote or MobiLink synchronization. It resets the Log Transfer Manager log offset that is kept for the delete_old_logs option, allowing transaction logs to be deleted when they are no longer needed.

-is

Use this option if you have stopped using MobiLink synchronization on this database, but continue to use the Log Transfer Manager or SQL Remote. It resets the MobiLink log offset that is kept for the delete_old_logs option, allowing transaction logs to be deleted when they are no longer needed.

-m mirror-name

Specify the file name 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.

-n

Stop using a transaction log, and stop using a transaction log mirror. Without a transaction log, the database can no longer participate in data replication or use the transaction log in data recovery. If a SQL Remote, Log Transfer Manager, or dbmlsync truncation offset exists, the transaction log cannot be removed unless the corresponding ignore option (-il for the Log Transfer Manager, -ir for SQL Remote, or -is for dbmlsync) is also specified. You cannot stop using a transaction log if the database has auditing turned on (unless you first turn auditing off).

-o filename

Write output messages to the named file.

-q

Run in quiet mode—messages are not displayed.

-r

Maintain a single transaction log for databases that maintain a transaction log mirror.

-t log-name

Specify the file name 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 file as its transaction log.

-x n

Reset the transaction log current relative offset to n, so that the database can take part in replication. This option is used for reloading SQL Remote consolidated databases.

-z n

Reset the transaction log starting offset to n, so that the database can take part in replication. This option is used for reloading SQL Remote consolidated databases.

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 set when you create a database. The database cannot be running when you change its transaction log file name.

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, Sybase recommends that you do the same for the log file. Use dblog to move or rename the log file. Run this utility after using RESTORE with:

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

dblog displays additional information about the transaction log:

See “The transaction log file” in Chapter 4, “Managing System Resources” in the Performance and Tuning Guide.