sqlsrvr

Description

Windows platforms only The executable form of the Adaptive Server program, this utility is located in %SYBASE%\%SYBASE_ASE%\bin.

Syntax

sqlserver [-f] [-g] [-G] [-h] [-H] [-m] [-P] [-q] [-v] [-X]
	[-a path_to_CAPs_directive_file]
	[-b master_device_size] [k | K | m | M | g | G | t | T ]
	[-c config_file_for_server]
	[-d device_name]
	[-e path_to_error_log]
	[-i interfaces_file_directory]
	[-K keytab_file]
	[-L config_file_name_for_connectivity]
	[-M shared_memory_repository_directory]
	[-p sa_login_name]
	[-r mirror_disk_name]
	[-s server_name]
	[-T trace_flag]
	[-u sa/sso_name]
	[-w master model database]
	[-y [password] ]
	[-z page_size [ k | K ] ]

Parameters

-f

forces initialization of a device or database. You must use both -b and -w to use -f.

-g

turns off event-logging.

-G

specifies the name of the event log server.

-h

prints this help message, then exists.

-H

starts the High Availability (HA) server, if you have the HA feature installed on your Adaptive Server.

-m

starts Adaptive Server in single-user mode.

-q

treats quiesced databases as “in recovery.”

-v

prints the version number and copyright message for sqlsrvr and then exits.

-X

starts this server as sybmon, not dataserver.

-a path_to_CAPs_directive_file

specifies the path to the CAPs directive file.

-b master_device_size [k | K | m | M | g | G | t | T ]

specifies the size of the master device.

-c config_file_for_server

specifies the full path name of an Adaptive Server configuration file. Use this parameter to start Adaptive Server with the configuration values in the specified configuration file.If you specify a configuration file with the sqlsrvr -c parameter, make sure all the parameters in this configuration file are compatible before you boot the server. If some of the configuration parameters are incompatible, the server may not boot. To avoid this, do not specify a configuration file when you build the master device. The build phase uses all default settings when you do not specify a configuration file.For more information, see the System Administration Guide.

-d device_name

is the full path name of the device for the master database. The master database device must be writable by the user who starts Adaptive Server. The default master database device name is d_master.

-e errorlogfile

is the full path name of the error log file for Adaptive Server system-level error messages.

-i interfaces_file_directory

specifies the directory location of the interfaces file to search when connecting Adaptive Server. If -I is omitted, sqlsrvr looks for a file named interfaces in the directory pointed to by your SYBASE environment variable.

-K keytab_file

specifies the path to the keytab file used for authentication in DCE.

-L config_file_name_for_connectivity

specifies the name the configuration file for connectivity.

-M sharedmem_directory

places shared memory files in the specified directory instead of in the default location, %SYBASE%. If sharedmem_directory starts with “\”, the directory name is assumed to be absolute. Otherwise, the directory name is interpreted relative to %SYBASE%.

-p sso_login_name

specifies the login name of a System Security Officer when starting Adaptive Server, for the purposes of getting a new password for that account. Adaptive Server generates a random password, displays it, encrypts it, and saves it in master..syslogins as that account’s new password.

-r mastermirror

starts the mirror of the master device. Use this parameter to start Adaptive Server if the master device has been damaged.

-s servername

specifies the name of the Adaptive Server to start. If -s is omitted, a server named SYBASE is started.

-T trace_flag
-u sa/sso_name

specifies the System Administrator or System Security Officer’s name you want to unlock.

-w master | model_database

specifies whether you want to write a master or model database.

-y [password]

allows you to assign a password for the encrypted private key, so that the server prompt the user for a password. This password should match the password you used to encrypt the private key when it was created. You cannot use this parameter when you are running the server in the background.

NoteAlthough you can a password with -y, for security reasons Sybase strongly discourages you from doing so.

A private key is included with your server’s digital certificate. By default, the certificate file located:

%SYBASE%\%SYBASE_ASE%\certificates\servername.crt

The location of the certificate file changes if you invoke the sp_ssladmin addcert command.

-z page_size

specifies the page size of the server. You must use -b and -w to use this flag, and name an even power of two between 2k and 16k, or else the server does not boot.

Examples

Example 1

Creates a new installation with a 100MB master device and a 4k page:

sqlsrvr -d d_master -z 4k -b 100.02M

The spaces between options and their following arguments are optional and acceptable. This example specifies “100.02M” for a 100MB master device because the server requires 16KB of overhead for its configuration area.

Example 2

Rewrites a corrupt model database:

sqlsrvr -d d_master -w model

Example 3

Rewrites a corrupt master database, specifying device size:

sqlsrvr -d d_master -w master -z 4k

Example 4

Rewrites a corrupt master database, specifying device and page sizes, forcing the server to accept these values in preference to what it may find in the config block:

sqlsrvr -d d_master -w master -z 4k -b 100.02M -f

Example 5

Rewrites a corrupt master database, specifying a page size that does not match what the server finds in its config block. This produces a failure:

sqlsrvr -d d_master -w master -z 8k
00:00000:00000:2001/01/19 12:01:26.94 server The
configured server page size does not match that 
specified on the command line. To use the configured 
size, omit the command line size; to use the command 
line size, specify 'force' (-f).

Example 6

Rewrites a corrupt master database, specifying an incorrect page size, even in a normal boot. This produces a failure:

sqlsrvr -d d_master -z4000
sqlsrvr: the 'z' flag may not be used without 'b' or
'w'. sqlsrvr: server will ignore the 'z' flag. sqlsrvr: 
the 'z' flag contained an invalid page size. sqlsrvr: 
the page size must be an even power of two between 2048 
and 16384 bytes, inclusive.

Usage


Starting Adaptive Server

Use either of the following methods to start Adaptive Server with a specified configuration file:


Dependencies and conditions with -b and -w

The effect of -b changes depending on whether -w is present:

-w may or may not require additional flags:

Permissions

Anyone with execute permission on the binary, and who has read/write access to all the files.

Tables used

sysconfigures

See also

Commands disk mirror, disk remirror, reconfigure

System procedures sp_configure, sp_password

Utilities startserver