Question

How to check if database is availabe?

  • 21 June 2023
  • 7 replies
  • 18 views

Badge +1

To provide high availability of data, client is having two data servers. We need to check for existing database connection failure in FME Work flow and pull data from backup data server. If there is no failure at 1st connection, then no need to proceed for backup server. Is there any possibility for this king of approach in FME?


7 replies

Userlevel 6
Badge +34

I would try and use a FeatureReader (Initiated by a Creator) reading from the first connection. Then a NoFeaturesTester, if no output use a second FeatureReader with the second connection. Rejected Feature Handling should be set to Continue Translation. You can set this in the Navigator, under workspace parameters, translation.

Userlevel 1
Badge +21

I would try and use a FeatureReader (Initiated by a Creator) reading from the first connection. Then a NoFeaturesTester, if no output use a second FeatureReader with the second connection. Rejected Feature Handling should be set to Continue Translation. You can set this in the Navigator, under workspace parameters, translation.

If using a FeatureReader you can just initiate a second FeatureReader from the rejected port in the event of database connection failure

Userlevel 5
Badge +29

How are you ensuring data is the same across the two databases?

 

A more robust approach would be to setup the servers in High Availability and have the failover at the database level rather than relying on the clients to switch over in the event of an outage

Userlevel 5
Badge +29

I would try and use a FeatureReader (Initiated by a Creator) reading from the first connection. Then a NoFeaturesTester, if no output use a second FeatureReader with the second connection. Rejected Feature Handling should be set to Continue Translation. You can set this in the Navigator, under workspace parameters, translation.

A question on this approach is what constitutes a failure on the first reader?

  • if you get no features returned, is that because the DB failed internally, or an SQL statement returns no features?
  • What if it times out? is that because the database is down/running slow, or there is just a lot of data
  • Obviously a failed to connect/rejected output is valid failure

 

Badge +1

How are you ensuring data is the same across the two databases?

 

A more robust approach would be to setup the servers in High Availability and have the failover at the database level rather than relying on the clients to switch over in the event of an outage

Client is maintaining that for high availability. So we are assured by customer that data is same on both servers.

Badge +1

If using a FeatureReader you can just initiate a second FeatureReader from the rejected port in the event of database connection failure

Thanks for a simple and clear answer.

Badge +1

A question on this approach is what constitutes a failure on the first reader?

  • if you get no features returned, is that because the DB failed internally, or an SQL statement returns no features?
  • What if it times out? is that because the database is down/running slow, or there is just a lot of data
  • Obviously a failed to connect/rejected output is valid failure

 

Thanks for detailing on many possible cases.

Reply