Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

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

asked 23 Dec '13, 13:41

arony's gravatar image

accept rate: 0%

FYI you might find this article helpful: High Availability Demo, Revised

(23 Dec '13, 14:25) Breck Carter

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.


permanent link

answered 23 Dec '13, 13:55

Mark%20Culp's gravatar image

Mark Culp
accept rate: 41%

edited 23 Dec '13, 14:38

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

(23 Dec '13, 14:09) arony
Replies hidden

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?

(23 Dec '13, 14:16) Mark Culp
Comment Text Removed

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)

(23 Dec '13, 14:35) Mark Culp

Mark, the "new" method is very confusing.

(23 Dec '13, 14:50) arony

Have you tried the tutorials: - 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).

(23 Dec '13, 15:00) Mark Culp

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).

(25 Dec '13, 16:45) arony

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.

(02 Jan '14, 09:27) Ian McHardy
showing 1 of 7 show all flat view
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 23 Dec '13, 13:41

question was seen: 2,711 times

last updated: 02 Jan '14, 09:27