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


Connecting with an ODBC data source (Interactive SQL)

You can connect to a database using an ODBC data source by using the Interactive SQL utility at a command prompt, and the DataSourceName (DSN) connection parameter.


An ODBC data source for the database that you want to connect to.

The SQL Anywhere 16 Demo data source is configured to start the database server and database if they are not already running. If your ODBC data source is not configured to start the database and database server, then you must start them. For example, run the following command to start the sample database:

dbsrv16 -n demo16 "%SQLANYSAMP16%\demo.db"

Contexte et remarques

If a connection string and an ODBC data source both specify the same connection parameter, the value from the connection string is used and the value from the data source is ignored.


You do not need to enter a user ID and a password for this connection because the SQL Anywhere 16 Demo data source already contains this information.

In a production environment, it is recommended that you do not store passwords in an ODBC data source.

  • Run the following command to connect using the ODBC data source name:

    dbisql -c "DSN=SQL Anywhere 16 Demo"


Interactive SQL starts and connects to the sample database.

 See also