1 Quick Start Connect : Configuring and Connecting on UNIX and Linux

Configuring and Connecting on UNIX and Linux
The following basic information enables you to configure a data source and test connect with a driver immediately after installation. See Chapter 4 “Configuring the Product on UNIX/Linux” for detailed information about configuring the UNIX/Linux environment and data sources.
NOTE: In the following examples, xx in a driver filename represents the driver level number.
Environment Configuration
1
Check your permissions: You must log in as a user with full r/w/x permissions recursively on the entire product installation directory.
2
echo $SHELL
3
Run one of the following product setup scripts from the installation directory to set variables: odbc.sh or odbc.csh. For Korn, Bourne, and equivalent shells, execute odbc.sh. For a C shell, execute odbc.csh. After running the setup script, execute:
env
to verify that the installation_directory/lib directory has been added to your shared library path.
4
Set the ODBCINI environment variable. The variable must point to the path from the root directory to the system information file where your data source resides. The system information file can have any name, but the product is installed with a default file called odbc.ini in the product installation directory. For example, if you use an installation directory of /opt/odbc and the default system information file, from the Korn or Borne shell, you would enter:
ODBCINI=/opt/odbc/odbc.ini; export ODBCINI
From the C shell, you would enter:
setenv ODBCINI /opt/odbc/odbc.ini
Test Loading the Driver
The ivtestlib (32-bit drivers) and ddtestlib (64-bit drivers) test loading tools are provided to test load drivers and help diagnose configuration problems in the UNIX and Linux environments, such as environment variables not correctly set or missing database client components. This tool is installed in the /bin subdirectory in the product installation directory. It attempts to load a specified ODBC driver and prints out all available error information if the load fails.
For example, if the drivers are installed in /opt/odbc/lib, the following command attempts to load the 32-bit Oracle Wire Protocol driver on Solaris, where xx represents the version number of the driver:
ivtestlib /opt/odbc/lib/ivoraxx.so
NOTE: On Solaris, AIX, and Linux, the full path to the driver does not have to be specified for the tool. The HP-UX version, however, requires the full path.
If the load is successful, the tool returns a success message along with the version string of the driver. If the driver cannot be loaded, the tool returns an error message explaining why.
Setting the Library Path Environment Variable (Salesforce Driver on UNIX/Linux)
Before you can use the Salesforce driver, you must set the library path environment variable for your UNIX/Linux operating system to the directory containing your JVM’s libjvm.so [sl | a] file, and that directory’s parent directory.
NOTE FOR HP-UX: You also must set the LD_PRELOAD environment variable to the fully qualified path of the libjvm.so.
32-bit Salesforce Driver: Library Path Environment Variable
Set the library path environment variable to the directory containing your 32-bit JVM’s libjvm.so [sl | a] file, and that directory’s parent directory.
64-bit Salesforce Driver: Library Path Environment Variable
Set the library path environment variable to the directory containing your 64-bit JVM’s libjvm.so [sl | a] file, and that directory’s parent directory.
Configuring a Data Source
If you have Motif 2.0.3 or higher and one of the supported Linux operating systems, you can use the DataDirect ODBC Data Source Administrator for Linux (the Linux ODBC Administrator) to configure a data source. If you do not, see “Configuration Through the System Information (odbc.ini) File” for instructions on configuring the system information file.
NOTE: The Linux ODBC Administrator is currently supported only on Linux for x86 and x64 processors with Motif 2.0.3 or higher. It is not supported on Linux for Itanium II or other UNIX platforms.
The Linux ODBC Administrator is located in the /tools directory of the product installation directory. For example:
/opt/odbc/tools/odbcadmin
To configure a data source:
1
To start the Linux ODBC Administrator, change to the install_dir/tools directory, where install_dir is the path to the product installation directory. At a command prompt, enter:
./odbcadmin
2
Click either the User DSN or File DSN tab to display a list of data sources.
User DSN: Select the appropriate data source name and click Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the appropriate driver and click Finish to display the driver Setup dialog box.
File DSN: To configure a new file data source, click Add to display a list of installed drivers. Select the appropriate driver and click Advanced to specify attributes; otherwise, click Next to proceed. Specify a name for the data source and click Next. Verify the data source information; then, click Finish to display the driver Setup dialog box.
The General tab of the Setup dialog box appears by default.
NOTE: The General tab displays only fields that are required for creating a data source. The fields on all other tabs are optional, unless noted otherwise in this book.
3
Data Source Name: Type a string that identifies this data source configuration, such as Accounting.
Description: Type an optional long description of a data source name, such as My Accounting Database.
Provide the requested information for all other options on the General tab; then, click Apply to configure the data source.
Testing the Connection
1
After you have configured the data source, you can click Test Connect on the Setup dialog box to attempt to connect to the data source using the connection options specified in the dialog box. Some drivers immediately return a message indicating success or failure. For most drivers, a logon dialog box appears as described in each individual driver chapter.
2
Supply the requested information in the logon dialog box and click OK. Note that the information you enter in the logon dialog box during a test connect is not saved.
If the driver cannot connect because of an incorrect environment or connection value, it displays an appropriate error message. Click OK.
3
On the driver Setup dialog box, click OK. The values you have specified are saved and are the defaults used when you connect to the data source. You can change these defaults by using the previously described procedure to modify your data source. You can override these defaults by connecting to the data source using a connection string with alternate values. See individual driver chapters for information about using connection strings.