Database

Where is the location for SQL statements that failed to commit?

While BridgeGate is logging transaction/workflow details to the database, if it experiences issues saving a SQL statement to the database the statements are saved in the following location and will be automatically retried every 20 minutes.

/bridgegate/server/sqlqueue.history

 

How do I connect to a SQL Server database

There are many connection options for SQL Server.  The quickest way is to configure a Predefined Connection using JDBC. BridgeGate includes a generic JDBC driver for SQL Server named jtds.

The JDBC Syntax

The general form of the connection URL is

jdbc:jtds:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]]

where:

  • jdbc:jtds:sqlserver:// (Required) is known as the sub-protocol and is constant.
  • serverName (Optional) is the address of the server to connect to. This could be a DNS or IP address, or it could be localhost or 127.0.0.1 for the local computer. If not specified in the connection URL, the server name must be specified in the properties collection.
  • instanceName (Optional) is the instance to connect to on serverName. If not specified, a connection to the default instance is made.
  • portNumber (Optional) is the port to connect to on serverName. The default is 1433. If you are using the default, you do not have to specify the port, nor its preceding ‘:’, in the URL.

Examples of connecting to a SQLServer database with the instance name of MSSQLSERVER and the database schema name of BillingTest1

You can find the instance name in the SQL Management or by looking at the Services Name

You can find the databasename in the SQL Management under Databases.

 

Once you have located the two parameters you can build the JDBC String on the Predefined Connection screen in BridgeGate.

In this example the full syntax is

jdbc:jtds:sqlserver://192.168.10.28;instance=MSSQLSERVER;databasename=BillingTest1

How do I manually backup the bridgegate database

Backup MySql Database using MySqlAdmin or mysqldump (Instructions below)

  • Open a Command prompt on the desktop of the BridgeGate server.
  • Assuming BridgeGate 7.0 is installed on c:
  • At a c:\bridgegate\mysql\bin> prompt
  • Replace MYSQLPASSWORD in the below command with your current MySql password
  • Run: ” mysqldump -u bridgegate -pMYSQLPASSWORD –routines –hex-blob bridgegate > c:\bridgegate\bg.sql”
    • If you have MySQL databases other than bridgegate, you can backup all of them together with the following:
      • Run: “mysqldump -u bridgegate -pMYSQLPASSWORD –routines –hex-blob –databases bridgegate db1 db2 db3 db4 > c:\bridgegate\bg.sql”
      • Replace db1 db2 db3 db4 with the other database names

Can BridgeGate access DB2 tables on an AS400

Yes as long as you can access the DB via JDBC or ODBC

How do I backup my MySQL Database manually

When backing up databases manually you should use the —hex-blob option  to ensure encrypted data is not corrupted.   We have seen issues in the past where an ascii dump has issues.

  • Open a Command prompt on the desktop of the BridgeGate server.
  • Assuming BridgeGate is installed on E:
  • At a E:\bridgegate\mysql\bin> prompt
  • Replace MYSQLPASSWORD in the below command with your current MySql password
  • Run: “mysqldump -u bridgegate -p –add-drop-database –hex-blob –routines bridgegate > E:\bg_backup\bridgegate\bg.sql”
    • If you have MySQL databases other than bridgegate, you can back up all of them together with the following:
      1. Run: “mysqldump -u bridgegate -p –routines –add-drop-database –databases bridgegate db1 db2 db3 db4 > E:\bg_backup\bridgegate\bg.sql”
        • Example: “mysqldump -u bridgegate -p –routines –add-drop-database –databases bridgegate ccd cda mds mpi msg_tracking nemsis oasis > E:\bg_backup\bridgegate\bg.sql”