SQL Server with Merant Database Configuration
The instructions below describe how to configure SQL Server using a Merant
Database to work with the WebSphere Application Server Samples.
- On Windows:
- Open a command window.
- Change to the <WAS_ROOT>\bin directory.
- Invoke the following script:
SQLServerCreateSampleDB.bat SQL_Server_Server_Name
SQL_Server_DBA_userid SQL_Server_DBA_password
where:
- SQL_Server_Server_Name is the SQL Server name.
- SQL_Server_DBA_userid is the SQL Server DBA user ID.
- SQL_Server_DBA_password is the SQL Server DBA password.
Here is an example of the command syntax for Windows:
SQLServerCreateSampleDB.bat myServer admin passwd
The database
script requires that you provide the user ID and password of an account
that has SQL DBA authority.
- Point your browser to the WebSphere Application Server Administrative Console:
http://localhost:9090/admin.
- Create the Merant JDBC Driver:
- Expand Resources and click JDBC Drivers.
- Click New.
- Click Microsoft SQLServer via Merant SequeLink JDBC Driver.
- Click Next.
- Use the following values in the Properties window. You can leave the remaining
vaules blank:
Server Class Path: |
Merant_JDBC_driver_classes_location |
Name: |
MerantJdbcDriver |
Description: |
Merant JDBC Driver |
Implementation Class: |
com.merant.sequelink.jdbcx.datasource.SequeLinkDataSource |
where:
Merant_JDBC_driver_classes_location is the location of JAR files
sljc.jar and sljcx.jar on your system. Use the file
system separator for classpath entries between the two JAR files.
- Click OK.
- Save your configuration.
- Create the Sample DataSource Object:
- Expand Resources > JDBC Drivers > MerantJdbcDriver >
Data Sources and click New
- Use the following values in the Properties window. You can leave the
remaining values blank:
Name: |
SQL Server Samples DataSource |
JNDI Name: |
jdbc/sample |
Description: |
Sample Gallery SQL Server DataSource |
Category: |
Samples |
Default User ID: |
wsdemo |
Default Password: |
wsdemo1 |
- Click OK.
- Click SQL Server Samples DataSource.
- Click Resource Properties.
- Click serverName.
- Use the following values in the property sheet. You can leave the remaining
values blank:
Name: |
serverName |
Type: |
java.lang.String |
Value: |
servername |
where: servername is the actual host name.
- Click OK on the Resource Properties: serverName panel.
- Click portNumber.
- Use the following values in the Properties window. You can leave the
remaining values blank:
Name: |
portNumber |
Type: |
java.lang.Integer |
Value: |
port_number |
where:
port_number is the port number for the portnumber field. The
default port number for Merant is 19996 but you can change
this number during the Merant install process.
- Click OK on the Resource Properties: portNumber panel.
- Click disable2Phase.
- Use the following values in the Properties window. You can leave the
remaining values blank:
Name: |
disable2Phase |
Type: |
java.lang.Boolean |
Value: |
true |
- Click OK on the Resource Properties: disable2Phase
panel.
- Click OK on the Resource Properties panel.
- Click OK on the Data Sources panel.
- Save your configuration.
- Point your browser to the WebSphere Application Server Administrative Console:
http://localhost:9090/admin.
- Expand Resources > JDBC Drivers > idbJdbcDriver and click Data
Sources.
- Select the box next to Samples IDB DataSource and click Delete.
- Save your configuration.
- Shut down and restart WebSphere Application Server.
Run the servlet to create and configure the tables in the SAMPLE database.