我正在尝试使用C# .net收集oracle模式的统计信息
command = new OracleCommand();
command.CommandText = "DBMS_STATS.GATHER_SCHEMA_STATS";
command.Parameters.Add(new OracleParameter("ownname", "APP_PM"));
command.Parameters.Add(new OracleParameter("estimate_percent", 100));
command.Parameters.Add(new OracleParameter("degree", 30));
command.Parameters.Add(new OracleParameter("cascade", "TRUE"));
appEngine.ExecuteSProc(command);我得到了这个例外。
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'GATHER_SCHEMA_STATS'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored有谁知道吗?
发布于 2014-09-12 20:13:03
关于CASCADE参数的问题,如果您不能传递布尔值,则可以使用SET_PARAM procedure设置参数值。
语法:
DBMS_STATS.SET_PARAM (
pname IN VARCHAR2,
pval IN VARCHAR2);鲍勃的建议很好。您可以将其包装在PL/SQL匿名块中,并将其作为脚本执行。
https://stackoverflow.com/questions/25804903
复制相似问题