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