Creating Windows services

 Create a new service (Sybase Central)

Each network server or personal server can run more than one database. If you want to run more than one database at a time, it is recommended that you do so by adding new databases to your existing service, rather than by creating new services.

  1. In the left pane, click SQL Anywhere 12.

  2. In the right pane, click the Services tab.

  3. Click File » New » Service.

  4. Follow the instructions in the Create Service Wizard.

 Create a new service (command line)

Each network server or personal server can run more than one database. If you want to run more than one database at a time, it is recommended that you do so by adding new databases to your existing service, rather than by creating new services.

  • Run the Service utility (dbsvc) with the -w option.

    For example, to create a personal server service called myserv where the database server runs as the LocalSystem user, run the following command:

    dbsvc -as -w myserv "C:\Program Files\SQL Anywhere 12\Bin32\dbeng12.exe"
     -n william -c 8m "c:\temp\sample.db"
Note
  • Service names must be unique within the first eight characters.

  • If you choose to start a service automatically, it starts whenever the computer starts Windows. If you choose to start the service manually, you must start the service from Sybase Central each time. You may want to click Disabled if you are setting up a service for future use.

  • When creating a service in Sybase Central, type options for the executable, without the executable name itself, in the window. For example, if you want a network server to run using the sample database with a cache size of 20 MB and the name myserver, you would type the following in the Parameters text box of the Create Service Wizard in Sybase Central:

    -c 20M
    -n myserver "%SQLANY12%\demo.db"

    Line breaks are optional.

  • Choose the account under which the service will run: the special LocalSystem account or another user ID.

    For more information about this choice, see Account options.

  • If you want the service to be accessible from the Windows desktop, click Allow Service To Interact With Desktop. If this option is cleared, no icon appears in the system tray and neither do any windows appear on the desktop.

 See also