Collection Contents Index CHAPTER 3.  Connection and Communication Parameters Network communications parameters pdf/chap3.pdf

Reference Manual
   CHAPTER 3. Connection and Communication Parameters     

Connection parameters


This section describes each of the connection parameters that can be included in connection strings or data sources.

Notes 

Top of page  Agent connection parameter

Function 

To specify a local or network connection.

Usage 

Anywhere

Values 

String. Must be any or server.

Default 

No value.

Description 

If you wish to ensure that you connect to a server on a network, and do not start a personal database server, specify Agent=server to ensure a connection to the appropriate agent.

Example 

...
agent=server
...

Top of page  AutoStart connection parameter [Astart]

Function 

To prevent a local database server from being started if no connection is found.

Usage 

Anywhere.

Default 

Yes

Description 

By default, if no server is found during a connection attempt, and a database file is specified, then a database server is started on the same machine. You can turn this behavior off by setting the AutoStart parameter to OFF in the connection string.

Example 

[My Sample Database]
DatabaseFile=c:\asa6\asademo.db
Autostart=No
UserID=dba
ENG=network_server

Top of page  AutoStop connection parameter [Astop]

Function 

To prevent a database from being unloaded as soon as there are no more open connections.

Usage 

Embedded databases.

Default 

Yes

Description 

By default, any server that is started from a connection string is stopped when there are no more connections to it. Also, any database that is loaded from a connection string is unloaded as soon as there are no more connections to it. This behavior is equivalent to Autostop=Yes.

If you supply Autostop=No, any database that you start in that connection is not unloaded when there are no more connections to it. As a consequence, the database server will not be shut down either.

The AutoStop parameter is used only if you are connecting to a database that is not currently running. It is ignored if the database is already loaded.

Example 

[Sample Embedded Database]
DatabaseFile=c:\asa6\asademo.db
Autostop=No
UserID=dba

Top of page  CommAutoStop connection parameter [CAstop]

Function 

To unload network communications ports as soon as there are no more open connections from the client machine.

Usage 

Network server.

Default 

No

Description 

When the client library makes a connection over a network, it loads one or more network ports into memory.

By default, a network port that is started from a connection string is not unloaded when there are no more connections to it. This behavior is equivalent to CommAutostop=No.

If you supply CommAutostop=Yes, any network ports you start from that connection are unloaded when there are no more connections using them.

Example 

[Sample Connection]
ServerName=network_server
CommAutostop=Yes
UserID=dba
PWD=sql
CommLinks=tcpip

Top of page  CommBufferSize connection parameter [CBSize]

Function 

To set the maximum size of communication packets, in bytes.

Usage 

Network server only.

Values 

Integer

Default 

512

Description 

The CommBufferSize parameter specifies the size of communications packets, in bytes. The minimum value of CommBufferSize is 280, anf the maximum is 16000. If the specified packet size is larger than that of the database server, the server's packet size is used.

The maximum size of a packet on a network is set by the protocol stack. If you set CommBufferSize to be larger than that permitted by your network, the largest buffers are broken up by the network software. You should set the buffer size to be somewhat smaller than that allowed by your network, because the network software may add information to each buffer before sending it over the network.

This corresponds to the SQL Anywhere Version 5 dbclient -p command-line switch.

Examples 

Top of page  CommBufferSpace connection parameter [CBSpace]

Function 

To specify the amount of space to allocate on startup for network buffers, in kilobytes.

Usage 

Network servers only

Values 

Integer

Default 

100.

Description 

Specify amount of space to allocate on startup for network buffers, in kilobytes. The default is 100.

The value is a global setting, for all connections.

Examples 

Top of page  CommLinks connection parameter [Links]

Function 

To specify network communications links.

Usage 

Connections to the network server only.

Default 

Use all communications links (network protocols) supported on the current operating system.

See also 

Network communications parameters

Client/Server Communications.

Description 

If no CommLinks parameter is specified in a connection string, the network library is not started and no search is made for a server other than on the current machine. This behavior is equivalent to CommLinks = None.

If a CommLinks parameter is supplied, the named communication links are started and used when searching for a database server. The CommLinks parameter is required for connections to a network server.

Available values of the CommLinks parameter are as follows:

You may wish to use a specific protocol, as opposed to ALL, for the following reasons:

Additional network communications parameters may be provided for each link, to tune the broadcast behavior of the link.

The CommLinks parameter corresponds to the database server -x command-line switch. The default behavior of the network server is equivalent to -x ALL

Examples 

Top of page  ConnectionName connection parameter [CON]

Function 

Names a connection, to make switching to it easier in multi-connection applications.

Usage 

Not available for ODBC.

Default 

No connection name.

Description 

An optional parameter, providing a name for the particular connection you are making. You may leave this unspecified unless you are going to establish more than one connection, and switch between them.

The Connection Name is not the same as the data source name.

Examples 

CON=First Con

Top of page  DatabaseFile connection parameter [DBF]

Function 

The database file to which you want to connect.

Usage 

Embedded databases

Default 

There is no default setting.

Description 

To load and connect to a specific database file.

Example 

DBF=c:\asa6\asademo.db

Top of page  DatabaseName connection parameter [DBN]

Function 

Identifies a loaded database to which a connection needs to be made.

Usage 

Running local databases or network servers.

Default 

There is no default setting.

Description 

Whenever a database is started on a server, it is assigned a database name. The default database name is the name of the database file with the extension and path removed.

Examples 

Top of page  DatabaseSwitches connection parameter [DBS]

Function 

To provide database-specific switches when starting a database.

Usage 

Connecting to a running server when the database is not loaded.

Default 

No switches

See also 

The database server

StartLine connection parameter

Description 

You should supply DatabaseSwitches only if you are connecting to a database that is not currently running. When the server starts the database specified by DatabaseFile, the server uses the supplied DatabaseSwitches as command line options to determine startup options for the database.

Only database switches can be supplied using this parameter. Server switches must be supplied using the START connection parameter.

Examples 

Top of page  DataSourceName connection parameter [DSN]

Function 

Tells the ODBC driver manager or Embedded SQL library where to look in the odbc.ini file or registry to find ODBC data source information.

Usage 

Anywhere

Default 

There is no default data source name.

See also 

FileDataSourceName connection parameter

Description 

It is common practice for ODBC applications to send only a data source name to ODBC. The ODBC driver manager and ODBC driver locate the data source, which contains the remainder of the connection parameters.

In Adaptive Server Anywhere, Embedded SQL applications can also use ODBC data sources to store connection parameters.

Examples 

DSN=Dynamo Demo

Top of page  Debug connection parameter [DBG]

Function 

To provide diagnostic information on communications links on startup.

Usage 

Network server only.

Default 

No diagnostic information.

See also 

Logfile connection parameter

Description 

If you are having trouble establishing a connection to a network server, set the Debug connection parameter to Yes and the Logfile parameter to a log file name. Diagnostic information is then placed in the log file.

Examples 

Top of page  DisableMultiRowFetch connection parameter [DMRF]

Function 

To turn off multi-row fetches across the network.

Usage 

Network server only.

Default 

Yes

Description 

By default, when the database server gets a simple fetch request, it fills one network packet with several rows so that subsequent sequential fetches do not require network traffic. This is often referred to as blocking of fetches.

Examples 

Top of page  EngineName connection parameter [ENG]

Function 

Synonym for ServerName. The name of a running database server to which you want to connect.

Usage 

Network servers or running personal servers.

Default 

The default local database server.

Description 

EngineName is not needed if you wish to connect to a local database server and only one server is running.

You need to supply an EngineName only if more than one database server is running, or you wish to connect to a network server.

In the Sybase Central and Interactive SQL Connect dialog box, and in the ODBC Administrator, this is the Server Name field

Examples 

Top of page  EncryptedPassword connection parameter [ENP]

Function 

To provide a password, stored in an encrypted fashion in a data source.

Usage 

Anywhere

Default 

None

Description 

Data sources are stored on disk as a file or in the registry. Storing passwords on disk may present a security problem. For this reason, when you enter a password into a data source, it is stored in an encrypted form.

If both Password and EncryptedPassword are specified, Password takes precedence.

Top of page  Encryption connection parameter [ENC]

Function 

To encrypt packets transmitted from the client machine over the network.

Usage 

Network server only.

Values 

Boolean

Default 

No encryption.

Description 

You can use this parameter if you are concerned about the security of network packets. Encryption does affect performance marginally.

This parameter corresponds to the SQL Anywhere Version 5 dbclient -e command-line switch.

Using the -e switch on the dbsrv6 command line encrypts packets for all clients regardless of whether the Encryption parameter is used at the client.

Examples 

Top of page  FileDataSourceName connection parameter [FileDSN]

Function 

The FileDataSourceName parameter tells the client library that there is an ODBC file data source holding information about the database to which you want to connect.

Both ODBC and Embedded SQL applications can use File data sources

Usage 

Anywhere

Default 

There is no default name.

See also 

DataSourceName connection parameter

Description 

File data sources hold the same information as ODBC data sources stored in the registry. File data sources can be easily distributed to end users, so that connection information does not have to be reconstructed on each machine.

Examples 

Top of page  Integrated connection parameter [INT]

Function 

To use the integrated login facility.

Usage 

Anywhere

Default 

No

See also 

LOGIN_MODE option

Description 

The Integrated parameter has the following settings:

For a client application to use an integrated login, the server must be running with the LOGIN_MODE database option set to Mixed or Integrated.

Examples 

Top of page  LivenessTimeout connection parameter [LTO]

Function 

To control the termination of connections when they are no longer intact.

Usage 

Network server only, and only on TCP/IP and IPX communications protocols.

Values 

Integer

Default 

If no LivenessTimeout value is set, the liveness timeout is controlled by the setting on the server, which defaults to 120 seconds.

Description 

A liveness packet is sent periodically across a client/server TCP/IP or IPX communications protocol to confirm that a connection is intact. If the client runs for the liveness timeout period without detecting a liveness packet, the communication is severed.

Liveness packets are sent at an interval of one quarter of the LivenessTimeout value.

When the communication is severed, the client machine forgets the address of the server. It looks the address up next time there is a connection to the server from that machine, dropping all current connections to that server.

Examples 

Top of page  Logfile connection parameter [LOG]

Function 

To send client error messages and debugging messages to a file.

Usage 

Network server only.

Default 

No log file.

See also 

Debug connection parameter

Description 

If you want to save client error messages and debugging messages in a file, use the Logfile parameter.

If the file name includes a path, it is relative to the current working directory of the client application.

Examples 

Top of page  Password connection parameter [PWD]

Function 

To provide a password for the connection.

Usage 

Anywhere

Default 

No password provided.

See also 

EncryptedPassword connection parameter

Description 

Every user of a database has a password. The password must be supplied for the user to be allowed to connect to the database.

The password parameter is not encrypted. If you are storing passwords in a data source, you should use the EncryptedPassword parameter. Sybase Central and the Adaptive Server Anywhere ODBC configuration tool both use encrypted parameters.

If both Password and EncryptedPassword are specified, Password takes precedence.

Examples 

Top of page  ServerName connection parameter [ENG]

Synonym for EngineName connection parameter.

Top of page  StartLine connection parameter [START]

Function 

To start a database server running from an application.

Usage 

Embedded databases.

Default 

No StartLine parameter

Description 

You should supply a StartLine parameter only if you are connecting to a database server that is not currently running. The StartLine parameter is a command line to start a personal database server.

For Info     For a detailed description of available command line switches, see The database server.

Examples 

Top of page  Unconditional connection parameter [UNC]

Function 

To stop a server using dbstop even when there are connections to the server.

Usage 

Anywhere

Default 

No

See also 

The DBSTOP command-line utility

Description 

The dbstop command-line utility shuts down a database server. If you specify Unconditional=Yes in the connection string, the server is shut down even if there are active connections. If Unconditional is not set to Yes, then the server is shut down only if there are no active connections.

Examples 

Top of page  Userid connection parameter [UID]

Function 

The user ID with which you log on to the database.

Usage 

Anywhere

Default 

None

Description 

You must always supply a user ID when connecting to a database

Examples 

Top of page  

Collection Contents Index CHAPTER 3.  Connection and Communication Parameters Network communications parameters pdf/chap3.pdf