Data Source utility (iqdsn)

The Data Source utility is a cross-platform alternative to the ODBC Administrator for creating, changing, deleting, describing, and listing Sybase IQ ODBC data sources. On Windows operating systems, the data sources are held in the registry. On UNIX operating systems, the data sources are held in the .odbc.ini file. This command-line utility is useful for batch operations.

Syntax

iqdsn [ modifier-options ]
{ –l [ u ] [ s ] [ qq ]
| –d [ u ] [ s ]dsn 
| –g [ u ] [ s ] dsn 
| –w [ u ] [ s ] dsn [details-options;...] 
| –cl [ qq ] }

Parameters

The following tables list the available options for the iqdsn utility.

Table 3-9: iqdsn major options

Major option

Description

–l [ u ] [ s ] [ qq ]

List either all Sybase IQ users or all Sybase IQ system data sources. You can also list both user and system data sources. User data sources is the default. Using –qq with this option lists the DSNs without any banner or titles.

–d [ u ] [ s ] dsn

Delete the named Sybase IQ user or Sybase IQ system data source. User data sources is the default.

–g [ u ] [ s ] dsn

List (get) details about the named Sybase IQ user or Sybase IQ system data source. User data sources is the default.

–w [ u ] [ s ] dsn [ details-options ]

Create (write) a user or system data source definition. User data sources is the default.

–cl [ qq ]

List available connection parameters. Using –qq with this option lists the available connection parameters without any banner or titles

Table 3-10: iqdsn modifier-options

Modifier option

Description

–b

Brief. Print connection string for the data source

–q

Quiet. Do not print banner

–v

Verbose. Print connection parameters in tabular form

-va

Verbose All. Print connection parameters in same format as -v, but also include other hidden parameters. Use this option to display ODBC driver qualifier needed for remote data access on those UNIX platforms that support such access, or for some third party driver managers.

–y

Delete or overwrite data source without confirmation

Table 3-11: iqdsn details-options

Details option

Description

–c "keyword=value;..."

Supply database connection parameters

–ec encryption type

Encrypt all network packets

–o filename

Write client message to filename

–p size

Set maximum network packet size

–r

Disable multiple record fetching

–tl seconds

Client liveness timeout period

–x list

List network drivers to run

–z

Display debugging information

server-name

Connect to named database server

Usage

The iqdsn modifier options can occur before or after the major option specification. The order makes a difference only when a connection parameter value is specified more than once. In such a case, the last value specified is used.

Major options

List defined data sources (–l) Lists the available Sybase IQ ODBC data sources. You can modify the list format using the –b or –v options. You can modify the option using the u (user) or s system) specifiers. The default specifier is u.

Delete the named data source (–d) Deletes the named data source. You can modify the option using the u (user) or s system) specifiers. u is the default specifier. If you supply -y, any existing data source is overwritten without confirmation.

List (get) details of the named data source (–g) List the definition of the named data source. You can modify the format of the output using the –b or –v option. You can modify the option using the u (user) or s system) specifiers. The default specifier is u.

Create (write) a data source definition (–w) Creates a new data source, or overwrites one if one of the same name exists. You can modify the option using the -u (user) or s system) specifiers. u is the default specifier. If you supply –y, any existing data source is overwritten without confirmation.

List available connection parameters (–cl) This convenience option lists the connection parameters supported by the iqdsn utility.

Modifier options

Print connection string for the data source (–b) Format the output of the list as a single line connection string.

Do not print banner (–q) Suppress the informational banner.

Do not print banner or titles (–qq) Suppress both the informational banner and titles. This option can only be used with the –l and the –cl options.

Print connection parameters in tabular form (–v) Format the output of the list over several lines, as a table.

Delete or overwrite data source without confirmation (–y) Automatically delete or overwrite each file without prompting you for confirmation.

Details options

Connection parameters (–c) Specify connection parameters as a connection string.

For more information, see Chapter 4, “Connection and Communication Parameters” in Sybase IQ System Administration Guide.

Encrypt network packets (–ec) Encrypt packets sent between the client application and the server.

For more information, see “Encryption connection parameter [ENC]” on page 147 in the Sybase IQ System Administration Guide.

Log output messages to file (–o) Write output messages to the named file. By default, messages are written to the console.

For more information, see “LogFile connection parameter [LOG]” on page 153 in the Sybase IQ System Administration Guide.

Operate quietly (–q) Do not display output messages. This option is available only from the command-line utility.

Set maximum network packet size (–p) The maximum packet size for network communications, in bytes. The value must be greater than 300, and less than 16000. The default setting is 1492.

For more information, see “CommBufferSize connection parameter [CBSize]” on page 138 in the Sybase IQ System Administration Guide.

Disable multiple-record fetching (–r) By default, when the database server gets a simple fetch request, the application asks for extra rows. You can disable this behavior by using this option.

For more information, see “DisableMultiRowFetch connection parameter [DMRF]” on page 145 in the Sybase IQ System Administration Guide.

Set client liveness timeout (–tl) Terminates connections when they are no longer intact. The value is in seconds.

The default is server setting, which in turn has a default of 120 seconds.

For more information, see “LivenessTimeout connection parameter [LTO]” on page 152 in the Sybase IQ System Administration Guide.

Set communications links (–x) A comma separated list of network drivers to run.

For more information, see “CommLinks connection parameter [Links]” on page 139 in the Sybase IQ System Administration Guide.

Display debugging information (–z) Provide diagnostic information on communications links on startup.

Server name Connect to the named server. Only the first 40 characters are used.

For more information, see Chapter 1, “Running the Database Server.”

Examples

Write a definition of the data source newdsn. Do not prompt for confirmation if the data source already exists.

iqdsn -y -x tcpip -w newdsn -c "uid=DBA;pwd=SQL" -v

You can also change the order of options:

iqdsn -w newdsn -c "uid=dba;pwd=sql" -x tcpip -y

List all known user data sources, one data source name per line:

iqdsn -l

List all known system data sources, one data source name per line:

iqdsn -ls

List all data sources along with their associated connection string:

iqdsn -l -b

Report the connection string for user data source MyDSN:

iqdsn -g MyDSN

Report the connection string for system data source MyDSN:

iqdsn -gs MyDSN

Delete the data source BadDSN, but first list the connection parameters for BadDSN and prompt for confirmation:

iqdsn -d BadDSN -v

Delete the data source BadDSN without prompting for confirmation.

iqdsn -d BadDSN -y

Create a data source named NewDSN for the database server MyServer:

iqdsn -w NewDSN -c "uid=DBA;pwd=SQL;eng=bar"

If a NewDSN already exists, the previous definition is overwritten.

The following example connects to the sample database server. The server name sample overrides the previous specified value of MyServer:

iqdsn -w NewDSN-c "uid=DBA;pwd=SQL;eng=MyServer" sample

List all connection parameter names and their aliases:

iqdsn -cl

See also

“Working with ODBC data sources” and “Using ODBC data sources on UNIX” in Chapter 3, “Sybase IQ Connections” of the Sybase IQ System Administration Guide.