I have a 5GB oracle database that I want to export and then import on my own local database. Easy right?
The point is, I use oracle XE 10g which allows me to use up to 4GB. I then decided to make the export with the option "rows=N" and I would then fill my empty DB with what I need.
My export without any row is 1MB.
I created my user, granted privileges, created a 1GB tablespace and imported my 1MB file.
The problem is that the tables seem to have some pre-allocated space which means that my tablespace is still too small… 1GB space is too small for a 1MB dump, what a joke :/
I can't truncate the database, and I haven't found anything about turning off preallocation during either export or import.
How can I get this done?
Best Answer
It seems that you use the old export (
exp
) utility and not the datapump exportexpdp
. Forexp
there is a parametercompress
that manages the size of an initial extent of a table that is imported. The default value iscompress=y
which means that the initial extent of the table (this is in most cases the space preallocated when creating an empty table) is as large as the space the table currently uses. So you should use the paramtercompress=no
. Then the initial extent of an imported table is as large as the initial extent of the table in the source database.