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);