cancel
Showing results for 
Search instead for 
Did you mean: 

Database mirroring is now done with sql statements rather than cmd commands.

Former Member
0 Kudos
2,926

BH In the new version of sql anywhere, the mirroring is done with sql statements rather than cmd commands. In the old case the commands could be automated with a .bat file. However, with the new version, what happens if the server gets restarted, all the mirroring settings have to be executed again manually? Or is there a way to automate their execution? Or am i missing something? Thanks Aron

Accepted Solutions (0)

Answers (1)

Answers (1)

MarkCulp
Participant

In the "new" method, all of the mirroring configuration settings for the primary and mirror server are stored in the database - see sysmirrorserver, sysmirroroption, and sysmirrorserveroption tables. You do not need to execute the configuration settings each time you restart the database.

The "-xp on" command line switch indicates to the server that you want the configuration settings within the server tables to be used.

Note: The arbiter continues to be configured using the -xf and -xa command line switches.

HTH

Former Member
0 Kudos

BH Mark, thanks for your reply. If i choose, can i still use the old method and configure everything in the cmd commands? Or MUST I use the "-xp on" and configure using the sql statements? Thanks Aron

MarkCulp
Participant
0 Kudos

Yes, you can continue to use the old configuration method (using the -xp command line option) but this old method is no longer recommended and is deprecated. (The deprecation is noted on the -xp documentation page and will be removed from the product in a future release).

Perhaps you can tell us why you need to configure your mirroring from the command line? Does your configuration change so often that you cannot store the configuration within the database?

MarkCulp
Participant
0 Kudos

Thanks Breck - you are correct: The arbiter server must be started with the necessary -xf and -xa command line switches in order for it to accept / make connections from / to the primary/mirror servers. (My statement has been clarified)

Former Member
0 Kudos

Mark, the "new" method is very confusing.

MarkCulp
Participant
0 Kudos

Have you tried the tutorials: http://dcx.sybase.com/index.html#sa160/en/dbadmin/da-highavailability-s-4980336.html - walking through them may help?

If you are still having difficulty after going through the tutorials then post back here (or create a new question) stating what you are having difficulty understanding and we will try to help (the feedback may also help improve the documentation).

Former Member
0 Kudos

Hi Mark, Yes I've looked at tutorials. I was able to figure it out, but I don't see the benefit of the new way? With the old way, if you wanted to change the port in one of the partners, you simply could just change the syntax in the -xp ..., but with the new way you have to edit them using SQL statements (which I don't know much about).

ian_mchardy
Product and Topic Expert
Product and Topic Expert
0 Kudos

The use of the CREATE MIRROR SERVER statements is required for the use of copy nodes (read-only scale-out nodes). i.e. there is no way to use read-only scale-out without defining the mirror servers with CREATE MIRROR SERVER statements.

Additionally, the new way allows almost all of the mirroring configuration to be stored in the database, as opposed to spread across three complex command lines.

To change the port of the server, you would need to execute an ALTER MIRROR SERVER statement for the server where you are changing the port to change the connection string. If you changed the port of the primary or mirror, and your PRIMARY or MIRROR connection string included the port, you would also need to execute an ALTER MIRROR SERVER statement for the primary or mirror server definitions to change the connection string. Once that has been performed, you then can restart the servers with a different port listed in the command line.