Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

(its default value was true), otherwise you will get an error "connection is read-only. Queries leading to data modification are not allowed". MS SQL and ORACLE have similar failover settings in their JDBC connection strings.


In MS SQL, it is called "failoverPartner".  Please use the following connection string.

Code Block
jdbc:sqlserver://ServerA:1433;DatabaseName=dualshield;SelectMethod=cursor;encrypt=true;trustServerCertificate=true;failoverPartner=ServerB:1433


References

https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-config-failover.html

https://learn.microsoft.com/en-us/sql/connect/jdbc/using-database-mirroring-jdbc?view=sql-server-ver16