Configuring BWAgent for Microsoft SQL Server and TIBCO Enterprise Message Service
The BWAgent can be configured to use Microsoft SQL Server database with TIBCO Enterprise Message Service (EMS) for persistence and transport.
- Install the latest TIBCO Enterprise Messaging Server and start the server.
- The Microsoft SQL driver is available by default.
- Ensure you have installed EMS client libraries. For more information, see the "Integrating with TIBCO Enterprise Message Service™" section in the TIBCO ActiveMatrix BusinessWorks™ Installation guide.
- (Optional) If you are upgrading to ActiveMatrix BusinessWorks 6.3.2, or later versions of the software, upgrade the database schema. For more information, see the "Updating the Database Schema to Enable BWAgent to Use Database with TIBCO Enterprise Message Service" section in the TIBCO ActiveMatrix BusinessWorks™ Installation guide for additional details.
bwadmindb and grant privileges to the default database owner
root as described in the following methods:
SQL Server Authentication
- Procedure
- Open Microsoft SQL Server Management Studio.
- From the
Object Explorer pane, right-click
Databases > New Database to create the database
bwadmindb. - Right-click Security > Logins > New Login....
- Make the following configurations from the Login-New window:
- Type
bwuserin the Login name field. - Select SQL Server Authentication.
- (Optional) Clear the Enforce password policy, Enforce password expiration, or User must change password at next login checkboxes.
- In the Default database field, select bwadmindb.
- From the Select a page pane, on the left side of the Login - New window, click the Server Roles tab.
- To configure the BWAgent with MS SQL Server, set the values for Minimum Server Role and Database Role required for a user, for a particular database. In MS SQL Server Management Server, navigate to . Right-click Login Properties > Server Roles. The minimum server role required for a particular user is public. Under User Mapping, the minimum database role membership for the selected database for a user mapped to the login should be one of the following two combinations: public and db_owner OR public, db_datawriter, db_datareader, and db_ddladmin.
- Click OK.
- Type
- Stop the BWAgent if it is running.
- Open the
bwagent_db.jsonfile inBW_HOME\config(Windows) or${BW_HOME}/config(Unix). - Update the following properties for your environment:
Property Name Microsoft SQL Value dbtypesqlserverdbdrivercom.microsoft.sqlserver.jdbc.SQLServerDriverdbconnectionurljdbc:sqlserver://localhost:1433;databaseName=bwadmindb;trustServerCertificate=truedbuserbwuserdbpasswordbwuser - Run the BWAdmin
configcommand with the-cfoption and push the changes from the JSON file to thebwagent.inifile.BW_HOME\bin>bwadmin config -cf ../config/bwagent_db.json agent - Restart the BWAgent.
Windows Authentication
- Procedure
- Open Microsoft SQL Server Management Studio.
- From the
Object Explorer pane, right-click
Databases > New Database to create the database
bwadmindb.Ensure that you have the required permissions on the SQL server.
- Configure the Database Engine with your system's Windows Authentication.
- When using Windows Authentication Integrated Security, perform the following steps:
- Download the
sqljdbc_12.8.1.0_enu.zipfile from the official Microsoft website and extract it. Copy
sqljdbc_12.8.1.0_enu/enu/auth/x64/mssql-jdbc_auth-12.8.1.x64.dlltoJava/jre7/binandJava/jre7/lib.Add the latest JAR file
mssql-jdbc-12.8.1.jre11.jarto the following location:/config/design/thirdparty.Add the same latest JAR file to BWAgent Home:
\system\shared\com.tibco.bw.tpcl.jdbc.datasourcefactory.sqlserver_4.0.1300.012\lib.Then add the same latest JAR file in the Bundle-ClassPath of the
MANIFEST.MFfile.
- Download the
- Stop the BWAgent if it is running.
- Open the
bwagent_db.jsonfile inBW_HOME\config(Windows) or${BW_HOME}/config(Unix). - Update the following properties for your environment.
Property Name Microsoft SQL Value dbtypesqlserverdbdrivercom.microsoft.sqlserver.jdbc.SQLServerDriverdbconnectionurljdbc:sqlserver://localhost:1433;databaseName=Testdb;IntegratedSecurity=true;encrypt=falsedbusersystemUserNamedbpasswordBlank - Run the BWAdmin
configcommand with the-cfoption and push the changes from the JSON file to thebwagent.inifile.BW_HOME\bin>bwadmin config -cf ../config/bwagent_db.json agent - Restart the BWAgent.