Provides an alternate server name for a single database running on a database server. The -sn database option must be specified after the database-file, and applies only to that database.
dbsrv11 [ server-options ] database-file -sn alternate-server-name
All operating systems, network server only.
The database server can be configured to listen for more than one server name for a particular database server. Server names other than the real server name are called alternate server names, and are specific to a particular database running on the database server. Clients using the alternate server name to connect can only connect to the database that specified the alternate server name.
Alternate server names must be unique on the network; otherwise, the database fails to start. If the database is started in the server command and the alternate server name is not unique, the server fails to start. You can also provide an alternate server name using the START DATABASE statement.
Clients that specify an alternate server name can only connect to the database that specified the alternate server name. They cannot connect to any other database running on that database server. If the DBN or DBF connection parameter is specified, it must match the database name or database file, respectively. If the DBN or DBF connection parameter is not specified, then the database acts as the default database for that server.
The Server Enumeration utility (dblocate) detects alternate server names.
When using database mirroring, an alternate server name must be specified for client applications to be able to connect to the current primary server without knowing in advance which server is the primary server and which is the mirror server. Both operational servers must use the same name for the alternate server name.
The following command starts the databases satest.db and sample.db on a database server named myserver. The -sn option instructs the database server to use mysample as an alternate server name when connecting to sample.db.
dbsrv11 -n myserver satest.db sample.db -sn mysample
You can connect to sample.db using any of the following connection parameters:
You cannot connect to satest.db using ENG=mysample.
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|