Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (Français) » SQL Anywhere Server - Database Administration » Starting and Connecting to Your Database » The database server » Database options

 

-sm database option

Provides an alternate database server name that can be used to access the read-only mirror database.

Syntax
dbsrv11 [ server-options ] database-file -sm alternate-server-name
Applies to

All operating systems, network server only.

Remarks

The alternate-server-name is only active when the database server is acting as mirror for the database. By using the -sm and -sn command-line options, an application can always connect to the database on the primary or the mirror server, without knowing which physical server is acting as primary or mirror.

See also
Example

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 mysampleprimary as an alternate server name when connecting to sample.db, while the -sm option instructs the database server to use mysamplemirror as an alternate server name to connect to sample.db, running on the mirror server.

dbsrv11 -n myserver satest.db sample.db -sn mysampleprimary -sm mysamplemirror
-xp "partner=( ENG=server2;LINKS=TCPIP( PORT=2637;TIMEOUT=1 ) );auth=abc;
arbiter=( ENG=arbiter;LINKS=TCPIP;( PORT=2639;TIMEOUT=1 ) );mode=sync"

You can connect to sample.db while it is running on the primary server using any of the following connection parameters:

You cannot connect to satest.db using ENG=mysampleprimary.

You can connect to sample.db while it is running on the mirror server using any of the following connection parameters:

You cannot connect to satest.db using ENG=mysamplemirror.