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

SQL Anywhere 12.0.1 » SQL Anywhere Server - Database Administration » Starting and connecting to your database » SQL Anywhere database connections


Connecting using a data source with a connection string (Sybase Central or Interactive SQL)

To specify a connection string in the Connect window, choose the Connect With A Connection String option. This option is useful if you have an ODBC data source and you want to specify additional or different parameters when you connect.


The connection string in this procedure uses the DSN connection parameter to connect to the SQL Anywhere 12 Demo data source. This 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 need to start them. For example, run the following command to start the sample database:

dbeng12 -n SampleServer "%SQLANYSAMP12%\demo.db"

Context and remarks

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. See Connection parameter syntax rules.

 Connect using a data source with a connection string (Sybase Central or Interactive SQL)
  1. In Sybase Central or Interactive SQL, open the Connect window. See Opening the Connect window (Sybase Central).

  2. Complete the following fields to connect to the database:

    1. In the Authentication dropdown list, click Database.

    2. In the User ID field, type a user name.

    3. In the Password field, type a password for the user.

    4. In the Action dropdown list, click Connect With A Connection String.

    5. In the Parameters field, type connection parameters in a semicolon delimited list of parameter=value pairs. For example:

      -c DSN=SQL Anywhere 12 Demo;ServerName=SampleServer

      The database server and the database starts and Interactive SQL connects to the database. The database server is named SampleServer.


      Your computer may be running software that has an embedded SQL Anywhere server, in which case there could be multiple servers running without you realizing it. You should always specify the server name (ServerName=server-name).

  3. Click Connect.


The administration tool connects to the database.



 See also