Posts tagged SQL Server
For IBM WebSphere, see here.
LiveCycle ES2′s Configuration Manager (LCM) provides you two options for configuring JDBC data sources in WebLogic:
1) Package it inside the EAR files (more secure)
2) Create it in the WebLogic Admin Console
Choice #2 provides a lot more flexibility when it comes to configuring the data sources for database failover. Runtime configuration changes such as increasing the pool size can be done without having to un-deploy and re-deploy EAR files.
To ensure that the connections in the connection pool are valid, the following additional configuration changes are necessary. This is based on an actual customer deployment against an active-passive SQL Server database cluster. You can make changes as necessary to fit your IT environment.
1) In the ‘Connection Pool‘ tab for the JDBC data source, in the ‘Advanced‘ section, ensure that the checkbox for ‘Test Connections on Reserve‘ is checked
2) Set ‘Test Frequency‘ to 10 seconds
3) Set ‘Test Table Name‘ to “DUAL” or “EDCJOBENTITY”
4) Set ‘Seconds to Trust an Idle Pool Connection‘ to 5 seconds
5) Set ‘Init SQL‘ to “SQL SELECT * FROM DUAL” or “SQL SELECT COUNT(*) FROM EDCJOBENTITY”
6) Set ‘Connection Creation Retry Frequency‘ to 12 seconds
7) Set ‘Login Delay‘ to 0 seconds
8) Set ‘Inactive Connection Timeout‘ to 0 seconds
9) Set ‘Connection Reserve Timeout‘ to 10 seconds
Original article at http://blogs.adobe.com/livecycle/2011/04/configuring-livecycle-jdbc-data-sources-in-weblogic-for-db-failover.html.
The Adobe Customer Experience solution “Correspondence Management” (formerly Interactive Statements Solution Accelerator) requires an XA-type JDBC data source. XA is a specification for distributed transaction processing that involves multiple resources such as a database, or a JMS queue. More here.
In the JBoss Turnkey as well as in the pre-configured JBoss EAP tree, it is defined in the file adobe-sa-ds.xml in %JBOSS_HOME%aep_sqlserverdeploy. The JNDI name is “AdobeDefaultSA_DS“. It uses a different driver class (com.microsoft.sqlserver.jdbc.SQLServerXADataSource) compared to the other ADEP Document Services JDBC data sources (IDP_DS and EDC_DS) which are non-XA (com.microsoft.sqlserver.jdbc.SQLServerDriver). Both these classes are available in version 3 of Microsoft’s SQL Server JDBC Driver which supports SQL Server 2008.
Default SQL Server 2008 installs are not configured for XA transactions. If you have a JBoss 5.1 EAP instance running ADEP Document Services against Microsoft SQL Server 2008, you will get the following error messages every 2 minutes in JBoss server.log:
[com.arjuna.ats.internal.jta.recovery.xarecovery1] Local XARecoveryModule.xaRecovery got XA exception javax.transaction.xa.XAException: com.microsoft.sqlserver.jdbc.SQLServerException: Failed to create the XA control connection. Error: “Could not find stored procedure ‘master..xp_sqljdbc_xa_init_ex’.”, XAException.XAER_RMERR
To configure a SQL Server 2008 instance for XA, your SQL Server 2008 DBA has to perform several steps server-side, on the SQL Server machine:
1) Download the Microsoft SQL Server JDBC Driver 3.0 from here and install it somewhere (run the .exe)
2) Copy sqljdbc_xa.dll from %JDBC_DRIVER_INSTALL_ROOT%sqljdbc_3.0enuxax64 (assuming the SQL Server 2008 instance is 64-bit) to %SQLSERVER_INSTALL_ROOT%Instance_rootMSSQL10.MSSQLSERVERMSSQLBinn
CREATE XA STORED PROCEDURES and ROLES
3) Copy-paste the contents of the script xa_install.sql in %JDBC_DRIVER_INSTALL_ROOT%sqljdbc_3.0enuxa and execute it using SQL Server Management Studio’s Query Editor.
4) Confirm the creation of new stored procedures in SQL Server Management Studio. In the left pane, navigate to Programmability->Extended Stored Procedures for the “master” database – it should look something like this:
APPLY ROLE TO J2EE APPSERVER JDBC USER
5) Using SQL Server Management Studio’s Query Editor, assign the ‘SqlJDBCXAUser’ role to the SQL Server user that the JDBC connection pool uses for authentication and execute it. The following script assigns the role to the user ADEPJBoss:
EXEC sp_grantdbaccess 'ADEPJBoss', 'ADEPJBoss'
EXEC sp_addrolemember [SqlJDBCXAUser], 'ADEPJBoss'
“Command(s) completed successfully.”
CONFIGURE THE DISTRIBUTED TRANSACTION COORDINATOR (DTC)
6) Choose the Windows menu Administrative Tools->Component Services.
7) In the left navigation pane, navigate to Console Root->Component Services->Computers->My Computer->Distributed Transaction Coordinator->Local DTC.
8) Highlight ‘Local DTC’, right-click the mouse and choose ‘Properties’.
9) Choose the ‘Security’ tab. Ensure that the checkbox for ‘Enable XA Transactions’ is checked. Please see screenshot below.
10) Click Apply, then OK.
CONFIGURE REQUIRED WINDOWS SERVICES TO START AUTOMATICALLY
11) Choose the Windows menu Administrative Tools->Services. In it, make sure that the “Distributed Transaction Coordinator” service is set to start automatically. Start it.
12) Also make sure that the other services it depends on, namely ‘Remote Procedure Call‘, ‘Security Accounts Manager‘ are also set to start automatically.
13) Re-start the SQL Server instance
14) Re-start the appserver instance hosting ADEP Document Services and make sure that the error messages no longer appear.
Original article at http://blogs.adobe.com/ADEP/2011/08/enabling-xa-transactions-in-sql-server-2008-for-adep-interactive-statements.html.