Prepare the runtime environment - connecting to the database
-
Genero BDL provides several ODI database drivers, based on different ODBC clients:
To each ODI driver corresponds an ODBC database client software that must be installed, and configured with a dedicated ODBC data source, using vendor-specific configuration options:
-
For the
dbmsnc
ODI driver, see Microsoft ODBC for SQL Server -
For the
dbmesm
ODI driver, see Easysoft ODBC for SQL Server -
For the
dbmftm
ODI driver, see FreeTDS ODBC for SQL Server
-
For the
-
Set up the FGLPROFILE entries for database
connections.
-
Define the SQL Server database driver correspondig to the ODBC database client used:
For Microsoft ODBC for SQL Server:
dbi.database.dbname.driver = "dbmsnc"
For Easysoft ODBC for SQL Server:
For FreeTDS ODBC:dbi.database.dbname.driver = "dbmesm"
dbi.database.dbname.driver = "dbmftm"
-
The "
source
" parameter defines the name of the ODBC data source.dbi.database.dbname.source = "test1"
-
Only if needed, force the
*.widechar
FGLPROFILE parameter. See CHAR and VARCHAR data types for more details.dbi.database.dbname.snc.widechar = false
-
If required, define the serial emulation method to "trigseq", when the INSERT
statements use all columns of the table, including the serial column. For more
details, see SERIAL and BIGSERIAL data types.
dbi.database.dbname.ifxemul.datatype.serial.emulation = "trigseq"
-
If needed, define the login timeout with the following FGLPROFILE entry:
dbi.database.stores.driver-code.logintime = 5
-
If needed, define the number of rows to be fetched at once on the application side, for each
single
FETCH
instruction:dbi.database.stores.driver-code.prefetch.rows = 50
The default is 10 rows. This is usually sufficient for regular interactive applications. Increase this parameter only in case of batch programs processing large result sets. The bigger this parameter is, the more memory is used by each program.
-
If needed, add ODBC connection string parameters with the
datasource?options
notation, in thesource
parameter of the connection. You can for example define the SQL client application identifier for SQL Server.dbi.database.dbname.source = "test1?APP=myappid;"
The
source
parameter can also be defined at runtime in the database specification ofCONNECT TO
instruction.
-
Define the SQL Server database driver correspondig to the ODBC database client used: