Using isql to Execute Scripts

You can create scripts of RCL commands and execute the scripts using isql, which is useful when you need to execute the same set of commands in Replication Servers at multiple sites.

  1. Start Replication Server if it is not running.
  2. Create a text file for your script, and enter into it the RCL commands you want to execute. As with the interactive method, separate each command with a go command on a line by itself.
  3. Execute the script using this isql syntax:
    isql -Uuser_name -Ppassword -Sserver_name
    			-iscript_name
    isql displays the results from the commands in the script on your screen as the standard output. Optionally, you can redirect the output to a file:
    isql -Uuser_name -Ppassword -Sserver_name
    			-iscript_name > output_file