Collection Contents Index The Stop utility The Uncompression utility pdf/chap4.pdf

Reference Manual
   CHAPTER 4. Database Administration Utilities     

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 the 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 server must not be running on that database when the transaction log filename is changed (or an error message is displayed).

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 Info     For full information on changing a log file name from Sybase Central, see the Sybase Central online Help.

Top of page  The DBLOG command-line utility

Syntax 

dblog [switches] database-file

Windows 3.x
syntax 

dblogw [switches] database-file

Switch

Description

-g n

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

-m mirror-name

Set transaction log mirror name

-n

No longer use a transaction log

-o file

Output messages to file

-q

Quiet mode—do not print messages

-r

No longer use a transaction log mirror

-t log-name

Set the transaction log name

-x n

Set the transaction log current relative offset to n

-z n

Set the transaction log starting offset to n

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.

For Info     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 )     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. 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 )     Use this option if you are using the Log Transfer Manager 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 )     Use this option if you are using the Log Transfer Manager to participate in a Replication Server installation and a SQL Remote installation. It resets the offset that is kept for 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 file 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 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 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.

Set the current log offset (-x)     For use when reloading a SQL Remote consolidated database. This option resets the current log offset so that the database can take part in replication.

For Info     For information on how to use this option, see Unloading and reloading a consolidated database.

Set the starting log offset (-z)     For use when reloading a SQL Remote consolidated database. This option resets the starting log offset so that the database can take part in replication.

For Info     For information on how to use this option, see Unloading and reloading a consolidated database.

Top of page  

Collection Contents Index The Stop utility The Uncompression utility pdf/chap4.pdf