Database Connection Strings

Use the following syntax when making a direct connection with the different types of supported databases (as opposed to using an ODBC DSN). These strings are used in the database configuration file and in Enterprise Server.

Note: If the connection string contains spaces, you may need to enclose the connection string in quotation marks; for example, -connect:"<connection-string>".

Microsoft SQL Server (including Azure SQL Database)

Syntax:

Driver={ODBC Driver 13 for SQL Server};<connection-options>

or

Driver={Odbc Driver 17 for SQL Server};<connection-options>

Example:

Driver={ODBC Driver 13 for SQL Server};Server=localhost;Database=VSAM;Trusted_Connection=yes 

PostgreSQL

Syntax:

Driver={<PostgreSQL-driver-name>};<connection-options>

Example:

Driver={PostgreSQL ANSI};Server=localhost;Port=5432;Database=VSAM;Uid=mfdbfh;Pwd=MfdbfhAdm!n5;

Db2 (preferred)

Syntax:

db=<database/alias name;>;uid=<user name>;pwd=<password>

Note: This is the preferred format to be used. The Hostname, Port, and Protocol will typically have been cataloged for the node associated with the specified database/alias name.

Example:

db=VSAM;uid=mfdbfh;pwd=MfdbfhAdm!n5

Db2

Syntax:

Driver={IBM DB2 ODBC DRIVER};<connection-options>

Example:

Driver={IBM DB2 ODBC DRIVER};Database=VSAM;Hostname=localhost;Port=50000;Protocol=TCPIP;uid=mfdbfh;pwd=MfdbfhAdm!n5

Oracle

Syntax:

<user name>/<password>@<db-name>

Note: This is Oracle's 'Easy Connect' format. <db-name> refers to the database connection name as defined in the tnsnames.ora configuration file.

Example:

mfdbfh/MfdbfhAdm!n5@DBFHTEST