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 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

  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 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; and for the Informix JDBC NET driver, the driver class is com.informix.jdbc.IfxDriver. 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 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 filename to the classes12.zip file; for example, d:\Ora81\jdbc\lib\classes12.zip. 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
sqlJNDIName