Prepare the runtime environment - connecting to the database

  1. 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:
    1. For the dbmsnc ODI driver, see Microsoft ODBC for SQL Server
    2. For the dbmesm ODI driver, see Easysoft ODBC for SQL Server
    3. For the dbmftm ODI driver, see FreeTDS ODBC for SQL Server
  2. Set up the FGLPROFILE entries for database connections.
    1. 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:
      dbi.database.dbname.driver = "dbmesm"
      For FreeTDS ODBC:
      dbi.database.dbname.driver = "dbmftm"
    2. The "source" parameter defines the name of the ODBC data source.
      dbi.database.dbname.source = "test1"
    3. Only if needed, force the *.widechar FGLPROFILE parameter. See CHAR and VARCHAR data types for more details.
      dbi.database.dbname.snc.widechar = false
    4. 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"
    5. If needed, define the login timeout with the following FGLPROFILE entry:
      dbi.database.stores.driver-code.logintime = 5
    6. 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.

    7. If needed, add ODBC connection string parameters with the datasource?options notation, in the source 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 of CONNECT TO instruction.