Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
Creates, modifies, and deletes SQL Anywhere services.
dbsvc [ modifier-options ] -d svc
dbsvc [ modifier-options ] -g svc
dbsvc [ modifier-options ] -l
dbsvc [ modifier-options ] -u svc
dbsvc [ modifier-options ] creation-options -w svc details
dbsvc [ modifier-options ] -x svc
<full-executable-path> [ options ]
Reads in options from the specified environment variable or configuration file. See Configuration files.
To protect passwords or other information in the configuration file, you can use the File Hiding utility to obfuscate the contents of the configuration file. See File Hiding utility (dbfhide).
|-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, not including the password.|
|-l||Lists the available SQL Anywhere services.|
|-u service-name||Starts the service named service-name.|
|-x service-name||Stops the 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 cannot delete a service while it is running.
You must supply the full path to the executable that you want to use as a service, as the account under which the service is running may not have the appropriate SQL Anywhere installation directory in its path.
You must supply parameters appropriate for the service you are creating.
Names the Microsoft Windows account. All services run under a Microsoft Windows account. If you run under an account you have created, you must name the account with the -a option and supply a password with the -p option.
The Login as a Service permission is required for all accounts other than the LocalSystem account. If an account does not have the Login as a Service permission enabled, you are prompted to enable it. If the -y option is also specified, dbsvc attempts to grant the Login as a Service permission without prompting you. If the -q option is specified without the -y option, you are not prompted to grant the Login as a Service permission and dbsvc fails.
|-as||Runs the service under the Microsoft Windows LocalSystem account. No password is required. One of -a or -as must be used. All services run under a Microsoft Windows account.|
|-i||Displays an icon that you can double-click to display the database server messages window.|
|-p password||Specifies the password for the account under which the service runs. Use this option with the -a option.|
|-rg dependency,...||Specifies one or more load ordering groups that must be started before the service being created is allowed to start.|
Specifies that all the services in the list must have started before the service being created is allowed to start.
You can specify the display name or the service name. Service names are verified to see if they already exist. If the specified service name cannot be found, the Service utility (dbsvc) checks to see if there is a service with a matching display name.
It is recommended that you create a dependency on the Transport Data Interface (TDI) for TCP/IP to ensure that the connection starts correctly. For more information about the TDI, see http://msdn.microsoft.com/en-us/library/ms797340.aspx.
|-s startup||Sets startup behavior for SQL Anywhere services. You can set startup behavior to Automatic, Manual, or Disabled. The default is Manual.|
|-sd description||Provides a description of the service. The description appears in the Windows Service Manager.|
Provides a name for the service. This name appears in the Windows Service Manager. If you do not specify the -sn option, the default service name is SQL Anywhere - svc. For example, the following service is named SQL Anywhere - myserv by default.
To have the service name myserv appear in the Windows Service Manager, you need to run the following (entered all on one line):
Specifies the type for this service. You can choose from the following types (the alternate name is listed in parentheses):
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.
If the specified service does not exist, the command to delete the service is generated. For example, if service_1 does not
exist on the computer,
If the service does not use the LocalSystem account, there is no way to retrieve the password, so it is not included in the
command that is generated. If you created the service with
Writes output from the Service utility (dbsvc) to the specified file. The -o option must be specified before the -d, -g, -l, -u, -w, and -x options. For example:
In this case, the output from dbsvc is logged to out1.txt, and the output from the database server is logged to c:\out2.txt when the database server is started.
|-q||Suppresses messages to the database server messages window. If you specify -q, it is also recommended that you specify a file where messages are logged using the -o option. 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 Windows. You must be a member of the Administrators group on the local computer to use the Service utility (dbsvc).
You can access the Service utility in the following ways:
From Sybase Central, using the Create Service Wizard.
At a command prompt, using the Service utility (dbsvc).
Exit codes are 0 (success) or non-zero (failure).
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 "C:\Program Files\SQL Anywhere 16\Bin32\dbeng16.exe" -n myeng -c 8m "c:\temp\mysample.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 -s auto -t network -w mynetworkserv "C:\Program Files\SQL Anywhere 16\Bin32\dbsrv16.exe" -x tcpip -c 8m "c:\temp\mysample.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 dependent on the Workstation service and the TDI group:
dbsvc -rs lanmanworkstation -rg TDI -w ...
Create a service called mysyncservice:
dbsvc -as -s manual -t dbmlsync -w mysyncservice "C:\Program Files\SQL Anywhere 16\Bin32\dbmlsync.exe" -c "SQL Anywhere 16 CustDB"
Generate the command to create the service_1 service and output it to a file called restoreservice.bat:
dbsvc -cm -g service_1 > restoreservice.bat
The restoreservice.bat file contains the following:
dbsvc -t Standalone -s Manual -as -y -w "service_1" "C:\Program Files\SQL Anywhere 16\Bin32\dbeng16.exe"
Create a MobiLink listener service that is started manually:
dbsvc -as -i -w myListener "C:\Program Files\SQL Anywhere 16\Bin32\dblsn.exe" "@c:\temp\dblsn.opt"
Start the myListener service:
dbsvc -u myListener
Stop the myListener service:
dbsvc -x myListener
Create a Volume Shadow Copy Service (VSS) service that is started automatically when the database server starts:
dbsvc -as -s Automatic -t vss -w SAVSSWriter "C:\Program Files\SQL Anywhere 16\Bin32\dbvss16.exe"
Create an OData service using the options specified in the server.properties file:
dbsvc -as -t OData -w MyODataServer "C:\Program Files\SQL Anywhere 16\Bin64\dbosrv16.exe" "C:\server.properties"
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|