Creates, modifies, and deletes SQL Anywhere services.
dbsvc [ modifier-options ] -d svc
dbsvc [ modifier-options ] -g svc
dbsvc [ modifier-options ] -l
dbsvc [ modifier-options ] -status svc
dbsvc [ modifier-options ] -u svc
dbsvc [ modifier-options ] creation-options -w svc details
dbsvc [ modifier-options ] -x svc
full-executable-path [ options ]
|-d service-name||Removes the named service from the list of services. If you supply -y, the service is deleted without confirmation.|
|-g service-name||Lists the definition of the service.|
|-l||Lists the available SQL Anywhere services.|
|-u service-name||Starts a service named service-name.|
|-w executable parameters||
Creates a new service, or overwrites one if one of the same name exists. If you supply -y, the existing service is overwritten without confirmation.
You must supply parameters appropriate for the service you are creating.
|-x service-name||Stops a service named service-name.|
All services run under a Linux account. If you run under an account you have created, you must name the account with the -a option.
The Login as a Service privilege is required for all accounts other than the daemon account.
|-as||All services run under a Linux account. When -as is specified, the service runs under the Linux daemon account. No password is required. One of -a or -as must be used.|
|-od||Specify the location of the system information file (if required).|
|-pr||Set the nice level for the Linux process.|
|-rl||Specify the runlevels on which to start the service.|
|-rs||Specify service dependency when creating a service.|
|-s||Set the startup behavior for SQL Anywhere services. You can set startup behavior to Automatic or Manual. The default is Manual.|
|-status||Return the state the service is running.|
|-t type|| Specifies the type for this service. You can choose from the following types:
The default setting for all service types is Standalone.
|-cm||Displays the command used to create the service. This option can be used to output the creation command to a file, which can then be used to add the service on another computer or restore a service to its original state if changes have been made to it. You must specify the -g option or -l option with -cm or the command fails. Specifying -g displays the creation command for the specified service, while specifying -l displays the creation command for all services.|
|-q||Suppress messages to the console. If you specify this option when modifying or deleting an existing service, you must also specify -y or the operation will fail.|
|-y||Automatically performs the action without prompting for confirmation. This option can be used with the -w or -d options. If you specify -q when modifying or deleting an existing service, you must also specify -y or the operation will fail.|
A service runs a database server or other application with a set of options. This utility provides a comprehensive way of managing SQL Anywhere services on Linux.
Because services typically run in a different environment, it is recommended that you fully qualify the name of the database file when creating a service. It is also recommended that you do not use spaces in data source names.
Like most Linux services, the dbsvc utility creates service files in /etc/init.d. The naming convention for the service is SA_service-name. For example, if you created a service named myserv, you could issue the following command to start the service:
The following command gets the status of the service:
The following command returns usage information for the service:
Create a personal server service called myserv, which starts the specified server with the specified parameters. The server runs as the LocalSystem user:
dbsvc -as -w myserv -n myeng -c 8m "/tmp/demo.db"
Create a network server service called mynetworkserv. The server runs under the local account, and starts automatically when the computer is restarted:
dbsvc -as -t network -w mynetworkserv -x tcpip -c 8m "/tmp/demo.db"
List all details about service myserv:
dbsvc -g myserv
Delete the service called myserv, without prompting for confirmation:
dbsvc -y -d myserv
Create a service called mysyncservice:
dbsvc -as -t dbmlsync -o syncinfo.txt -w mysyncservice -c "/tmp/CustDB.db"
Generate the command to create the service_1 service and output it the console:
dbsvc -cm -g service_1
The console contains the following:
'dbsvc -t Standalone -as -y -w "service_1" -n'
Start a service using dbsvc:
dbsvc -u myserv
Use dbsvc to stop a service:
dbsvc -x myserv
Use dbsvc to obtain the status of a service:
dbsvc -status myserv
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|