A SQL Anywhere service runs a SQL Anywhere database server or other application with a set of command-line switches. For a full description of the command-line switches for each of the SQL Anywhere applications, see the chapter "SQL Anywhere Components" and the SQL Anywhere Network Guide .
In addition to the command-line switches, SQL Anywhere services accept other parameters that specify the account under which the service will run and the conditions under which it will start.
Changes to a service configuration do not take effect immediately. They take effect next time the service is started. The Startup option is applied next time Windows NT is started.
The following options govern startup behavior for a SQL Anywhere service:
The Configuration tab of the service property sheet provides a text box for entering command-line switches for a service. You should enter command-line switches that govern the behavior of the service in this box. You should not enter the name of the program executable in this box.
-c 20M
-n my_server
c:\sqlany50\db_1.db
c:\sqlany50\db_2.db
-c "uid=dba;pwd=sql;dbn=sademo"
my_server
The figure illustrates a sample Property sheet.
The command-line switches for a service are the same as those for the executable. For a full description of the command-line switches for each program, see the chapter "SQL Anywhere Components".
You can choose under which account the SQL Anywhere service will run. Most services run under the special LocalSystem account, and this is the default option for SQL Anywhere services. You can set the service to log on under another account by clicking Account and entering the account information.
If you choose to run the SQL Anywhere service under an account other than LocalSystem, that account must have the "log on as a service" privilege. This can be granted from the NT User Manager application, under Advanced Privileges.
Whether or not an icon for the service appears on the taskbar or desktop depends on the account that is selected, and whether Allow Service to Interact with Desktop is checked, as follows:
To change the program executable file associated with a service, click the Configuration tab on the service property sheet and enter the new path and file name in the Path of Executable box.
If you move an executable file to a new directory, you must modify this entry.
Each SQL Anywhere network server or standalone engine can run more than one database. If you wish to run more than one SQL Anywhere database at a time, we recommend that you do so by attaching new databases to your existing SQL Anywhere service, rather than by creating new services.
The new database will not be added to the service immediately. It is loaded next time the service is started.
Databases can be started on running servers by client applications, such as ISQL..
For a description of how to start a database on a server from ISQL, see "START DATABASE statement". For a description of how to implement this function in an Embedded SQL application, see the db_start_database function in the chapter "The Embedded SQL Interface". Starting a database from an application does not attach it to the service. If the service is stopped and restarted, the additional database will not be started automatically.