If you have a mirrored SQL cluster but it has no VIP (virtual IP), and you want to connect a DualShield server to the SQL cluster for the purpose of failover redundancy. How can it be achieved?

DualShield Authentication Server utilizes JDBC driver to connect to a SQL server. You can achieve it by adding both servers into the JDBC connection string.

Let us look at an example below that connects to one MySQL server. The original JDBC string found in the file named server.xml:

<Resource name="jdbc/DasDS" driverClassName="com.mysql.jdbc.Driver" maxIdle="2" password="changeit" url="jdbc:mysql://localhost:3306/dualshield?useUnicode=true& characterEncoding=UTF-8" username="root" maxActive="1000" type="javax.sql.DataSource" validationQuery="Select 1" maxWait="5000">

To support a failover cluster, you need to change the JDBC string to:

<Resource name="jdbc/DasDS" driverClassName="com.mysql.jdbc.Driver" maxIdle="2" password="changeit" url="jdbc:mysql://localhost,192.168.124.201:3306/dualshield?useUnicode=true&failOverReadOnly=false&characterEncoding=UTF-8" username="root" maxActive="1000" validationQuery="Select 1" maxWait="5000" type="javax.sql.DataSource">

As you can see, we appended the second SQL server after the original one "localhost" separated with comma. Don't forget to also set the failover property:

failOverReadOnly=false

(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 the similar failover settings in their JDBC connection strings. In MS SQL, it is called "failoverPartner"