db2의 버전은 8.2 입니다.
SQLState:08001
SQLState:No suitable driver
SQLState:0
database connect error
이렇게 에러가 나네요..
DB_ConString01="jdbc:db2://61.74.133.9:60000/oppra";
DB_user01=db2inst
DB_PassWord01=initechinitech
jdbc_driver01=com.ibm.db2.jcc.DB2Driver
61.74.133.9는 db서버 ip구요.
*************************************************
try {
Class.forName(jdbc_driver01).newInstance();
} catch (Exception e) {
ret = -1;
System.out.println("jdbc driver load failed! :"+jdbc_driver);
e.printStackTrace();
}
try {
conn=DriverManager.getConnection(DB_ConString01,DB_user01,DB_PassWord01);
conn.setAutoCommit(Auto_Commit);
} catch (SQLException e) {
ret = -2;
System.out.println("Database Connection failed...");
System.out.println("DB_ConString01:"+DB_ConString01);
System.out.println("DB_user01:"+DB_user01);
System.out.println("DB_PassWord01:"+DB_PassWord01);
while(e!=null) {
System.out.println("SQLState:"+e.getSQLState());
System.out.println("SQLState:"+e.getMessage());
System.out.println("SQLState:"+e.getErrorCode());
e=e.getNextException();
}
} catch (Exception e) {
ret = -3;
e.printStackTrace();
}
*************************************************************************
javac -classpath .:./../../lib/iniOPPRA_v11.jar:./../../lib/db2jcc.jar:./../../lib/kmod.jar *.java
java -classpath .:./../../lib/iniOPPRA_v11.jar:./../../lib/db2jcc.jar:./../../lib/kmod.jar inf_to_ora_jupsu
컴파일과 실행은 저렇게 하였습니다.
잘못된것이 있나요??
환경설정 같은것을 따로 해주진않았구요. 해주어야하는것이 있나요?? 자바도 초보 디비도 초보라서 넘 난감합니다. ㅜㅜ
|