gather stats ora-20000 - Oracle Server
This is a discussion on gather stats ora-20000 - Oracle Server ; I've been trying to execute code ( logged on as user LIVE ) to gather system stats & get the following BEGIN * ERROR at line 1: ORA-20000: Unable to analyze INDEX "LIVE"."DSX_CODA_C_LINES_DT_IDX_1", insufficient privileges or does not exist ORA-06512: ...
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| system stats & get the following BEGIN * ERROR at line 1: ORA-20000: Unable to analyze INDEX "LIVE"."DSX_CODA_C_LINES_DT_IDX_1", insufficient privileges or does not exist ORA-06512: at "SYS.DBMS_STATS", line 9375 ORA-06512: at "SYS.DBMS_STATS", line 9389 ORA-06512: at line 2 I've granted gather_system_stats & analyze any to user ...any ideas? regards Chris B PS The object does exist PS I've included code below BEGIN DBMS_STATS.GATHER_TABLE_STATS ( ownname => 'LIVE', tabname => 'DSX_CODA_CANCEL_LINES', method_opt => 'FOR ALL INDEXED COLUMNS SIZE 150', CASCADE => TRUE, granularity => 'PARTITION'); END; |
|
#2
| |||
| |||
|
Which version of Oracle are you using? I've encountered a bug in 8i (8.1.7) that has resulted in that exception being thrown for a Local Index on a partitioned table when using CASCADE => TRUE. I don't personally have access to Metalink at my current site (I'm a contractor, and not allowed ;o)), but I seem to remember reading something about this bug somewhere, either on this forum or on http://asktom.oracle.com. I got around it by setting CASCADE => FALSE in the DBMS_STATS.GATHER_TABLE_STATS procedure, and just using the GATHER_INDEX_STATS procedure instead. |
|
#3
| |||
| |||
|
Which version of Oracle are you using? I've encountered a bug in 8i (8.1.7) that has resulted in that exception being thrown for a Local Index on a partitioned table when using CASCADE => TRUE. I don't personally have access to Metalink at my current site (I'm a contractor, and not allowed ;o)), but I seem to remember reading something about this bug somewhere, either on this forum or on http://asktom.oracle.com. I got around it by setting CASCADE => FALSE in the DBMS_STATS.GATHER_TABLE_STATS procedure, and just using the GATHER_INDEX_STATS procedure instead. |
|
#4
| |||
| |||
|
chris b wrote: > I've been trying to execute code ( logged on as user LIVE ) to gather > system stats & get the following > > BEGIN > * > ERROR at line 1: > ORA-20000: Unable to analyze INDEX "LIVE"."DSX_CODA_C_LINES_DT_IDX_1", > insufficient privileges or does not exist > ORA-06512: at "SYS.DBMS_STATS", line 9375 > ORA-06512: at "SYS.DBMS_STATS", line 9389 > ORA-06512: at line 2 It isn't telling you that DBMS_STATS doesn't exist ... it is telling you that the index doesn't exist or you have no privileges to analyze it. -- Daniel A. Morgan http://www.psoug.org damorgan@x.washington.edu (replace x with u to respond) |
|
#5
| |||
| |||
|
chris b wrote: > I've been trying to execute code ( logged on as user LIVE ) to gather > system stats & get the following > > BEGIN > * > ERROR at line 1: > ORA-20000: Unable to analyze INDEX "LIVE"."DSX_CODA_C_LINES_DT_IDX_1", > insufficient privileges or does not exist > ORA-06512: at "SYS.DBMS_STATS", line 9375 > ORA-06512: at "SYS.DBMS_STATS", line 9389 > ORA-06512: at line 2 It isn't telling you that DBMS_STATS doesn't exist ... it is telling you that the index doesn't exist or you have no privileges to analyze it. -- Daniel A. Morgan http://www.psoug.org damorgan@x.washington.edu (replace x with u to respond) |
|
#6
| |||
| |||
|
thanks ...I am trying to find out what this priviledge is!! Any ideas? regards Chris B |
|
#7
| |||
| |||
|
thanks ...I am trying to find out what this priviledge is!! Any ideas? regards Chris B |
|
#8
| |||
| |||
|
Is it custom table? If it is please check whether the owner (db user for custom schema) is in fnd_oracle_userid table. This database username should be in that table.
|
|
#9
| |||
| |||
|
If objects get created while logged in as one user yet gather stats get run for another owner that doesn't own the object for which dbms_stats are being gathered then ora-20000 can occur as shown: SQL> show userThe table got create while logged in as SYSTEM so it owns it not user XXX so dbms_stats kicks out ORA-20000. |
|
#10
| |||
| |||
|
Hi, Nice discussion with knowledge sharing. Thanks a lot. |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
All times are GMT -4. The time now is 03:02 PM.




Linear Mode