Adding, modifying, and removing services

The service icons in Sybase Central display the current state of each service using an icon that indicates whether the service is running or stopped.

To add a new service (Sybase Central)

  1. In Sybase Central, choose the server in the left pane, and then open the Services tab in the right pane.

  2. In the right pane, right-click and choose New » Service from the popup menu.

    The Create Service Wizard appears.

  3. Follow the instructions in the wizard.

You can also use the dbsvc utility to create the service. See Service utility (dbsvc) for Windows.

To remove a service (Sybase Central)

  • Choose the service and then click Edit » Delete.

To change the parameters for a service

  • Right-click the service and choose Properties from the popup menu.

Changes to a service configuration take effect the next time the service is started.

Setting the startup option

The following options govern startup behavior for MobiLink services. You can set them on the General tab of the Service Properties window.

  • Automatic   If you choose Automatic, the service starts whenever the Windows operating system starts. This setting is appropriate for database servers and other applications running all the time.

  • Manual   If you choose Manual, the service starts only when a user with Administrator permissions starts it. For information about Administrator permissions, see your Windows documentation.

  • Disabled   If you choose Disabled, the service does not start.

The startup option is applied the next time Windows is started.

Specifying command line options

The Configuration tab of the Service Properties window provides a text box for entering command line options for a service. Do not type the name of the program executable in this box.

For example, to start a MobiLink synchronization service with verbose logging, type the following in the Parameters box:

-c "dsn=SQL Anywhere 11 Demo;uid=DBA;pwd=sql"
-vc

The command line options for a service are the same as those for the executable. See MobiLink server options.

Setting account options

You can choose which account the service runs under. Most services run under the special LocalSystem account, which is the default option for services. You can set the service to log on under another account by opening the Account tab on the Service Properties window, and entering the account information.

If you choose to run the service under an account other than LocalSystem, that account must have the "log on as a service" privilege. This can be granted from the Windows User Manager application, under Advanced Privileges.

Whether or not an icon for the service appears on the taskbar or desktop depends on the account you select, and whether Allow Service To Interact with Desktop is checked, as follows:

  • If a service runs under LocalSystem, and Allow Service To Interact with Desktop is checked in the Service Properties window, an icon appears on the desktop of every user logged in to Windows XP/200x on the computer running the service. Consequently, any user can open the application window and stop the program running as a service.
  • If a service runs under LocalSystem, and Allow Service To Interact with Desktop is unchecked in the Service Properties window, no icon appears on the desktop for any user. Only users with permissions to change the state of services can stop the service.
  • If a service runs under another account, no icon appears on the desktop. Only users with permissions to change the state of services can stop the service.
Changing the executable file

To change the program executable file associated with a service in Sybase Central, click the Configuration tab on the Service Properties window and type the new path and file name in the File Name box.

If you move an executable file to a new directory, you must modify this entry.

Starting and stopping

To start or stop a service

  1. In Sybase Central, click the server in the left pane, and then open the Services tab in the right pane.

  2. Right-click the service and choose Start or Stop from the popup menu.

If you start a service, it keeps running until you stop it. Closing Sybase Central or logging off does not stop the service.

Stopping a service closes all connections to the database and stops the database server. For other applications, the program closes down.