Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » Database Administration Utilities

SQL Anywhere Console utility (dbconsole) Next Page

SQL Anywhere Script Execution utility (dbrunsql)

Allows you to execute SQL commands and run command files against databases running on Windows CE.


dbrunsql [ options ] [ SQL-script-file | SQL-command ]

-c "keyword=value; ..." Specify connection parameters. See Connection parameters.
-dWhen this option is specified, only data exported from result sets is written to the output file. If you do not specify -d, then all dbrunsql output is written to the output file.
-e [ c | p | s ]

This option controls what happens if an error is encountered while executing statements. By default, dbrunsql prompts the user when an error occurs.

  • c  Ignore the error and continue executing statements.

  • p  Prompt the user to see if the user wants to continue.

  • s  Stop executing statements.

-f [ f | a ]

Use this option to specify the data format dbrunsql uses to export result sets. You can specify one of the following values:

  • a  Use ASCII format when exporting data.

  • f  Use FIXED format when exporting data. This is the default format.

-g [ + | - ]By default, the dbrunsql GUI appears. Specify -g- if you do not want the GUI to appear.
-o filename Write output messages to the named file.

Do not display output messages. This is useful only if you start Interactive SQL with a command or command file. Specifying this option does not suppress error messages, but it does suppress the following:

  • warnings and other non-fatal messages
  • the printing of result sets
-qcSpecify this option if you want the dbrunsql window to close once the command or script file has been executed.
-s number When you are exporting result sets using the FIXED format, you can specify the maximum number of bytes fetched per column. The default value is 255.
-v When you specify the -v option, all lines of each SQL statement appear in the dbrunsql output. Otherwise, when you execute a script file, the number of the line that is currently being executed appears.

The dbrunsql utility allows you to execute SQL commands or run command files against a database. The SQL Anywhere Script Execution utility (dbrunsql) is only supported on Windows CE.