Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: importing statistics

Re: importing statistics

From: Wolfgang Breitling <wbreitli_at_gmail.com>
Date: Wed, 31 Jan 2007 05:48:39 GMT
Message-ID: <Xns98C8E80BCFBFAbreitliwcentrexcccom@199.185.223.74>


"Ben" <balvey_at_comcast.net> wrote in news:1170088542.107218.152980 @v45g2000cwv.googlegroups.com:

> 9.2.0.5 Ent Ed AIX5L
>
> I am trying to import statistics using the
> dbms_stats.import_schema_stats procedure from one db/schema to
> another. The procedure died with an 'ORA-20000 Schema TRDTA does not
> exist or insufficient privileges' the schema does exist and I'm logged
> in as sysdba. In trying to find what would cause this, the only thing
> I see ( and fairly certain this is the cause ) is that some of the
> indexes are not named the same between prod and test environments.
> Would that cause my issue? In other words the _PK indexes are called
> _0 on some of my tables and vice versa. I'm not sure how this happened
> as it has been that way since I took over this database and I haven't
> researched renaming them yet.
> Would the best ( and simplest ) thing to do be 'ALTER INDEX ...
> RENAME ...' ?
>

Yes, missing objects will cause that. And an index that has a different name is of course missing in the target database. Same can happen for a table that is present in the source but not in the target. Or a column that has been added to a table in the source but not in the target.

One way to resolve this is to add the missing object - e.g. by synchrinizing the index names. The other is to correct the discrepancies in the stattab table by renaming or removing the superfluous entries. Received on Tue Jan 30 2007 - 23:48:39 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US