RUNSTATS Package Error [message #328508] |
Fri, 20 June 2008 06:35  |
durgadas.menon
Messages: 365 Registered: December 2007 Location: Nowhere
|
Senior Member |
|
|
Hi,
I am trying to use runstats_pkg but the compiler does not recognize it, Can anyone tell me why?
begin
runstats_pkg.rs_start;
for i in 1..10000
loop
/*Method1 - procedure with bind variable which inserts data into table T*/
method1('row '||I);
end loop;
runstats_pkg.rs_middle;
for i in 1..10000
/*Method2 - procedure without bind variable which inserts data into table T*/
loop
method2('row '||I);
end loop;
runstats_pkg.rs_stop;
end;
Quote: | SQL> @d:\test.sql
21 /
runstats_pkg.rs_start;
*
ERROR at line 3:
ORA-06550: line 3, column 3:
PLS-00201: identifier 'RUNSTATS_PKG.RS_START' must be declared
ORA-06550: line 3, column 3:
PL/SQL: Statement ignored
ORA-06550: line 10, column 3:
PLS-00201: identifier 'RUNSTATS_PKG.RS_MIDDLE' must be declared
ORA-06550: line 10, column 3:
PL/SQL: Statement ignored
ORA-06550: line 18, column 3:
PLS-00201: identifier 'RUNSTATS_PKG.RS_STOP' must be declared
ORA-06550: line 18, column 3:
PL/SQL: Statement ignored
|
[Updated on: Fri, 20 June 2008 06:38] by Moderator Report message to a moderator
|
|
|
|
|
|
|
Re: RUNSTATS Package Error [message #328653 is a reply to message #328622] |
Sat, 21 June 2008 03:05   |
durgadas.menon
Messages: 365 Registered: December 2007 Location: Nowhere
|
Senior Member |
|
|
Hi,
While executing the code I am getting 'insufficient privilege' error. The user has DBA role.
SQL> @d:\test.sql
from v$statname a, v$mystat b
*
ERROR at line 3:
ORA-01031: insufficient privileges
Package created.
Warning: Package Body created with compilation errors.
SQL> desc v$statname
Can you tell me why?
|
|
|
Re: RUNSTATS Package Error [message #328654 is a reply to message #328653] |
Sat, 21 June 2008 03:13   |
durgadas.menon
Messages: 365 Registered: December 2007 Location: Nowhere
|
Senior Member |
|
|
sorry...I was supposed to grant the select on the following exclusively..
SYS.V_$STATNAME
SYS.V_$MYSTAT
SYS.V_$TIMER
SYS.V_$LATCH
but now the error has changed..
SQL> @d:\test.sql
View created.
Package created.
Warning: Package Body created with compilation errors.
SQL> show error
Errors for PACKAGE BODY RUNSTATS_PKG:
LINE/COL ERROR
-------- -----------------------------------------------------------------
11/5 PL/SQL: SQL Statement ignored
11/17 PL/SQL: ORA-00942: table or view does not exist
13/5 PL/SQL: SQL Statement ignored
13/17 PL/SQL: ORA-00942: table or view does not exist
24/5 PL/SQL: SQL Statement ignored
24/17 PL/SQL: ORA-00942: table or view does not exist
44/5 PL/SQL: SQL Statement ignored
44/17 PL/SQL: ORA-00942: table or view does not exist
52/5 PL/SQL: SQL Statement ignored
56/40 PL/SQL: ORA-00942: table or view does not exist
67/9 PL/SQL: Statement ignored
LINE/COL ERROR
-------- -----------------------------------------------------------------
67/31 PLS-00364: loop index variable 'X' use is invalid
78/5 PL/SQL: SQL Statement ignored
84/49 PL/SQL: ORA-00942: table or view does not exist
93/9 PL/SQL: Statement ignored
93/31 PLS-00364: loop index variable 'X' use is invalid
SQL> desc v$timer
Name Null? Type
----------------------------------------- -------- ----------------------------
|
|
|
|
|
|