Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Chapter 2: Using SQL Advantage [Table of Contents] Appendix B: Error Messages

SQL Advantage User's Guide

[-] Appendix A: Command Line Parameters

Appendix A

Command Line Parameters

SQL Advantage can be started from the command line with a subset of the option parameters supported by the command line version of isql.

Supported Command Line Parameters

Note that SQL Advantage parameters are case-sensitive.
Table A-1 lists supported parameters that you can override by user preferences. Table A-2 lists supported parameters that you cannot override by user preferences.

Table A-1: Overridable supported parameters

Parameter

Description

- B

Specifies batch processing mode. Note that - B and - R are mutually exclusive.

- b batchSize

Specifies the batch size in rows. This determines the frequency of result window or output file update refreshes.

- c cmdend

Resets the command terminator. The default terminator is GO.

- D database

Specifies the initial database to which you connect. Default is login's default database.

- H hostName

Sets the client host name. Default is machine name.

- l loginTimeout

Specifies the timeout value used when connecting to SQL Server. The default timeout is 60 seconds for a SQL Server response after a logon request from SQL Advantage.

- R

Specifies row by row processing mode. In this mode, results are displayed as they are returned. Note this method allows handling of large result sets but is generally slower than batch processing mode. Note that - B and - R are mutually exclusive.

- S server

Specifies the name of the SQL Server to connect to. SQL Advantage looks for this name in the registry or the interfaces file.

- t timeout

Specifies the number of seconds before a T-SQL command times out. The default timeout is 60 seconds.

- U loginName

Specifies the login name. Default is user name.

Table A-2: Unchangeable supported parameters

Parameter

Description

- A size

Specifies the network packet size, in bytes, to use for this SQL Advantage session. Size must be between the values of the default network packet size and the maximum network packet size, in multiples of 512. Default is 512.

- I interfaceFile

Specifies the name and location of the interfaces file to search when connecting to SQL Server. Without -I, SQL Advantage looks for a file named $SYBASE/ini/sql.ini in the directory specified by the $SYBASE user environment variable. If $SYBASE is not defined, an error is displayed.

- i inputFile

Specifies the name of a file to use for input to SQL Advantage. You must supply the full path if the file is not in the same directory as the SQL Advantage executable. If the file is not found, an error is displayed.

- G

Launches SQL Advantage as a background process. There is no graphical user interface visible. This parameter is not a Sybase ISQL parameter.

- J client_charset

Specifies the character set to use on the client. SQL Advantage uses a filter to convert between client_charset and the SQL Server character set.

-J client_charset requests that SQL Server convert to and from client_charset, the character set used on the client. Use this if the client and SQL Server use the same character set. Omitting -J sets the character set to a default for the platform.

- o outputFile

Specifies the name of a file in the current directory to store the output results (and messages, if preference is set) from SQL Advantage.

- P password

Specifies the current user's SQL Server password.

- v

Displays the "About SQL Advantage" dialog after launching.

- X

Initiates the login connection to the server with client-side password encryption.

- y sybaseDir

Specifies a SYBASE directory other than the default $SYBASE directory.

- z language

Specifies an alternate language in which to display SQL Server-generated prompts and messages. Without this parameter, SQL Advantage uses the server's default language.

Unsupported Command Line Parameters

All command line parameters, other than those listed in Tables
A-1 and A-2 are unsupported. See the Open Client/Server Supplement for a complete listing and descriptions of isql command line parameters.

Input/Output (I/O) Redirection

You can redirect input and results data to and from external files only from the command line.

SQL Advantage supports entering the parameters listed in
Table A-3 on the command line for redirection.

Table A-3: Parameters supported for redirection

Parameter

Description

-i input

Open SQL Advantage with the input script as specified in the input file. Once the input file is loaded, you may edit or extend the script file or add new statements.

-o output

During the lifetime of the current application, you may redirect the default output to an output file by changing the output options. The output is written as a text file (*.txt) to the file specified in output. The output is redirected for the whole session and no results are displayed in the result window. All result outputs are appended to the output file. If SQL Advantage is launched with an existing output file name, it will be replaced.

Note: 1. When results are redirected to an output file, it defaults to Text Output format preference.
2. An error message is displayed when you attempt to access a file without having read/write permissions on that file.
3. If the first parameter is not preceded by the minus symbol (), the parameter is assumed to represent the input filename.
4. Spaces are not required between parameters and their values.

Examples

  1. sqladv -Ubarney -Ppurple -SJURASSIC

    Invokes SQL Advantage with the login name "barney," password "purple," and SQL Server "JURASSIC." If everything works correctly, the initial session will log you in and connect you.

  2. sqladv -P yabbadabbadoo -U flintstone -SBEDROCK -o rocklist.txt

    Logs Fred "flintstone" into the "BEDROCK" SQL Server, and directs all query results to the output file named rocklist.txt. The order of the parameters does not matter.

  3. sqladv yearend.txt

    Brings up the editor with the input file yearend.txt preloaded into the initial session window. If you include login parameters, SQL Advantage executes the SQL statements within the input file immediately after connecting to the specified server.


Exiting SQL Advantage [Table of Contents] Appendix B: Error Messages