Using SQL Server Management Studio, create a new SQL Server database, PUBS, on your local default instance of SQL Server, and configure it to use SQL Server authentication by providing a user ID and password. See your SQL Server documentation for instructions.
If you have closed Enterprise Developer since completing Tutorial: Reusing Existing COBOL Programs in a Java Environment, open it again; then open the Java EE perspective and the Project Explorer.
Now that the JDBC driver is available for JBoss, you must catalog a connection that uses the driver, providing a DSN for the connection that you specify in an EXEC SQL CONNECT statement:
<subsystem xmlns="urn:jboss:domain:datasources:1.0"> <datasources>
<datasource jndi-name="java:/pubs" pool-name="pubs-Pool"> <connection-url>jdbc:sqlserver://localhost:1433;databaseName=Pubs</connection-url> <driver>sqlserver</driver> <pool> <min-pool-size>10</min-pool-size> <max-pool-size>10</max-pool-size> <prefill>true</prefill> </pool> <security> <user-name>SQLServerUserName</user-name> <password>SQLServerPassword</password> </security> </datasource>
<driver name="sqlserver" module="com.microsoft.sqlserver"/>