IIRC, you can do all of it from one session. Let's say you're copying
stats from 'SOURCE_USER' to 'DEST_USER' while logged in as ADAWDOA ("a
DBA account which doesn't own anything" ;-)), who owns a statistics
table called XFER_STATS.
exec dbms_stats.export_schema_stats('SOURCE_USER','XFER_STATS',null,
user)
exec dbms_stats.import_schema_stats('DEST_USER','XFER_STATS',null,user)
--- "Orr, Steve" <[EMAIL PROTECTED]> wrote:
> Oh... So you exec dbms_stats.export_schema_stats(...) while logged in
> under the source schema owner user then you exec
> dbms_stats.import_schema_stats(...) while logged in under the target
> schema owner user? I wanted to do this under a DBA account which
> doesn't
> own anything.
>
> alter session set current_schema=Doh
> /
>
>
> -----Original Message-----
> Paul Baumgartel
> Sent: Tuesday, December 02, 2003 5:34 PM
> To: Multiple recipients of list ORACLE-L
>
>
> Steve, I've done this: first export the source schema's stats from
> the
> dictionary into a user table, then import from that user table into
> the
> dictionary for the target schema. (Use CREATE_STAT_TABLE to create
> the
> user table.)
>
> Paul Baumgartel
>
>
> --- "Orr, Steve" <[EMAIL PROTECTED]> wrote:
> > I see the schema import/export procedures in the package but they
> just
>
> > import/export the stats for a particular schema into or out of the
> > dictionary. There's no procedure to copy stats from one schema to
> > another within the dictionary... At least that's my understanding
> from
>
> > reading the docs.
> >
> >
> > -----Original Message-----
> > Sent: Tuesday, December 02, 2003 4:24 PM
> > To: Multiple recipients of list ORACLE-L
> >
> >
> > dbms_stats is the only sanctioned way to do it.
> >
> > Orr, Steve wrote:
> >
> > > 1 database instance, 2 nearly identical schemas. What's the best
> > > sanctioned way to copy stats, (including histograms), from one
> > schema
> > > to another?
> >
> >
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > --
> > Author: =?ISO-8859-1?Q?Mogens_N=F8rgaard?=
> > INET: [EMAIL PROTECTED]
> >
> > Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> > San Diego, California -- Mailing list and web hosting
> services
> >
> ---------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
>
> > the message BODY, include a line containing: UNSUB ORACLE-L (or the
>
> > name of mailing list you want to be removed from). You may also
> send
> > the HELP command for other information (like subscribing)
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > --
> > Author: Orr, Steve
> > INET: [EMAIL PROTECTED]
> >
> > Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> > San Diego, California -- Mailing list and web hosting
> services
> >
> ---------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
>
> > the message BODY, include a line containing: UNSUB ORACLE-L (or the
>
> > name of mailing list you want to be removed from). You may also
> send
> > the HELP command for other information (like subscribing).
>
>
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Paul Baumgartel
> INET: [EMAIL PROTECTED]
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the
> message BODY, include a line containing: UNSUB ORACLE-L (or the name
> of
> mailing list you want to be removed from). You may also send the
> HELP
> command for other information (like subscribing).
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Orr, Steve
> INET: [EMAIL PROTECTED]
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Paul Baumgartel
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).