SQL adaptation guide For SQL SERVER 2005, 2008, 2012 / Installation (Runtime Configuration) |
For Windows™ platforms, use the SNC database driver based on SQL Native Client ODBC driver (SQLNCLI.DLL) for Microsoft™ SQL SERVER 2005 and higher.
The SNC driver is supported starting from Genero 2.10.
For Unix platforms, Genero supports the FTM driver is based on the FreeTDS ODBC client ( www.freetds.org).
This driver can be used with FreeTDS to connect from a UNIX™ platform to a Windows platform running SQL SERVER.
You need at least FreeTDS version 0.83.
The FTM driver is supported starting from Genero 2.11.
For Unix platforms, Genero supports the ESM driver is based on the EasySoft ODBC driver for SQL Server ( www.easysoft.com).
This driver can be used with EasySoft to connect from a UNIX platform to a Windows platform running SQL SERVER.
You need at least EasySoft version 1.2.3.
The ESM driver is supported starting from Genero 2.21.
Since the SNC driver is using ODBC32.DLL, there is no need to set the PATH environment variable to a specific database client library path.
The database client locale is defined by the regional settings of the application server and must match the locale used by the BDL application. Character set conversion (current code set <=> Wide-Char) is done by the SNC ODI driver according to the LANG environment variable. If the LANG environment variable is not defined, the application character set defaults to the ANSI code page (ACP).
Make sure the FreeTDS environment variables are properly set. Check for example FREETDS (the path to the configuration file). See FreeTDS documentation for more details.
With the FTM driver, there is no need to install a driver manager like unixODBC: The FTM database driver is linked directly with the libtdsodbc.so shared library. Verify the environment variable defining the search path for that database client shared library. On UNIX platforms, the variable is specific to the operating system. For example, on Solaris and Linux™ systems, it is LD_LIBRARY_PATH, on AIX® it is LIBPATH, or HP/UX it is SHLIB_PATH .
You must create the odbc.ini and odbcinst.ini files to defined the data source.
Do not forget to define the client character set for FreeTDS (client charset parameter in freetds.conf or ClientCharset parameter in odbc.ini). You may need to link FreeTDS with the libiconv library to support character set conversions.
You must set the TDS protocol version according to the SQL Server version (2005, 2008, etc), by setting the tds version parameter in freetds.conf or TDS_Version in odbc.ini. For example, when using SQL Server 2005 and 2008, you must use the TDS protocol version 8.0 or higher.
See FreeTDS documentation for more details about installation and data source configuration in ODBC files.
Make sure the EasySoft environment variables are properly set. Check for example EASYSOFT_ROOT (the path to the installation directory). See FreeTDS documentation for more details.
With the ESM driver, there is no need to install a driver manager like unixODBC: The ESM database driver is linked directly with the libessqlsrv.so shared library. Verify the environment variable defining the search path for that database client shared library. On UNIX platforms, the variable is specific to the operating system. For example, on Solaris and Linux systems, it is LD_LIBRARY_PATH, on AIX it is LIBPATH, or HP/UX it is SHLIB_PATH .
You must create the odbc.ini and odbcinst.ini files to defined the data source.
Do not forget to define the client character set for EasySoft with the Client_CSet parameter in odbc.ini. The client character set is an iconv name and must match the locale of your Genero application.
When using CHAR/VARCHAR types in the database and when the database collation is different from the client locale, you must also set the Server_CSet parameter to an iconv name corresponding to the database collation. For example, if Client_CSet=BIG5 and the db collation is Chinese_Taiwan_Stroke_BIN, you must set Server_CSet=BIG5HKSCS, otherwise invalid data will be returned from the server.
AnsiNPW=Yes
Mars_Connection=No
QuotedId=No
See EasySoft documentation for more details about installation and data source configuration in ODBC files.
You may want to set the logintime parameter to change the default login timeout period, increase the prefetch.rows parameter to get better performances with result sets, etc.
With the SNC driver you might consider setting the snc.widechar FGLPROFILE parameter to false if your database columns are defined with the CHAR/VARCHAR/TEXT types (by default the driver is prepared to work with the "UNICODE" types NCHAR/NVARCHAR/NTEXT). See CHARACTER data types for more details.