Hi, version 4.0.3 SP1 of JBoss AS ships with the following example file for accessing MS Sql Server:
| <datasources> | <local-tx-datasource> | <jndi-name>MSSQLDS</jndi-name> | <connection-url>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=MyDatabase</connection-url> | <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class> | <user-name>x</user-name> | <password>y</password> | <!-- sql to call when connection is created | <new-connection-sql>some arbitrary sql</new-connection-sql> | --> | | <!-- sql to call on an existing pooled connection when it is obtained from pool | <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql> | --> | | <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) --> | <metadata> | <type-mapping>MS SQLSERVER2000</type-mapping> | </metadata> | </local-tx-datasource> | | </datasources> | I found that the following configuration works for MS SQL Server 2005: | <datasources> | <local-tx-datasource> | <jndi-name>MSSQLDS</jndi-name> | <connection-url>jdbc:sqlserver://localhost:1433;databaseName=MyDatabase</connection-url> | <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class> | <user-name>x</user-name> | <password>y</password> | <!-- sql to call when connection is created | <new-connection-sql>some arbitrary sql</new-connection-sql> | --> | | <!-- sql to call on an existing pooled connection when it is obtained from pool | <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql> | --> | | <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) --> | <metadata> | <type-mapping>MS SQLSERVER2000</type-mapping> | </metadata> | </local-tx-datasource> | | </datasources> | Regards, Andreas View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3918464#3918464 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3918464 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user