How to connect to Backup DB with Primary down.during start up

Document ID : KB000119968
Last Modified Date : 06/11/2018
Show Technical Document Details
Issue:
How to connect to Backup DB with Primary down.during start  up of CA Rsk Authenticaion and CA Strong Authentication service. 
Environment:
CA Strong Authentication and CA Risk Authentication service with Primary DB down, 
Cause:
CA Strong Authentication and CA Risk Authentication requires both Primary and Backup DB to be us during Start Up (if arcotcommon.ini Primary and Backup DB related initialization file sections are populated. 
Resolution:
 For Oracle RAC
===================  =================================
The key here is to enable the ODBC driver by setting the following values in the ODBC driver
HostName=(Rac Name/IP not Node)
ServiceName=(not the SID.. the ServiceName)
ConnectionRetryCount=10
ConnectionRetryDelay=10
LoadBalancing=1
====================  ================================
 
 
 
 
 
For MSSQL
 
[SQL Server Wire Protocol –change this to match your backup DSN--]
Driver=<ARCOT_HOME>/odbc32v714wf/lib/WFsqls27.so
Description=DataDirect 7.1.4 SQL Server Wire Protocol
AlternateServers=
AlwaysReportTriggerResults=0
AnsiNPW=1
ApplicationName=
ApplicationUsingThreads=1
AuthenticationMethod=1
BulkBinaryThreshold=32
BulkCharacterThreshold=-1
BulkLoadBatchSize=1024
BulkLoadFieldDelimiter=
BulkLoadOptions=2
BulkLoadRecordDelimiter=
ConnectionReset=0
ConnectionRetryCount=0
ConnectionRetryDelay=3
Database=<database_name>
EnableBulkLoad=0
EnableQuotedIdentifiers=0
EncryptionMethod=0
FailoverGranularity=0
FailoverMode=0
FailoverPreconnect=0
FetchTSWTZasTimestamp=0
FetchTWFSasTime=1
GSSClient=native
HostName=<SQL_Server_host>
HostNameInCertificate=
InitializationString=
Language=
LoadBalanceTimeout=0
LoadBalancing=0
LoginTimeout=15
LogonID=
MaxPoolSize=100
MinPoolSize=0
PacketSize=-1
Password=
Pooling=0
PortNumber=<SQL_Server_server_port>
QueryTimeout=0
ReportCodePageConversionErrors=0
SnapshotSerializable=0
TrustStore=
TrustStorePassword=
ValidateServerCertificate=1
WorkStationID=
XMLDescribeType=-10
 
 
 
Alternate Servers
Attribute
AlternateServers (ASRV)
Purpose
A list of alternate database servers to which the driver tries to connect if the primary database server is unavailable. Specifying a value for this option enables connection failover for the driver. The value you specify must be in the form of a string that defines the physical location of each alternate server. All of the other required connection information for each alternate server is the same as what is defined for the primary server connection.
Valid Values
(HostName=hostvalue:PortNumber=portvalue:Database=databasevalue[, . . .])
You must specify the host name, port number, and database name of each alternate server.
Notes
An alternate server address in IPv6 format must be enclosed in double quotation marks.
Example
The following Alternate Servers value defines two alternate database servers for connection failover:
AlternateServers=(HostName=SqlsServer:PortNumber=1433:Database=Sqlsdb1,
HostName=255.201.11.24:PortNumber=1434:Database=Sqlsdb2)

 
 
 
Connection Reset
Attribute
ConnectionReset (CR)
Purpose
Determines whether the state of connections that are removed from the connection pool for reuse by the application is reset to the initial configuration of the connection.
Valid Values
0 | 1
Behavior
If set to 1 (Enabled), the state of connections removed from the connection pool for reuse by an application is reset to the initial configuration of the connection. Resetting the state can negatively impact performance because additional commands must be sent over the network to the server to reset the state of the connection.
If set to 0 (Disabled), the state of connections is not reset.
Notes
This connection option can affect performance.
Default
0 (Disabled)
 
 
Connection Retry Count
Attribute
ConnectionRetryCount (CRC)
Purpose
The number of times the driver retries connection attempts to the primary database server, and if specified, alternate servers until a successful connection is established.
This option and the Connection Retry Delay connection option, which specifies the wait interval between attempts, can be used in conjunction with failover.
Valid Values
0 | x
where:
x
is a positive integer from 1 to 65535.
Behavior
If set to 0, the driver does not try to connect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established during the retry attempts, the driver returns an error that is generated by the last server to which it tried to connect.
Default
0
 
Connection Retry Delay
Attribute
ConnectionRetryDelay (CRD)
Purpose
Specifies the number of seconds the driver waits between connection retry attempts when Connection Retry Count is set to a positive integer.
This option and the Connection Retry Count connection option can be used in conjunction with failover.
Valid Values
0 | x
where:
x
is a positive integer from 1 to 65535.
Behavior
If set to 0, there is no delay between retries.
If set to x, the driver waits the specified number of seconds between connection retry attempts.
Default
3
 
 
 
Failover Granularity
Attribute
FailoverGranularity (FG)
Purpose
Determines whether the driver fails the entire failover process or continues with the process if errors occur while trying to reestablish a lost connection.
This option applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select).
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover methods.
Valid Values
0 | 1 | 2 | 3
Behavior
If set to 0 (Non-Atomic), the driver continues with the failover process and posts any errors on the statement on which they occur.
If set to 1 (Atomic) the driver fails the entire failover process if an error is generated as the result of anything other than executing and repositioning a Select statement. If an error is generated as a result of repositioning a result set to the last row position, the driver continues with the failover process, but generates a warning that the Select statement must be reissued.
If set to 2 (Atomic Including Repositioning), the driver fails the entire failover process if any error is generated as the result of restoring the state of the connection or the state of work in progress.
If set to 3 (Disable Integrity Check), the driver does not verify that the rows that were restored during the failover process match the original rows. This value applies only when Failover Mode is set to 2 (Select).
Default
0 (Non-Atomic)
 
 
 
Failover Mode
Attribute
FailoverMode (FM)
Purpose
Specifies the type of failover method the driver uses.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover methods.
Valid Values
0 | 1 | 2
Behavior
If set to 0 (Connection), the driver provides failover protection for new connections only.
If set to 1 (Extended Connection), the driver provides failover protection for new and lost connections, but not any work in progress.
If set to 2 (Select), the driver provides failover protection for new and lost connections. In addition, it preserves the state of work performed by the last Select statement executed.
Notes
This connection option can affect performance.
Default
0 (Connection)
 
 
 
Failover Preconnect
Attribute
FailoverPreconnect (FP)
Purpose
Specifies whether the driver tries to connect to the primary and an alternate server at the same time.
This attribute applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select) and at least one alternate server is specified.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover methods.
Valid Values
0 | 1
Behavior
If set to 0 (Disabled), the driver tries to connect to an alternate server only when failover is caused by an unsuccessful connection attempt or a lost connection. This value provides the best performance, but your application typically experiences a short wait while the failover connection is attempted.
If set to 1 (Enabled), the driver tries to connect to the primary and an alternate server at the same time. This can be useful if your application is time-sensitive and cannot absorb the wait for the failover connection to succeed.
Default
0 (Disabled)
 
 
 
Load Balance Timeout
Attribute
LoadBalanceTimeout (LBT)
Purpose
The number of seconds to keep inactive connections open in a connection pool. An inactive connection is a database session that is not associated with an ODBC connection handle, that is, a connection in the pool that is not in use by an application.
Valid Values
0 | x
where:
x
is a positive integer that specifies a number of seconds.
Behavior
If set to 0, inactive connections are kept open.
If set to x, inactive connections are closed after the specified number of seconds passes.
Notes
The Min Pool Size option may cause some connections to ignore this value.
This connection option can affect performance.
Default
0
 
 
Load Balancing
Attribute
LoadBalancing (LB)
Purpose
Determines whether the driver uses client load balancing in its attempts to connect to the database servers (primary and alternate). You can specify one or multiple alternate servers by setting the Alternate Servers option.
Valid Values
0 | 1
Behavior
If set to 1 (Enabled), the driver uses client load balancing and attempts to connect to the database servers (primary and alternate servers) in random order.
If set to 0 (Disabled), the driver does not use client load balancing and connects to each server based on their sequential order (primary server first, then, alternate servers in the order they are specified).
Notes
This option has no effect unless alternate servers are defined for the Alternate Servers connection option.
Default
0 (Disabled)
 
 
 
 
Additional Information:
None.