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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Reverse engineer tablespaces.

Re: Reverse engineer tablespaces.

From: Rodd Holman <rodney.holman_at_lodgenet.com>
Date: Wed, 23 May 2001 13:42:36 -0700
Message-ID: <F001.0030C6C9.20010523131530@fatcity.com>

This mod grabs the current default storage parameters from dba_tablespaces

spool db_structure.txt
select 'create tablespace '||a.tablespace_name|| ' datafile

'||''''||b.file_name||''''||' size '||b.bytes/(1024 * 1024)||'M'||
' default storage ( initial '||a.initial_extent||' next 
'||a.next_extent||' pctincrease '||a.pct_increase||' maxextents 
'||a.max_extents||');'

from dba_tablespaces a, dba_data_files b where a.tablespace_name = b.tablespace_name;
spool off

Rodd

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 5/23/01, 3:30:29 PM, Roy Ferguson <rferguso_at_level1.com> wrote regarding Re: Reverse engineer tablespaces.:

> I'm not sure if this is what your looking for but take a look:

> spool db_structure.txt
> select 'create tablespace ' || a.tablespace_name ||
> ' datafile ' || '''' || b.file_name || ''''||' size ' || b.bytes/(1024 *
1024) || 'M' || \
> ' default storage ( initial ??k next ??k pctincrease ? maxextents ?);'
> from dba_tablespaces a, dba_data_files b where a.tablespace_name =
b.tablespace_name;
> spool off;
> exit;

> Roy

> >
> >So, I need to re-create a database to prepare for migration. The
current DB
> >is 8.0.6, and I need to create an 8.1.7 copy. Does anyone have a script
to
> >reverse engineer the CREATE TABLESPACE commands? I started working on
one,
> >but surely I can't be the first to invent the wheel.
> >
> >TIA,
> >Rich Jesse System/Database Administrator
> >Rich.Jesse_at_qtiworld.com Quad/Tech International, Sussex, WI
USA
> >--
> >Please see the official ORACLE-L FAQ: http://www.orafaq.com
> >--
> >Author: Jesse, Rich
> > INET: Rich.Jesse_at_qtiworld.com
> >
> >Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> >San Diego, California -- Public Internet access / Mailing Lists
> >--------------------------------------------------------------------
> >To REMOVE yourself from this mailing list, send an E-Mail message
> >to: ListGuru_at_fatcity.com (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).

> Roy E. Ferguson II
> Intel Sacramento
> 916-854-1123

> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Roy Ferguson
> INET: rferguso_at_level1.com

> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (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.com
--
Author: Rodd Holman
  INET: rodney.holman_at_lodgenet.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (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).
Received on Wed May 23 2001 - 15:42:36 CDT

Original text of this message

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