-zn server option

Specifies the number of request log file copies to retain.

Syntax
{ dbsrv11 | dbeng11 } -zn integer
Applies to

All operating systems and database servers.

Remarks

If request logging is enabled over a long period of time, the request log file can become large. The -zn option allows you to specify the number of request log file copies to retain. It only takes effect if -zs is also specified. The -zs option allows you to create a new log file and rename the original log file when the original log file reaches a specified size. See -zs server option.

For example, if you redirect request logging information to the file req.out, and specify five request log file copies using the -zn option, the server creates files in the following order: req.out.1, req.out.2, req.out.3, req.out.4, and req.out.5. When these files exist and the active request log fills again, the following happens:

  • req.out.1 is deleted
  • the files req.out.2 to req.out.5 are renamed req.out.1 to req.out.4
  • the copy of the active log is renamed req.out.5

Request logging is turned on using the -zr option and redirected to a separate file using the -zo option. You can also set the number of request logs using the sa_server_option system procedure where nn specifies the number of request log file copies:

CALL sa_server_option('RequestLogNumFiles',nn);
See also
Example

In the following example, entered all on one line, request logging information is output to a request log file named mydatabase.log, which has a maximum size of 10 KB, and three copies of the request log are kept:

dbeng11 "c:\my data\mydatabase.db" -zr all -zn 3
 -zs 10 -zo mydatabase.log