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, data sources are held in the Registry. On UNIX operating systems, data sources are held in the .odbc.ini file. Use -iqdsn for batch operations.

Syntax

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

Parameters

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

Table 3-2: iqdsn major options

Major option

Description

-l

List either all data sources.

-d dsn

Delete the named data source.

-g dsn

List (get) details about the named data source.

-w dsn [ details-options ]

Create (write) a data source definition.

-cl

List available connection parameters.

Table 3-3: 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-4: 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 file name

-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 if you specify a a connection parameter value 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.

Delete the named data source (-d) Deletes the named data source. 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.

Create (write) a data source definition (-w) Creates a new data source, or overwrites one if one of the same name exists. 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.

See Chapter 4, “Connection and Communication Parameters” in System Administration Guide: Volume 1.

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

See “Encryption connection parameter [ENC]” in Chapter 4, “Connection and Communication Parameters” in the System Administration Guide: Volume 1.

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

See “LogFile connection parameter [LOG]” in Chapter 4, “Connection and Communication Parameters” in the System Administration Guide: Volume 1.

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.

See “CommBufferSize connection parameter [CBSize]” in Chapter 4, “Connection and Communication Parameters” in the System Administration Guide: Volume 1.

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.

See “DisableMultiRowFetch connection parameter [DMRF]” in Chapter 4, “Connection and Communication Parameters” in the System Administration Guide: Volume 1.

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

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

See “LivenessTimeout connection parameter [LTO]” in Chapter 4, “Connection and Communication Parameters” in the System Administration Guide: Volume 1.

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.

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 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 data sources along with their associated connection string:

iqdsn -l -b

Report the connection string for user data source MyDSN:

iqdsn -g 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 utility asks you if you want to overwrite it.

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” in the System Administration Guide: Volume 1.