import java.sql.*;
import oracle.jdbc.*;try {
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String Url= "jdbc:oracle:thin:@192.192.168.1:1521:oracle";
String User= "";
String Pass= "";
String sqlstr="";//创建用户的sql语句
conn = DriverManager.getConnection(Url, User, Pass);
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
stmt.executeUpdate(sqlstr);
}
catch (SQLException ex) {
System.out.println("sql oracle exception");
}
catch (ClassNotFoundException ex) {
}
catch (IllegalAccessException ex) {
}
catch (InstantiationException ex) {
}
import oracle.jdbc.*;try {
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String Url= "jdbc:oracle:thin:@192.192.168.1:1521:oracle";
String User= "";
String Pass= "";
String sqlstr="";//创建用户的sql语句
conn = DriverManager.getConnection(Url, User, Pass);
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
stmt.executeUpdate(sqlstr);
}
catch (SQLException ex) {
System.out.println("sql oracle exception");
}
catch (ClassNotFoundException ex) {
}
catch (IllegalAccessException ex) {
}
catch (InstantiationException ex) {
}
你的程序可以创建用户
但是怎么给用户创建角色和系统权限呢
还需要那些参数呢???????????