1

I have an installation which has two SCADA (Intouch) HMIs and I want to save the data in an SQL Server database which will be in another computer. To be as sure as possible that I have an operating database I'm going to set a SQL Server mirroring. So I will have 2 SQL server databases with a distributor. About this I don't have any doubt. To make it easy to understand I've made an image with the architecture of the system.

Architecture.

My doubt is how do I configure the Alarm DB Logger to make it point, automatically, to the secondary database in case that the principal database is down for any unknown failover.

PS: I don't know if it's even possible.

GregP
  • 143
  • 12
salonso
  • 41
  • 2
  • 8

2 Answers2

3

Configure it the database in Automatic failover. The connection are handled automatically in case of a failover. Read on Mirroring EndPoints

The below Links should have more than enough information.

https://learn.microsoft.com/en-us/sql/database-engine/database-mirroring/role-switching-during-a-database-mirroring-session-sql-server

https://learn.microsoft.com/en-us/sql/database-engine/database-mirroring/the-database-mirroring-endpoint-sql-server

Rahim
  • 186
  • 1
  • 7
  • Thanks for answering, so when I configure the AlarmDBLogger I just have to set the name of the principal server? And in case of a failover in this server the AlarmDBLogger will start writting in the secondary database even if it has a different name? – salonso Feb 07 '18 at 15:57
0

The AlarmDBLogger reads its configuration from the registry, so you could try the following:

  1. Stop AlarmLogger
  2. Change ServerName in registry [HKLM].[Software].[Wonderware].[AlarmLogger].[SQLServer]
  3. Start AlarmLogger

But what about the two InTouch-nodes? What if one of those fails? You would have to make sure one of them logs alarms, and that they don't log duplicates!

The standard controls and activex for alarms use a specific view in the alarm database. You cannot change that behaviour, but you can script a server change in InTouch or System Platform.

Keep in mind that redundancy needs to be tested, and should only be implemented if 100% uptime is necessary. In many cases you will be creating new problems to solve instead of solving an actual problem.

trailer
  • 115
  • 1
  • 11