4 确认MSSQLServer的端口号(这点比较重要) And to find the port number where your instance is running, run the server network utility and select the server instance and select the TCP/ip. When you click the PRoperties button, it will show the port.
5 启动WebLogic
6 打开IE,在地址栏中输入:http://localhost:7001/console
7 输入用户名和密码
8 在左边的目录树中选中Services->JDBC->Connection Pools,单击右侧的Configure a new JDBC Connection Pool.,输入以下信息:
. 在左边的目录树中选中Services->JDBC->Data Sources(或者TXData Sources),单击右侧的Configure a new JDBC Connection Pool.,输入以下信息:
Configuration->General页: Name = SQLServer Tx Data Source JNDI Name = SQLServer Pool Name = MSSQLServerConnectionPool
选中Row Prefetch Enabled
单击Create建立数据源。
12 Targets->Server页:
将myserver(服务器名称)移至右侧的列表中,但击单击Apply,配置完毕。
13 reboot server
二、采用WebLogic的JDBC Driver for SQL Server
1确认MSSQLServer的端口号(这点比较重要) And to find the port number where your instance is running, run the server network utility and select the server instance and select the TCP/IP. When you click the properties button, it will show the port.
2 启动WebLogic
3 打开IE,在地址栏中输入:http://localhost:7001/console
4 输入用户名和密码
5 在左边的目录树中选中Services->JDBC->Connection Pools,单击右侧的Configure a new JDBC Connection Pool.,输入以下信息:
. 在左边的目录树中选中Services->JDBC->Data Sources(或者TXData Sources),单击右侧的Configure a new JDBC Connection Pool.,输入以下信息: Configuration->General页: Name = SQLServer Tx Data Source JNDI Name = SQLServer Pool Name = WLSQLServerConnectionPool 选中Emulate Two-Phase Commit for non-XA Driver和Row Prefetch Enabled
单击Create建立数据源。
9 Targets->Server页:
将myserver(服务器名称)移至右侧的列表中,但击单击Apply,配置完毕。
10 reboot server
Re:WebLogic中SQL Server2000的JDBC Pool配置
上面的配置文档很不错,不过个人建议,在采用 MS SQL server数据库的系统,尽量不要使用weblogic jDriver或ms mssql driver。原因如下:
(1)在以后的版本中,weblogic 将不再对jDriver of mssql server进行支持
0. To update the Oracle Thin Driver bundled with WebLogic Server set CLASSPATH=%ORACLE_HOME%/jdbc/lib/classes12.zip;%WL_HOME%/lib/weblogic.jar;%CLASSPATH% (Windows)
1. go to Services/JDBC/Connection Pools page of the weblogic console.
2. Click Configure a new JDBC Connection Pool
3. Fill in the information as following (suppose you are using the oracle jdbc thin driver)
//Instantiate the driver: driver = (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance(); //Make the connection: con = driver.connect("jdbcracle:thin:@150.0.5.130:1521:ORACLE", user1, pass1);