IBM Books

Administration and Programming Guide for OS/400

Setting up the SQL Language Environment

Before using the SQL language environment, complete the following steps:

  1. Create a directory entry for the local database in the relational database directory (a directory entry with a remote location of *LOCAL), in addition to any remote databases that the SQL language environment needs to access.

    Add the entry by using the Add Relational Database Directory Entry (ADDRDBDIRE) command.

    If you are accessing a remote database, complete additional configuration steps, such as setting up communications between the local system and the remote system. For more information about distributed database support, see OS/400 Distributed Database Programming.

  2. If you are using DataLinks, ensure that TCP/IP is configured on any systems that used, and that the DataLink File Manager is started and configured on all systems that will contain objects to be linked. For more information about DataLinks, see DB2 for 0S/400 SQL Programming
  3. If large objects (LOBs) are going to be returned by the SQL language environment, set the HTML_PATH configuration variable. To learn more about this configuration variable, see HTML_PATH.
  4. Add or update configuration variables. The SQL language environment supports the following configuration variables that can be specified in a Net.Data initialization file:

    DTW_SQL_ISOLATION
    Determines the degree to which the database operations executed by the SQL language environment are isolated from concurrently executing processes

    DTW_SQL_NAMING_MODE
    Determines how a table name can be specified in an SQL statement

    DTW_SHOWSQL
    Enables the use of the macro variable SHOWSQL
    To learn more about the Net.Data configuration variable statements, see Configuration Variable Statements.

After setting up the SQL language environment, see SQL Language Environment to learn how to use the SQL language environment.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]