Setting preferences for SQL database connections

You use the page for SQL database connections for these reasons:
Do as follows:
  1. Click Window > Preferences
  2. When a list of preferences is displayed, expand EGL, then click SQL Database Connections.
  3. In the Connection URL field, type the URL used to connect to the database through JDBC:
    • For IBM® DB2® Universal Driver and IBM DB2 APP DRIVER for Windows®, the URL is jdbc:db2:dbName (where dbName is the database name)
    • For the Oracle JDBC thin client-side driver, the URL varies by database location. If the database is local to your machine, the URL is jdbc:oracle:thin:dbName (where dbName is the database name). If the database is on a remote server, the URL is jdbc:oracle:thin:@host:port:dbName (where host is the host name of the database server, port is the port number, and dbName is the database name)
    • For the Informix® JDBC NET driver, the URL is as follows (with the lines combined into one)--
        jdbc:informix-sqli://host:port
          /dbName:informixserver=servername;
          user=userName;password=passWord
      host
      Name of the machine on which the database server resides
      port
      Port number
      dbName
      Database name
      serverName
      Name of the database server
      userName
      Informix user ID
      passWord
      Password associated with the user ID
    • For the DataDirect SequeLink JDBC Driver for SQL Server, the URL is as follows (with the lines combined into one)--
      jdbc:sequelink://host:port;
          SelectMethod=cursor;DatabaseName=dbName
      host
      Name of the machine on which the database server resides
      port
      Port number
      dbName
      Database name
    • For the Microsoft® JDBC Driver for SQL Server, the URL is as follows (with the lines combined into one)--
      jdbc:microsoft:sqlserver://host:port;
          SelectMethod=cursor;DatabaseName=dbName
      host
      Name of the machine on which the database server resides
      port
      Port number
      dbName
      Database name
  4. In the Database field, type the name of the database.
  5. In the User ID field, type the user ID for the connection.
  6. In the Password field, type the password for the user ID.
  7. In the Database vendor type field, select the database product and version that you are using for your JDBC connection.
  8. In the JDBC driver field, select the JDBC driver that you are using for your JDBC connection.
  9. In the JDBC driver class field, type the driver class for the driver you selected:
    • For IBM DB2 Universal Driver, the driver class is com.ibm.db2.jcc.DB2Driver
    • For IBM DB2 APP DRIVER for Windows, the driver class is COM.ibm.db2.jdbc.app.DB2Driver
    • For the Oracle JDBC thin client-side driver, the driver class is oracle.jdbc.driver.OracleDriver
    • For the Informix JDBC NET driver, the driver class is com.informix.jdbc.IfxDriver
    • For the DataDirect SequeLink JDBC Driver for SQL Server, the driver class is com.ddtek.jdbc.sqlserver.SQLServerDriver
    • For the Microsoft JDBC Driver for SQL Server, the driver class is com.microsoft.jdbc.sqlserver.SQLServerDriver
    • For other driver classes, refer to the documentation for the driver
  10. In the class location field, type the fully qualified filename of the *.jar or *.zip file that contains the driver class:
    • For IBM DB2 Universal Driver, type the fully qualified filenames to the db2jcc.jar and db2jcc_license_cu.jar files
    • For IBM DB2 APP DRIVER for Windows, type the fully qualified filename to the db2java.zip file; for example, d:\sqllib\java\db2java.zip
    • For the Oracle THIN JDBC DRIVER, type the fully qualified pathname to the ojdbc14.jar file; for example, d:\Ora81\jdbc\lib\ojdbc14.jar or, if you require Oracle trace, ojdbc14_g.jar
    • For the Informix JDBC NET driver, type the fully qualified filename to the ifxjdbc.jar file
    • For the DataDirect SequeLink JDBC Driver for SQL Server, type the fully qualified filenames to the base.jar, util.jar, and sqlserver.jar files
    • For the Microsoft JDBC Driver for SQL Server, type the fully qualified filenames to the msbase.jar, msutil.jar, and mssqlserver.jar files
    • For other driver classes, refer to the documentation for the driver
  11. In the Connection JNDI name field, specify the database used in J2EE. The value is the name to which the datasource is bound in the JNDI registry; for example, java:comp/env/jdbc/MyDB. As noted earlier, this value is assigned to the option sqlJNDIName in the build descriptor that is constructed automatically for a given EGL Web project.
  12. If you are accessing DB2 UDB and specify a value in the Secondary authentication ID field, the value is used in the SET CURRENT SQLID statement used by EGL at validation time. The value is case-sensitive.
You can clear or apply preference settings:

Related tasks
Creating an EGL Web project
Setting EGL preferences

Related reference
dbms
sqlJNDIName

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.