Q
Manage Learn to apply best practices and optimize your operations.

How to precreate Oracle table extents and define extent size

Oracle expert Brian Peasland explains how to precreate an Oracle table extent size with a new INITIAL extent size after an Oracle import.

I have exported an Oracle 9i database (UNIX - Solaris) and I need to import it to an Oracle 9i database on a Windows server. I am using the Enterprise Management Console on the Windows server to do the export and import. The exported file is approx. 300 MB in size.

The exported file seems to be OK, however when importing the file, the data files in the target database increase far beyond what I expected and filled the disk space.

The original data file is just over 1 GB in size. My available disk space is 28GB, and this is being maxed out. E.g. After importing the first 28 tables, and only approximately 2,500 rows of data, the data file was 8GB in size.

What am I doing wrong?

When you export the table's contents, Oracle takes a look at the total space of the table and generates a CREATE TABLE statement with an INITIAL extent at least as large as the table's size. Depending on your allocation rules for your destination database's tablespace, your tables can be larger on import than they were on export. To stop this from happening, run the import statement as follows:

imp file=my_dump.dmp full=y show=y log=create.sql

The above will generate a file called create.sql which will contain the SQL statements Oracle will execute when creating the tables. Use these to precreate the tables in the destination database with a good INITIAL extent size, not the one in the generated file. Then import with IGNORE=Y.

Dig Deeper on Oracle database backup and recovery

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close