To start a server and database, and then connect to this local database all from the same computer, you can use the Connect window with the Start and connect to a database on this computer option.
Context and remarks
Run the following command to start Interactive SQL and start and connect to the sample database:
dbisql -c "UID=DBA;PWD=sql;ServerName=Demo12;DBF=%SQLANYSAMP12%\demo.db"
Open the Connect window in Sybase Central or Interactive SQL. See Opening the Connect window (Sybase Central).
Complete the following fields to connect to the database:
In the Authentication dropdown list, click Database.
In the User ID field, type a user name. For example, type DBA.
In the Password field, type the password for the user. For example, type sql.
In the Action dropdown list, click Start And Connect To A Database On This Computer.
In the Database File field, specify the database file path, file name, and file extension. For example, type C:\Documents and Settings\All Users\Documents\SQL Anywhere 12\Samples\demo.db.
To create a database name that is different from the file name for subsequent connections, type a name in the Database Name field. Do not specify a file path or extension.
In the Server Name field, specify a name for the server. For example, type demo12.
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).
Optional: To get a copy of the connection string that is created with this window, click Tools » Copy Connection String to Clipboard.
Discuss this page in DocCommentXchange.
|Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1|