Skip to content

Instantly share code, notes, and snippets.

@bironeaj
Created October 25, 2018 23:17
Show Gist options
  • Save bironeaj/4008e98921dddde46792488c21cb91a1 to your computer and use it in GitHub Desktop.
Save bironeaj/4008e98921dddde46792488c21cb91a1 to your computer and use it in GitHub Desktop.
Laravel IBM DB2 Connection
'ibmi' => [
'driver' => 'db2_ibmi_ibm',
// or 'db2_ibmi_ibm' / 'db2_zos_odbc' / 'db2_expressc_odbc
'driverName' => '{IBM DB2 ODBC DRIVER}',
// or '{iSeries Access ODBC Driver}' / '{IBM i Access ODBC Driver 64-bit}'
'host' => env('DB_HOST', '127.0.0.1'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', 'forge'),
'database' => env('DB_DATABASE', 'forge'),
'prefix' => '',
'schema' => env('DB_SCHEMA', 'forge'),
'port' => env('DB_PORT', '1433'),
'date_format' => 'Y-m-d H:i:s.u',
// or 'Y-m-d H:i:s.u' / 'Y-m-d-H.i.s.u'...
'odbc_keywords' => [
'SIGNON' => 3,
'SSL' => 0,
'CommitMode' => 2,
'ConnectionType' => 0,
'DefaultLibraries' => '',
'Naming' => 0,
'UNICODESQL' => 0,
'DateFormat' => 5,
'DateSeperator' => 0,
'Decimal' => 0,
'TimeFormat' => 0,
'TimeSeparator' => 0,
'TimestampFormat' => 0,
'ConvertDateTimeToChar' => 0,
'BLOCKFETCH' => 1,
'BlockSizeKB' => 32,
'AllowDataCompression' => 1,
'CONCURRENCY' => 0,
'LAZYCLOSE' => 0,
'MaxFieldLength' => 15360,
'PREFETCH' => 0,
'QUERYTIMEOUT' => 1,
'DefaultPkgLibrary' => 'QGPL',
'DefaultPackage' => 'A /DEFAULT(IBM),2,0,1,0',
'ExtendedDynamic' => 0,
'QAQQINILibrary' => '',
'SQDIAGCODE' => '',
'LANGUAGEID' => 'ENU',
'SORTTABLE' => '',
'SortSequence' => 0,
'SORTWEIGHT' => 0,
'AllowUnsupportedChar' => 0,
'CCSID' => 819,
'GRAPHIC' => 0,
'ForceTranslation' => 0,
'ALLOWPROCCALLS' => 0,
'DB2SQLSTATES' => 0,
'DEBUG' => 0,
'TRUEAUTOCOMMIT' => 0,
'CATALOGOPTIONS' => 3,
'LibraryView' => 0,
'ODBCRemarks' => 0,
'SEARCHPATTERN' => 1,
'TranslationDLL' => '',
'TranslationOption' => 0,
'MAXTRACESIZE' => 0,
'MultipleTraceFiles' => 1,
'TRACE' => 0,
'TRACEFILENAME' => '',
'ExtendedColInfo' => 0
],
'options' => [
PDO::ATTR_CASE => PDO::CASE_LOWER,
PDO::ATTR_PERSISTENT => false,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
//PDO::I5_ATTR_DBC_SYS_NAMING => false,
//PDO::ATTR_AUTOCOMMIT => false,
//PDO::I5_ATTR_JOB_SORT => false,
//PDO::I5_ATTR_DBC_LIBL => '',
//PDO::I5_ATTR_DBC_CURLIB => ''
],
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment