Introducing SQL Anywhere Studio
Tutorial: Connecting to the Sample Database
This section describes how to start the database server running the sample database. In the documentation, starting a database is often used as a convenient way of saying starting a database server running a database . Depending on the operating system you are using, you have a choice of how to start the database server running the sample database.
Start the database server running the sample database (Windows)
From the Start menu, choose Programs
This starts a personal server running the sample database. The server appears as an icon in the system tray, at the opposite end of the Taskbar from the Start button.
Start the database server running the sample database (Command prompt)
At a command prompt, change to your SQL Anywhere installation directory. On Windows operating systems, the default installation directory is C:\Program Files\Sybase\SQL Anywhere 9.
Start the database server running the sample database.
The way you start the database server depends on your operating system, and on whether you wish to connect to the database from other machines on the network.
On Windows or UNIX operating systems, enter the following command:
dbeng9 -n asademo9 asademo.db
On Windows or UNIX operating systems, if you wish to connect to the database server from other machines on the network, enter the following command:
dbsrv9 -n asademo9 asademo.db
On NetWare, enter the following command:
load dbsrv9.nlm -n asademo9 asademo.db
The database server starts.
You can display the database server window in Windows by double-clicking the Adaptive Server Anywhere icon in the system tray at the bottom of your screen.
The server window displays the following information:
The server name The name in the title bar (in this case asademo9) is the server name. A server name is assigned each time a database server is started. This name can be used by applications when they connect to a database.
Startup information When a database server starts, it sets aside some memory that it uses when processing database requests. This is called the cache. The amount of cache memory appears in the window. The cache is organized in fixed-size pages, and the page size also appears in the window.
Database information The names of the database file and its transaction log file appear in the window.
In this case, the startup cache size and page size are the default values. For many purposes, default startup options are fine. For more advanced use, you can provide explicit database server startup options.
For a complete list of startup options, see The database server.
The database server is ready to accept connections from database applications. In the next lesson, you connect to the sample database from the Interactive SQL database administration utility.