Creating and Managing a Connection

Topics:

How to:

Reference:

To access an adapter, you must define a target that connects to the adapter. After the defined target is created, it automatically is saved in the iBSP repository. You must establish a connection to the defined target every time that you start iWay Explorer.

Procedure: How to Define a New Target

This procedure assumes that you are connected to Application Explorer and have expanded the Application Explorer node in the navigation tree.

To define a new target:

  1. In the navigation tree, right-click RDBMS, and click Add Target from the menu.

    The Add Target / Generic Target Properties dialog box opens, as shown in the following image.


    Add Target / Generic Target Properties dialog box

  2. Supply the values for the fields on the dialog box as follows.
    1. In the Name field, type a descriptive name for the target, for example, RDBMSTarget.
    2. In the Description field, optionally type a brief description of the target.
    3. From the Type drop-down list, click the type of target that you will connect to. The choices are SQL Server, HSQL, EDA Server, iWay Server, WebFOCUS Server, ODBC, JDBC, and Datasource.
    4. Select the Connect to target upon wizard completion check box if you want Application Explorer to automatically connect to this target after you create it.

      If you deselect this option, Application Explorer will not automatically connect to the target. From the navigation tree, you can connect to an individual target when you want to access RDBMS. For instructions, see How to Connect to a Defined Target.

  3. Click Next.

    The Add Target dialog box opens on the right pane. It includes fields that you complete to set the connection properties for the selected target type. The fields that appear on the dialog box are specific to the type of database to which you are connecting and the target type that you selected.

    The following image shows the Add Target dialog box with the connection properties for the SQL Server type. The label for a required field appears in red until you have supplied a value for the field.


    SQL Server Target Properties dialog box

    The RDBMS connection properties are consistent with those found in your RDBMS system. For more information on property values that are specific to your RDBMS configuration, consult your RDBMS system administrator.

  4. Enter connection information that is specific to the database to which you want to connect.

    For information on connection properties for a SQL Server target type, see SQL Server Connection Properties.

    For information on connection properties for an HSQL target type, see HSQL Connection properties.

    For information on connection properties for an EDA Server target type, see EDA Server Connection Properties.

    For information on connection properties for an iWay Server target type, see iWay Server Connection Properties.

    For information on connection properties for a WebFOCUS Server target type, see WebFOCUS Server Connection Properties.

    For information on connection properties for an ODBC target type, see ODBC Connection Properties.

    For information on connection properties for a JDBC target type, see JDBC Connection Properties.

    For information on connection properties for a Datasource target type, see Data Source Connection Properties.

  5. Supply the connection information for the target to which you want to connect, and click Finish when you are done.

    In the left pane, the target name appears underneath the node where you created the new target. You have finished creating the new target.

    For information on connecting to the target, see How to Connect to a Defined Target.

Reference: SQL Server Connection Properties

The following table lists and describes the connection properties for the SQL Server target type.

Property

Description

Settings Tab

Host

DNS or IP name of the server where the database instance resides.

Port

Port number on which the database is listening.

Database Name

Specific name of the database or data source to which you will connect.

User id

User ID that can access the database. The user ID must have database access to the interface tables that are used.

User password

Password associated with the specified user ID.

JDBC Tab

URL

Allows you to specify optional settings for the JDBC URL.

Reference: HSQL Connection Properties

The following table lists and describes the connection properties for the HSQL target type.

Property

Description

Settings Tab

Driver Type

Select from the following, depending on how you are running your HSQL database:

  • Standalone
  • Server
  • Web Server
  • In-Memory

User id

User ID that can access the database.

User password

Password associated with the specified user ID.

Standalone Tab

Path

If you are running HSQL in Standalone mode, provide the full path to the database file.

Server/Web Server Tab

Host

If you are running HSQL in Server or Web Server mode, provide the name of the machine on which the database is running.

Port

If you are running HSQL in Server or Web Server mode, provide the port number on which the database is listening.

Server Name

Name of the database server.

JDBC Tab

URL

Allows you to specify optional settings for the JDBC URL.

Reference: EDA Server Connection Properties

The following table lists and describes the connection properties for the EDA Server target type.

Property

Description

Host

DNS or IP name of the server where the database instance resides.

Port

Port number on which the database is listening.

User id

User ID that can access the database. The user ID must have database access to the interface tables that are used.

User password

Password associated with the specified user ID.

Server Name

For an iWay server component, the name of the service node to which you are connecting.

Code Page

Options

Reference: iWay Server Connection Properties

The following table lists and describes the connection properties for the iWay Server target type.

Property

Description

Host

DNS or IP name of the server where the database instance resides.

Port

Port number on which the database is listening.

User id

User ID that can access the database. The user ID must have database access to the interface tables that are used.

User password

Password associated with the specified user ID.

Server Name

For an iWay server component, the name of the service node to which you are connecting.

Code Page

Options

Reference: WebFOCUS Server Connection Properties

The following table lists and describes the connection properties for the WebFOCUS Server target type.

Property

Description

Settings Tab

Host

DNS or IP name of the server where the database instance resides.

Port

Port number on which the database is listening.

User id

User ID that can access the database. The user ID must have database access to the interface tables that are used.

User password

Password associated with the specified user ID.

Server Name

For an iWay server component, the name of the service node to which you are connecting.

Code Page

Options

JDBC Tab

URL

Allows you to specify optional settings for the JDBC URL.

Reference: ODBC Connection Properties

The following table lists and describes the connection properties for the ODBC target type.

Property

Description

Data Source Name

Specific name of the database or data source to which you will connect.

User id

User ID that can access the database. The user ID must have database access to the interface tables that are used.

User password

Password associated with the specified user ID.

Reference: JDBC Connection Properties

The following table lists and describes the connection properties for the JDBC target type.

Property

Description

Driver

Name of the driver used to access the database that you want to connect to. For more information, see your database documentation.

URL

For a JDBC connection, the JDBC driver-specific URL used to connect to the RDBMS.

For information on using driver options in the URL definition, for example, selectMethod=cursor for Microsoft SQL, see Using URL Options (For JDBC Connections Only).

User id

User ID that can access the database. The user ID must have database access to the interface tables that are used.

User password

Password associated with the specified user ID.

Reference: Data Source Connection Properties

The following table lists and describes the connection properties for the Datasource target type.

The database types that appear in the DBMS drop-down list depend on the available JDBC drivers in the iWay7\lib directory. You must use the JDBC data source if it is available in the drop-down list for your available target types. The JDBC data source targets will appear in the drop-down list only if they are registered with the JNDI naming service. If they are not registered, you can then use the JDBC option to connect to the database.

Property

Description

Initial Context Factory

JNDI context.INITIAL_CONTEXT_FACTORY that is provided by the JNDI service provider.

Provider URL

For a JDBC connection, the JDBC driver-specific URL used to connect to the RDBMS.

For information on using driver options in the URL definition, for example, selectMethod=cursor for Microsoft SQL, see Using URL Options (For JDBC Connections Only).

For a data source connection, the URL to use to contact the JNDI provider. The syntax of this URL depends on the JNDI provider being used. This value corresponds to the standard JNDI property,

java.naming.provider.url

JNDI Name

JNDI name of a queue to which events are emitted.

DBMS

Oracle, SQL Server, Sybase, DB2_type2, DB2_type3, DB2_type4, Informix, EDA Server, Progress, Cache, Domino, DominoODBC, HSQL, Teradata, ODBC, or Other.

For information on connecting to the target, see How to Connect to a Defined Target.

Reference: Using URL Options (For JDBC Connections Only)

Each driver has specific JDBC system properties, most of which can be used in the connection string. The URL options can be added to the JDBC URL in the connection properties for a specific target. For more information on these properties, refer to the documentation on the specific driver.

  • For Microsoft SQL

    You can use the selectMethod as a connection parameter in the URL.

    To avoid some exceptions when using the iWay Technology Adapter for RDBMS with Microsoft SQL Server 2000 Driver for JDBC, you must add selectMethod=cursor to the JDBC URL specification. For example,

    jdbc:microsoft:sqlserver://PMSNJC:1433;DatabaseName=dbname;
    selectMethod=cursor;

    This statement determines whether Microsoft SQL Server "server cursors" are used for SQL queries. Because the adapter is not limited to a single active statement while executing a set of queries within a transaction, adding this statement to the JDBC URL allows you to specify multiple queries within a transaction. This helps to prevent errors because it addresses default settings in the adapter and in the driver.

    The benefit of specifying this statement is that it enables you to have multiple concurrent statements open from a given connection, which is required for pooled connections.

  • For DB2

    You can include a translate binary option to control how binary and varbinary data values are treated. On the OS/400 system, for example, if a field is tagged with CCSID 65535, you can set an optional translate binary parameter to true, which instructs the JDBC driver to translate the field to EBCDIC characters; for example,

    jdbc:db2://host:port/DatabaseName;translate binary=true;trace=true

    wheretrace=true turns on JDBC tracing for the DB2.

    The translate binary option forces the JDBC driver to treat binary and varbinary data values as if they were char and varchar data. The default is set to false. This setting is usually needed if the columns were created using different character coding values.

  • For Sybase

    You can ensure the use of dynamic statements by using the DYNAMIC_PREPARE option; for example,

    jdbc:sybase:Tds:host:port/DatabaseName?&DYNAMIC_PREPARE=true

    By default, this option is set to false.

Procedure: How to Connect to a Defined Target

  1. On the iWay Explorer tab, connect to and expand the Application Explorer node.
  2. Underneath the Application Explorer node, expand the RDBMS node.

    The following image shows the RDBMS node expanded, with the RDBMSTarget selected. The gray connection icon to the left of the RDBMSTarget indicates that the connection is closed.


    RDBMS target that is closed (disconnected)

  3. Right-click the connection that you want to open (for example, RDBMSTarget), and click Connect from the menu.

    The Target Connection Dialog pane opens and displays the connection information that you supplied when you defined the target.

  4. Verify the connection properties. If required, provide the password in the User password field, and then click Finish.

    If the properties are correct and the RDBMS component is available, the connection icon changes from gray to green to indicate that you are connected to the defined target. Otherwise, an error message appears in the right pane.

    You can expand a connected target to display the folders that are associated with that target.

Disconnecting From a Defined Target

How to:

Although you can maintain multiple open connections, iWay Software recommends disconnecting from targets that are not in use.

Procedure: How to Disconnect From a Defined Target

  1. On the iWay Explorer tab, connect to and expand the Application Explorer node.
  2. Underneath the Application Explorer node, expand the RDBMS node.

    The following image shows the RDBMS node expanded, with the RDBMSTarget selected. The green connection icon to the left of the RDBMSTarget indicates that the connection is open.


    RDBMS target that is open (connected)

  3. Right-click the connection that you want to close (for example, RDBMSTarget), and click Disconnect from Target from the menu.

    Disconnecting from the application closes the connection, but the connection still appears in the left pane so that you can reopen it when desired.

    The target node now has a gray connection icon, indicating that the connection is closed, as shown in the following image.


    RDBMS target that is closed (disconnected)

    When you want to reestablish a connection, the Connect option is available from the pop-up menu.

Editing a Defined Target

How to:

After you create a defined target using iWay Explorer, you can edit any information that you provided during the creation process. If you change any properties without editing, the changes will not be saved. You must edit the target in order for the changes to be saved.

Procedure: How to Edit a Defined Target

  1. On the iWay Explorer tab, connect to and expand the Application Explorer node.
  2. Underneath the Application Explorer node, expand the RDBMS node.
  3. Right-click the connection that you want to edit, for example, RDBMSTarget, and click Edit Target from the menu.

    The Add Target dialog box opens and displays the connection information that you supplied when you defined the target.

  4. Modify the connection information as desired and click Finish.

Deleting a Defined Target

How to:

You can delete a target, rather than just disconnecting and closing it. When you delete a target, the node disappears from the list of RDBMS targets in the left pane of the iWay Explorer.

Procedure: How to Delete a Defined Target

  1. On the iWay Explorer tab, connect to and expand the Application Explorer node.
  2. Underneath the Application Explorer node, expand the RDBMS node.
  3. Right-click the target that you want to delete, for example, RDBMSTarget, and click Delete Target from the menu.

    A message is displayed, prompting you to confirm the deletion of the target.

  4. Click OK.

    The target node disappears from the list of available connections.