Sybase 12.4.2 manual Using default connection parameters

Models: 12.4.2

1 536
Download 536 pages 20.34 Kb
Page 81
Image 81

CHAPTER 2 Running Adaptive Server IQ

The network library searches for a server by broadcasting over the network, which can be a time-consuming process. Once the network library locates a server, the client library stores its name and network address in a file. Users should never need to use this file directly. Adaptive Server IQ reuses this entry for subsequent connection attempts, which can be many times faster than a connection that is achieved by broadcast.

Many other connection parameters are available to assist Adaptive Server IQ in locating a server efficiently over a network. For more information see “Network communications parameters” in the Adaptive Server IQ Reference Manual.

To see how you can include connection parameters in an ODBC data source, see “Creating and editing ODBC data sources”.

Note In a subnetted network environment, it is possible to have multiple servers with the same name and port number running on different nodes in different subnets. This is true because in most situations, routers are not programmed to pass broadcast messages between subnets. If you are running in a subnetted environment, it is always safest to use specific host, port numbers, and server names to guarantee that you are connecting to the proper server and database. This is particularly true when using default connection parameters, and is required on AIX platforms.

Using default connection parameters

Default database server

You can leave many connection parameters unspecified, and instead use the default behavior to make a connection.

Note Be extremely cautious about relying on default behavior in production environments, especially if you distribute your application to customers who may install other Adaptive Server IQ or Adaptive Server Anywhere applications on their machine.

If you are connecting to a database on your local server, and more than one database has been started on that server, you need to specify the database you wish to connect to, but you can leave the server as a default:

dbn=db_name uid=user_id

61

Page 81
Image 81
Sybase 12.4.2 manual Using default connection parameters