1,mssql 2005 jdbc驱动包,见附件。
1)mssql安装:按指引安装
2)打开 : 程序 - microsoft SQL server 2005 - sql server management studio
先用默认用户sa登陆进去, 安全性 - 登录名 - 右键(新建登录名)
3)程序测试
import java.sql.*;
public class Test {
public static void main(String[] srg) {
String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver";//加载JDBC驱动
String dbURL = "jdbc:sqlserver://192.168.1.104:1433;DatabaseName=testdb";//连接服务器和数据库testdb
String userName = "myusername";//用户名
String userPwd = "mypass";//密码
Connection dbConn;
try {
Class.forName(driverName);
dbConn = DriverManager.getConnection(dbURL, userName, userPwd);
System.out.println("Connection Successful!");//如果连接成功 控制台输出Connection Successful!<br>
} catch (Exception e) {
e.printStackTrace();
}
}
}
4)proxool配置
<?xml version="1.0" encoding="UTF-8"?>
<something-else-entirely>
<proxool>
<alias>test</alias>
<driver-url>
jdbc:sqlserver://192.168.1.104:1433;DatabaseName=testdb
</driver-url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<driver-properties>
<property name="useUnicode" value="true"/>
<property name="characterEncoding" value="UTF-8"/>
<property name="user" value="myusername"/>
<property name="password" value="mypass"/>
</driver-properties>
<house-keeping-sleep-time>90000</house-keeping-sleep-time>
<maximum-new-connections>50</maximum-new-connections>
<prototype-count>5</prototype-count>
<maximum-connection-count>100</maximum-connection-count>
<minimum-connection-count>10</minimum-connection-count>
<trace>true</trace>
<verbose>false</verbose>
<statistics>10s,1m,1d</statistics>
<statistics-log-level>ERROR</statistics-log-level>
</proxool>
</something-else-entirely>
5,表间数据导入
insert into job(bid,jid) select depid,jobid from tt002