Provides an alternate database server name that can be used to access the read-only mirror database.
dbsrv11 [ server-options ] database-file -sm alternate-server-name
All operating systems, network server only.
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.
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.
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |