MySQL的配置
------------------------------------------------------------------------------------------
URL:jdbc:mysql://192.168.3.7:3306/octopus_zhang?useUnicode=true&characterEncoding=gbk
USER: octopus
PASSWORD: octopus
JNDI-URL: java:comp/env/octopus/TopBirtPool
MySql连接数据库
------------------------------------------------------------------------------------------
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/chenpy","root","132");
------------------------------------------------------------------------------------------
oracle连接数据库
------------------------------------------------------------------------------------------
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection("jdbc:oracle:thin:@192.168.0.39:1521:tarenadb","openlab","open123");
------------------------------------------------------------------------------------------
db2连接数据库
------------------------------------------------------------------------------------------
Class.forName("com.ibm.db2.jcc.DB2Driver");
con = DriverManager.getConnection("jdbc:db2://192.168.3.8:50000/topicis","topicis","topicis");
------------------------------------------------------------------------------------------
sqlserver连接数据库
------------------------------------------------------------------------------------------
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
con = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=pubs","sa","");
------------------------------------------------------------------------------------------