Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> GATHER_SCHEMA_STATS from Java program
Hello
I don't have much experience in stored procedures. I'm having some trouble. I'm creating a java program that would compute statistics from the current schema in the Oracle DB.
Here's the main code below
stmt = con.prepareCall("begin ? := dbms_stats.gather_schema_stats(?,?); end;");
stmt.registerOutParameter(1, OracleTypes.CURSOR); stmt.setString(2, "ownname=> '" + oracleUser + "'"); stmt.setString(3, "cascade=> TRUE");
} catch (SQLException e) {
........
}
When I execute this I get the error
2005-03-31 09:26:59 ** - ** - ** New JDBC connection needed: driver name and
version: Oracle JDBC driver 10.1.0.2.0, URL:
jdbc:oracle:oci:@cyber10g_CYBERBASE
java.sql.SQLException: SQLException ORA-06550: line 1, column 13:
PLS-00306: wrong number or types of arguments in call to
'GATHER_SCHEMA_STATS'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Does anyone have any idea what I'm doing wrong? Thanks in advance. Received on Thu Mar 31 2005 - 02:31:13 CST
![]() |
![]() |