- Getting Started
- Creating the Database
- Building the Tables
- Deploying Via Ultralite
- Conclusion
Creating the Database
Once installed, the Sybase Central tool will act as the administration console for nearly all tasks that you want to perform. Once nice thing about the SQL Anywhere Studio toolset is that most functionality is also accessible via the command-line as well, an important requirement for anyone running automated build processes, using a tool such as Ant . Figure 1 shows the variety of utilities available from within Sybase Central, including the tools needed to create and maintain Adaptive Server Anywhere (ASA) databases.
Figure 1 Sybase Central utilities.
Figures 2 through 7 illustrate the process of creating a new ASA database using Sybase Central. I stepped through this process to create a new mobile_sales.db database file (and its corresponding log file: mobile_sales.log).
Figure 2 The Create Database Wizard.
Figure 3 Specifying the log file in the Create Database Wizard.
Figure 4 Specifying Java support in the Create Database Wizard.
Figure 5 Configuring the database options in the Create Database Wizard.
Figure 6 Specifying the page size in the Create Database Wizard.
Figure 7 Specifying the collation sequence in the Create Database Wizard.
The wizard will create and run the database for you -- note the little SQL icon running in your Windows toolbar when you're done. Note that an ASA database is a "mini-server" database, running in its own process and monitoring a port for incoming requests. This is in contrast to the file-based "Ultralite" deployment option that we'll examine later in this article. Developers who build production-quality applications need to handle the deployment of all ASA runtime files (described in detail in the product documentation InstallAnywhere templates and scripts are even included!) and the ASA database process need to be started each time the system or application starts up. The easiest way to do this (for Windows 2000/XP users) is to create a Windows service that will auto-start the database when the OS starts up. Sybase includes a command-line tool (dbsvc) that will handle this for you. (More on creating Windows services can be found at http://www.sybase.com/detail?id=1009886). If you're not interested in running the database as a service, you can start any database manually by using the dbeng8 command.