版次注意事項


|10.11 ARCHIVE LOG (new command)

|Archive Log

|

|Closes and truncates the active log file for a recoverable database. |If user exit is enabled, issues an archive request.

|Authorization

|One of the following: |

|Required Connection

|This command automatically establishes a connection to the specified database. |If a connection already exists, an error is returned.

|Command Syntax

|>>-ARCHIVE LOG FOR----+-DATABASE-+--database-alias-------------->
|                      '-DB-------'
| 
|>-----+---------------------------------------+----------------->
|      '-USER--username--+------------------+--'
|                        '-USING--password--'
| 
|>-------| On Node clause |-------------------------------------><
| 
|On Node clause
| 
||---ON----+-| Node List clause |-------------------------+------|
|          '-ALL NODES--+-------------------------------+-'
|                       '-EXCEPT--| Node List clause |--'
| 
|Node List clause
| 
|                  .-,-----------------------------------.
|                  V                                     |
||---+-NODE--+--(-----node number--+------------------+--+---)---|
|    '-NODES-'                     '-TO--node number--'
| 

|Command Parameters |

|DATABASE database-alias
|Specifies the alias of the database whose active log is to be archived.

|USER username
|Identifies the user name under which a connection will be attempted.

|USING password
|Specifies the password to authenticate the user name.

|ON ALL NODES
|Specifies that the command should be issued on all nodes in the db2nodes.cfg file. This is the default if a node clause is not specified.

|EXCEPT
|Specifies that the command should be issued on all nodes in the db2nodes.cfg file, except those specified in the node list.

|ON NODE/ON NODES
|Specifies that the logs should be archived for the specified database |on a set of nodes.

|node number
|Specifies a node number in the node list.

|TO node number
|Used when specifying a range of nodes for which the logs should be archived. |All nodes from the first node number specified up to and including the second |node number specified are included in the node list. |

|Usage Notes

|This command can be used to collect a complete set of log files up to |a known point. The log files can then be used to update a standby database.

|This function can only be executed when there is no database connection |to the specified database. This prevents a user from executing the command |with uncommitted transactions. As such, the ARCHIVE LOG command will not |forcibly commit the user's incomplete transactions. If a database connection |to the specified database already exists and this command is executed, the |command will terminate and return an error. If another application has transactions |in progress with the specified database when this command is executed, there |will be a slight performance degradation since the command flushes the log |buffer to disk. Any other transactions attempting to write log records to |the buffer will have to wait until the flush is complete.

|If used in an MPP environment, a subset of nodes may be specified by using |a node clause. If the node clause is not specified, the default behaviour |for this command is to close and archive the active log on all nodes.

|Using this command will cause a database to lose a portion of its LSN |space, and thereby hasten the exhaustion of valid LSNs.


[ 頁面頂端 | 前一頁 | 下一頁 | 目錄 | 索引 ]