[英]Create User Quota Clause missing or invalid option
Executing this statement on DBeaver or sqplus works like a charm在 DBeaver 或 sqplus 上执行此语句就像一个魅力
CREATE USER flyway IDENTIFIED BY password
DEFAULT TABLESPACE system
TEMPORARY TABLESPACE system
QUOTA 20M on system;
But if I use it in java preparedstatement like this但是如果我在 java 中使用它准备好的语句这样
Class.forName("oracle.jdbc.driver.OracleDriver");
//step2 create the connection object
Connection con = DriverManager.getConnection(
"jdbc:oracle:thin:@localhost:1521:xe", "myuser", "mypassword")
//step3 create the statement object
Statement stmt = con.createStatement();
//step4 execute query
stmt.executeUpdate("CREATE USER flyway IDENTIFIED BY password "+
"DEFAULT TABLESPACE system "+
"TEMPORARY TABLESPACE system "+
"QUOTA 20M on system;"
);
//step5 close the connection object
con.close();
It says java.sql.SQLSyntaxErrorException: ORA-00922: missing or invalid option它说 java.sql.SQLSyntaxErrorException: ORA-00922: missing or invalid option
Now if I remove "QUOTA 20M on system" It works fine.现在,如果我删除“系统上的 QUOTA 20M”它工作正常。 But that quota is correct syntax so I don't get why it fails.
但是那个配额是正确的语法,所以我不明白为什么它会失败。 Why can't a set a quota from java?
为什么不能从 java 设置配额?
Alex Poole is correct POSTGRES driver works fine with the; Alex Poole 是正确的 POSTGRES 驱动程序可以正常工作; but the Oracle one just fails with errors that no one can understand
但是 Oracle 一个只是失败,错误无人能理解
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.