Configuring access to Sybase databases

To configure access to Sybase databases, you set environment variables on the engine tier computer and specify database information in the interfaces file.

Before you begin

  • Install and configure the SQL Server or Sybase client software. The BCPLoad stage uses the BCP API in the DBLIB/CTLIB and NetLIB client libraries. You must ensure that these components are installed on the InfoSphere® DataStage® server that set up as a client to the SQL Server DBMS. For more information, see DBMS documentation.
  • Make sure that the Sybase database server is accessible from the Sybase client.
  • Create table in the database on the SQL Server.
  • Make sure that the database is registered on the Sybase client.

Procedure

  1. Set the SYBASE environment variable to point to the Sybase installation directory.
    For example, export SYBASE=/disk3/Sybase.
  2. Set the SYBASE_OCS environment variable to point to the Sybase Open Client directory.
    For example, export SYBASE_OCS=OCS-12_5. This value indicates the version and release of the Open Client product.
  3. Specify the database name, host system name or IP address, and port number in the interfaces file (for example, sql.ini) in the $SYBASE directory.
  4. Set the DSQUERY environment variable to the name of the Sybase database server to connect to by default when the server name is not specified in the connection request.
    If the environment variable is not set, the default value SYBASE is used.
  5. Set the PATH and library path environment variable to point to the directory that contains the client libraries.
    • On Windows, %SYBASE%\%SYBASE_OCS%\bin and %SYBASE%\%SYBASE_OCS%\dll directories, where SYBASE and SYBASE_OCS represent the Sybase product installation home directory and Sybase Open Client directory.
    • On Linux® and UNIX, $SYBASE/$SYBASE_OCS/lib.
    Note: Make sure that $SYBASE/$SYBASE_OCS/bin is displayed first in the PATH environment variable.
  6. For the BCPLoad stages, configure the database for the fast copy (bulk load) option, by using a stored procedure.
    When this option is used, data is loaded without recording every insert in a log file. For more information about using stored procedures, see Using Stored Procedures.
  7. Get login privileges to Sybase by using a valid Sybase user name and corresponding password, server name, and database. These must be recognized by Sybase before you attempt to access it.
  8. Use the dsedit utility that is provided with the Sybase Open Client to configure connection to the Sybase database.
  9. Test the connectivity to Sybase database outside of InfoSphere DataStage by using tools such as $SYBASE/$SYBASE_OCS/bin/isql tool in Sybase Open Client.
  10. Complete the following steps to access Sybase databases with NLS in Sybase enterprise stages.
    1. Create a database and configure the language of your choice.
      For example, create database <<database path>> COLLATION 932JPN for a Japanese (shift_jis) database.
    2. Install the IBM® InfoSphere DataStage server in that particular language, for example, Japanese (shift_jis).
    3. To set the language for InfoSphere DataStage client, use the NLS tab in job properties to select the language.
    4. Make sure that the selected language is set as default in the operating system of the system on which the InfoSphere DataStage client is installed.