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 semicolon (;).
None.
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, creating an arbitrary size time window during which to copy database files. 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 nonzero status, sa_checkpoint_execute returns an error.
Do not use the sa_checkpoint_execute with interactive commands, as the server must wait until the interactive command is killed. Supply override flags to disable prompting for any shell commands that might become interactive; in other words, the COPY, MOVE, and DELETE commands might prompt for confirmation.
The intended use of sa_checkpoint_execute is with disk mirroring, to split mirrored devices.
When using sa_checkpoint_execute to copy iqdemo.* files to another directory, all files are copied except the .db and .log files. Error -910 is returned.
This error not a product defect but a Windows limitation; the Windows copy command cannot copy catalog files while they are open by the database.
Assuming you have created a subdirectory named backup, the following statement issues a checkpoint, copies all of the iqdemo database files to the backup subdirectory, and completes the checkpoint:
sa_checkpoint_execute 'cp iqdemo.* backup/'