Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » SQL Anywhere database connections » Database connections

 

Troubleshooting: connections

An understanding of how SQL Anywhere establishes connections can help you resolve connectivity problems. For information about network-specific issues, including connections across firewalls, see Communication protocols.

To establish a connection, SQL Anywhere:

  1. Locates the interface library. See Troubleshooting: The location of the interface library.

  2. Assembles a list of connection parameters. See Troubleshooting: How connections are established.

  3. Locates a database server. If the database server is not found, then SQL Anywhere starts a personal server. See Troubleshooting: How database servers are located.

  4. Locates the database. See Troubleshooting: How database servers are located.

The SQL Anywhere connection procedure is the same for:

  • Any ODBC application using the SQLDriverConnect function, which is the common connection method for ODBC applications. Many application development systems, such as Sybase PowerBuilder, belong to this class of application. The SQLConnect function is also available to ODBC applications.

  • Any client application using embedded SQL and using the recommended function for connecting to a database (db_string_connect). In addition, the CONNECT SQL statement is available for embedded SQL applications and in Interactive SQL. It has two forms: CONNECT AS and CONNECT USING. All the database utilities, including dbisqlc, use db_string_connect.

  • Any .NET application using ADO.NET. The application creates a new SAConnection object and passes the connection string to the constructor or sets the ConnectionString property. Then the application calls the Open method on the SAConnection object to connect.

  • Any ADO application using the ADODB Connection object. The Provider property is used to locate the OLE DB driver. The ConnectionString property may use DataSource as an alternative to DataSourceName and User ID as an alternative to UserID.

  • Any application using the SQL Anywhere JDBC driver to pass the URL jdbc:sqlanywhere: followed by a standard connection string as a parameter to the Driver Manager.GetConnection method.

 See also

Troubleshooting: The location of the interface library
Troubleshooting: How connections are established
Troubleshooting: How database servers are located
Troubleshooting: How the Broadcast Repeater utility locates database servers
Troubleshooting: How the Host connection parameter locates database servers
Troubleshooting: How the CommLinks=TCPIP connection parameter locates database servers
Troubleshooting: How database servers are located
Troubleshooting: How database server address information is cached in sasrv.ini for faster connections
Troubleshooting: How to test connection strings (dbping)
Troubleshooting: How to test embedded SQL and network connection performance (dbping)
Troubleshooting: Compatible protocol options for client and database servers
Troubleshooting: Common connection problems and solutions