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 4-2: iqdsn major options

Major option

Description

-l

Lists the available Sybase IQ ODBC data sources. You can modify the list format using the -b or -v options.

-d dsn

Deletes the named data source. If you supply -y, any existing data source is overwritten without confirmation.

-g dsn

List the definition of the named data source. You can modify the format of the output using the -b or -v option.

-w dsn [ details-options ]

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.

-cl

This convenience option lists the connection parameters supported by the iqdsn utility.

Table 4-3: iqdsn modifier-options

Modifier option

Description

-b

Brief. Format the output of the list as a single line connection string.

-or

Creates a data source for the iAnywhere Solutions Oracle driver when specified with the -c option.

For example:

dbdsn -w MyOracleDSN -or -c Userid=DBA;Password=sql;SID=abcd;ArraySize=500;ProcResults=y

You can specify the -cl option with the -or option to obtain a list of the connection parameters for the iAnywhere Solutions Oracle driver.

See "iAnywhere Solutions Oracle driver" in SQL Anywhere Server – Database Administration.

-q

Quiet. Do not print the informational banner.

-v

Verbose. Format the output of the list over several lines, as a table.

-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

Automatically delete or overwrite each file without prompting you for confirmation.

Table 4-4: iqdsn details-options

Details option

Description

-c "keyword=value;..."

Specify connection parameters as a connection string. See Chapter 4, “Connection and Communication Parameters” in the System Administration Guide: Volume 1.

-ec encryption type

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.

-o filename

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.

-p size

Set 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.

-r

Disable multiple record fetching. By default, when the database server gets a simple fetch request, the application asks for extra rows. Use the -r option to disable this behavior. See “DisableMultiRowFetch connection parameter [DMRF]” in Chapter 4, “Connection and Communication Parameters” in the System Administration Guide: Volume 1.

-tl seconds

Client liveness timeout period. 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.

-x list

List network drivers to run.

-z

Provide diagnostic information on communications links on startup.

server-name

Connect to the named database server. Only the first 40 characters are used. See Chapter 1, “Running the 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.

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