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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Import with new table & index extent sizes

Re: Import with new table & index extent sizes

From: <oratune_at_aol.com>
Date: Thu, 31 Aug 2000 21:02:00 GMT
Message-ID: <8omh3q$f7b$1@nnrp1.deja.com>

In article <39AEBD1C.AB5CCBF7_at_dteenergy.com>,   Gregory P Lechkun <lechkung_at_dteenergy.com> wrote:
>
> --------------616E89D0651821B3847CDEDD
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> Hello,
>
> I have a full export and I want to import it into a new instance so
 that
> the table and index extent sizes default to what my new instance's
> tablespace extents default sizes are. I'm doing this so that all my
> objects in the tablespaces are set to a uniform size (4MB).
>
> Question: How do I make the import command ignore the table and index
> sizes that are set in my old instance and use the tablespace default
> setting?
>
> This is what par file looks like:
>
> BUFFER=5242880
> COMPRESS=N
> CONSISTENT=Y
> CONSTRAINTS=Y
> FILE=CIL_EXPORTS:UP02_FULL_EXPORT
> FULL=Y
> GRANTS=Y
> INDEXES=Y
> LOG=CIL_EXPORTS:UP02_EXPORT.LOG
> ROWS=Y
>
> --
> Thanks in advance,
> Greg Lechkun
> gpl :-)
>
> DTE
>

Energy==================================================================
==
>
> DTE ////// //////////// Gregory Lechkun - EM&D/PDO-PT
> DTE // // // // Power Application Software Engineer
> DTE // // // //// lechkung_at_dteenergy.com
> DTE // // // //
> DTE ////// // //////
>
> --------------616E89D0651821B3847CDEDD
> Content-Type: text/html; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> <html>
> <font face="Arial,Helvetica">Hello,</font>
> <p><font face="Arial,Helvetica">I have a full export and I want to
 import
> it into a new instance so that the table and index extent sizes
 default
> to what my new instance's tablespace extents default sizes are.&nbsp;
 I'm
> doing this so that all my objects in the tablespaces are set to a
 uniform
> size (4MB).</font>
> <p><font face="Arial,Helvetica">Question: How do I make the import
 command
> ignore the table and index sizes that are set in my old instance and
 use
> the tablespace default setting?</font>
> <p><font face="Arial,Helvetica">This is what par file looks
 like:</font>
> <blockquote><font face="Arial,Helvetica"><font
 size=-1>BUFFER=5242880</font></font>
> <br><font face="Arial,Helvetica"><font
 size=-1>COMPRESS=N</font></font>
> <br><font face="Arial,Helvetica"><font
 size=-1>CONSISTENT=Y</font></font>
> <br><font face="Arial,Helvetica"><font
 size=-1>CONSTRAINTS=Y</font></font>
> <br><font face="Arial,Helvetica"><font
 size=-1>FILE=CIL_EXPORTS:UP02_FULL_EXPORT</font></font>

> <br><font face="Arial,Helvetica"><font size=-1>FULL=Y</font></font>
> <br><font face="Arial,Helvetica"><font size=-1>GRANTS=Y</font></font>
> <br><font face="Arial,Helvetica"><font size=-1>INDEXES=Y</font></font>
> <br><font face="Arial,Helvetica"><font
 size=-1>LOG=CIL_EXPORTS:UP02_EXPORT.LOG</font></font>
> <br><font face="Arial,Helvetica"><font
 size=-1>ROWS=Y</font></font></blockquote>
>
> <p><br><font face="Arial,Helvetica">--</font>
> <br><font face="Arial,Helvetica">Thanks in advance,</font>
> <br><font face="Arial,Helvetica">Greg Lechkun</font>
> <br><font face="Arial,Helvetica">gpl :-)</font>
> <p><font face="Courier New,Courier"><font size=-1>DTE
Energy==================================================================
==</font></font>
> <br><font face="Courier New,Courier"><font
 size=-1>DTE&nbsp;&nbsp;&nbsp;&nbsp;
> ////// ////////////&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gregory
 Lechkun
> - EM&amp;D/PDO-PT</font></font>
> <br><font face="Courier New,Courier"><font
 size=-1>DTE&nbsp;&nbsp;&nbsp;
> //&nbsp;&nbsp; //&nbsp; //&nbsp;&nbsp;
 //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> Power Application Software Engineer</font></font>
> <br><font face="Courier New,Courier"><font size=-1>DTE&nbsp;&nbsp;
 //&nbsp;&nbsp;

> //&nbsp; //&nbsp;&nbsp;

 ////&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> lechkung_at_dteenergy.com</font></font>
> <br><font face="Courier New,Courier"><font size=-1>DTE&nbsp;
 //&nbsp;&nbsp;
> //&nbsp; //&nbsp;&nbsp; //</font></font>
> <br><font face="Courier New,Courier"><font size=-1>DTE
 //////&nbsp;&nbsp;
> //&nbsp;&nbsp; //////</font></font>
> <br>&nbsp;</html>
>
> --------------616E89D0651821B3847CDEDD--
>
>

You cannot ignore the extent sizing in the import file. You can, however, dump the table and index definitions from the import file using the indexfile parameter:

imp <user/pass> file=... full=y indexfile=myschema.sql

This will send the create table and create index statements to a file named myschema.sql (you can name the file anything you wish). Edit this file -- the CREATE TABLE statements are REMarked so that they will not execute from the script as generated. However, all necessary parameters, including tablespace and extent sizing, for both the tables and the indexes are in this file. Remove the connect statement, unremark the table creates, change the extent sizes for the tables and indexes then run this script prior to importing the data. This will create the tables and indexes with the uniform sizing you desire (presuming, of course, that you set the sizing uniform in the script). Import the data after the script has finished using the ignore=y parameter to imp:

imp <user/pass> file=.... full=y ignore=y

This will ignore the errors generated because the tables and indexes already exist and will proceed to load the data into the tables. All extents created will then be uniform.

--
David Fitzjarrell
Oracle Certified DBA


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Aug 31 2000 - 16:02:00 CDT

Original text of this message

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