On Unix operating systems, ODBC data sources are held in a system information file. This file is usually named .odbc.ini. The SQL Anywhere database server searches the following locations, in order, for the system information file:
The ODBCINI environment variable.
The ODBC_INI environment variable.
The ODBCHOME environment variable.
The HOME environment variable.
The user's home directory (~).
The PATH environment variable.
The ODBCINI and ODBC_INI environment variables can be used to locate the system information file (which is usually named .odbc.ini), while the ODBCHOME and HOME environment variables can be used to define the path where the .odbc.ini file is located.
Both ODBCINI and ODBC_INI specify a full path, including the file name. If the system information file is located in a directory specified by ODBCINI or ODBC_INI, it does not have to be named .odbc.ini.
The following is a sample system information file:
[My Data Source] Host=hostname ServerName=myserver
You can enter any connection parameter in the system information file.
Storing user IDs, encrypted or unencrypted passwords, and database keys in a data source is not recommended.
On Unix, use the dbdsn utility to create and manage ODBC data sources.
On Unix, do not obfuscate the system information file (named .odbc.ini by default) with the File Hiding utility (dbfhide) unless you are using only SQL Anywhere data sources. If you plan to use other data sources (for example, for MobiLink synchronization), then obfuscating the contents of the system information file may prevent other drivers from functioning properly.
Also, the ODBC initialization file (named .odbc.ini by default) may contain sensitive information and care should be taken to ensure that permissions on the file are as restrictive as possible. For example, consider performing a 'chmod 600 .odbc.ini' on the file.
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|