Allows the execution of shell commands during a checkpoint.
sa_checkpoint_execute 'shell_commands'
shell_commands One or more user commands to be executed in a system shell. The shell commands are specific to the system shell. Commands are separated by a semi-colon (;).
None.
The sa_checkpoint_execute procedure allows users to execute shell commands to copy a running database from the middle of a checkpoint operation, when the server is quiescent. The copied database can be started and goes through normal recovery, similar to recovery following a system failure.
sa_checkpoint_execute initiates a checkpoint and then executes a system shell from the middle of the checkpoint, passing the user commands to the shell. The server then waits for the shell to complete, hence creating an arbitrary size time window in which to copy database files. Note that most database activity stops while the checkpoint is executing, so the duration of the shell commands should be limited to acceptable user response time.
If the shell commands return a non-0 status, sa_checkpoint_execute returns an error.
The sa_checkpoint_execute procedure should not be used with interactive commands, as the server must wait until the interactive command is killed. Be sure to supply override flags to disable prompting for any shell commands that may become interactive (i.e., the copy, move, and delete commands may prompt for confirmation).
The intended use of sa_checkpoint_execute is in conjunction with disk mirroring to split mirrored devices.
The following statement issues a checkpoint, copies all of the asiqdemo database files to a backup directory, then completes the checkpoint.
sa_checkpoint_execute 'cp asiqdemo.* /backup'