4 Configuring a SQL Server CDC Adapter

This chapter provides an example for creating an OracleAS adapter for SQL Server. To work with an OracleAS adapter for SQL Server, you must also configure either a BPEL process or a Mediator process. For information on using BPEL or Mediator, see Creating the Project in JDeveloper Examples.

Creating Outbound Interactions with the OracleAS Adapter for SQL Server

To work with the OracleAS Adapter for SQL Server and create outbound interactions, you must create a new SQL Server database and use the data to create a CDC Solution.

Requirements

The following is required to perform the tasks described in this chapter:

Adding the SQL Server Hospital Data Source

Prepare the System

In your SQL Server database, you should create a database called Hospital. In this database create the following tables and columns as described in Table 4-1.

Table 4-1 SQL Server Tables and Columns

Tables

Columns

HOSPITAL

HOSPNAME

HOSP_ADDRESS

HOSP_PHONE

ADMIN

PATIENT

HOSPNAME

WARDNO

PATNAME

PATADRESS

PAT_PHONE

BEDIDENT

DATEADMT

PREV_STAY_FLAG

PREV_HOSP

PREV_DATE

PREV_REASON

SYMPTOM

HOSPNAME

WARDNO

BEDIDENT

DIAGNOSE

SYMPDATE

PREV_TREAT_FLAG

TREAT_DESC

SYMP_DOCTOR

SYMP_DOCT_PHONE

WARD

HOSPNAME

WARDNO

TOT_ROOMS

TOT_BEDS

BEDAVAIL

WARDTYPE

Set up Machine Access to Oracle Connect

You begin by configuring access to the Windows computer with your SQL Server data. You configure this access with Oracle Connect. Open Oracle connect and follow the directions Setting Up a Windows Computer in Oracle Studio. Enter the following information in the Add machine dialog box:

Host name/IP address: Enter the name or IP address for the Mainframe computer with the Hospital database. This should be installed in the same directory as Oracle Connect.

Port: Enter the port number where the daemon is running. The default port is 2551.

Display name: You do not need to enter any information in this field (By default, the display name is the host name and the port number).

User name: If the computer you are accessing needs an administrator password. If so enter the name o f the computer's administrator.

Password: If necessary, enter the computer administrator's password.

Connect via NAT with fixed IP address: Select this if the machine uses the NAT (Network Address Translation) firewall protocol, with a fixed configuration, mapping each external IP to one internal IP, regardless of the port specified.

Create a Change Data Capture

You now create the change data capture for the tables you created. When you are finished you can create WSDL and binding (jca) files. See Create the JCA Configuration Files for more information.

These files contain the information needed to create the BPEL and Mediator projects in JDeveloper. For more information on using JDeveloper for the BPEL Process Manger and Mediator, see Creating the Project in JDeveloper Examples.

Before you begin to set up your change data capture ensure the SQL Server is set up to handle a change data capture. For information on how this is done see these topics.

Click Design and then click Next and Finish to use the default values in the screens. If you want to set up your staging area on a UNIX computer, then you must change that setting in the second screen. For more information, see Create a CDC Project.

Click Implement to go to the Implementation guide.

For Server Configuration, enter the following information:

Machine: Enter the information for the Windows computer with Oracle Connect installed.

Data Source: Enter the following:

SQL Server Name: Enter the name of the Hospital SQL Server database that you created for this project.

dbName: Enter the name of the server computer where the SQL Server is installed.

Stream Service: You can use the default settings, which records all changes to the journal and does not include the capture of before-image records.

Note: You must ensure that you enter the path to the Transient Storage Directory. This must be in the same location as defined in the transientStorage parameter. See Configuring the Template Input File for more information.

Logging Level: Use the default settings.

For CDC Service Configuration, enter the following information:

Machine: Enter the information for the computer you are using as your staging area. This must be a Windows or UNIX machine.

Stream Service: Enter the following:

In the Staging Area screen, enter a location for the change files on the computer you specified and the Staging Area computer.

In the Changed Data Capture Table Selection, select all of the tables.

In the remaining screens, click Next to use the default values.

Access Service Manager: Click Next in all of the screens to use the default values.

Create the JCA Configuration Files

You must create both a WSDL and JCA file to set up your connection with JDeveloper. You create the files using Oracle Studio before setting up the BPEL process or Mediator connections.

For information on how to create JCA configuration files, see Creating JCA Configuration Files. To create the files for the Hospital_CDCQueue adapter, do the following:

From the Configuration pane in Oracle Studio, expand the binding for the CDC staging area that you created. The name of the binding is the Project name for the CDC solution that you created in Oracle Studio with the suffix _SA.