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: Ben <balvey_at_comcast.net>
Date: 31 Jan 2007 04:48:51 -0800
Message-ID: <1170247731.133263.232050@q2g2000cwa.googlegroups.com>


On Jan 31, 12:48 am, Wolfgang Breitling <wbrei..._at_gmail.com> wrote:
> "Ben" <bal..._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.- Hide quoted text -
>
> - Show quoted text -

Thank you for the reply. I believe I am going to create a script to synchronyze all my indexes. Do you happen to know the impact this will have on my PK constraints? The indexes in question are all primary key indexes. The constraints were created with ALTER TABLE ADD CONSTRAINT ... USING INDEX. Received on Wed Jan 31 2007 - 06:48:51 CST

Original text of this message

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