Skip to main content

Restoring from Oracle Dump Without any Data

I was trying to restore an Oracle backup dump the other day. The only catch was that I didn't want any data in the restore. However, large amount of data in the dump would have made the whole process last for a whole day ... no kidding. I started Googling around but unfortunately there was little to no information available. Once I found the solution I decided to share it for everybody's benefit.

Command for restoring from a dump file is age old imp command. So I am not going to go into that any further. What will do the trick for you is rows flag. If you want to import all the table structures with no data, use the flag as below

rows=n

Default for this flag is Y, so if you don't use this flag it will import all the data.

Comments

scoprion_4000 said…
can u write the command for import..meaning where to use the rows tag...???
Sachin Sinha said…
Here is the sample command. Use the options as you might need them.

imp username/***** FILE=xyzexp.dmp ANALYZE=N
BUFFER&H1000000 COMMIT=N COMPILE=Y CONSTRAINTS=Y FEEDBACK&H100000
FROMUSER=SIEBEL TOUSER=SIEBEL FULL=N GRANTS=Y IGNORE=Y INDEXES=N
LOG=c:\downloads\imp_data.log RECORDLENGTH&H32768 ROWS=Y
STATISTICS=NONE

Popular posts from this blog

Koshish Karne Walon Ki Haar Nahin Hoti …

An inspirational poem from Harivansh Rai Bachchan. Thanks to Vishva for the lyrics


Lehron se Darkar nauka par nahin hoti,
koshish karne walon ki haar nahin hoti

Nanhi cheenti jab daana lekar chalti hai,
chadhti deewaron par,
sau bar phisalti hai.
Man ka vishwas ragon mein saahas bharta hai,
chadhkar girna,
girkar chadhna na akharta hai.

Akhir uski mehnat bekar nahin hoti,
koshish karne walon ki haar nahin hoti.

Dubkiyan sindhu mein gotakhor lagata hai,
ja ja kar khali haath lautkar aata hai
Milte nahi sahaj hi moti gehre paani mein,
badhta dugna utsah isi hairani mein.

Muthi uski khali har bar nahin hoti,
koshish karne walon ki haar nahi hoti.

Asaflta ek chunauti hai,
ise sweekar karo,
kya kami reh gayi,
dekho aur sudhar karo.
Jab tak na safal ho,

neend chain ko tyago tum,
Sangharsh ka maidan chhodkar mat bhago tum.

Kuch kiye bina hi jai jaikar nahin hoti,
koshish karne walon ki haar nahin hoti.


- Harivansh Rai Bacchan

लहरों से डर कर नौका पार नहीं होती ,
कोशिश करने वालों  की हार नहीं होती।

नन्ही चींटी जब दा…

The latest #BigData #Analytics Daily! https://t.co/BDdeMOiHQ2 Thanks to @oriolto @AltheaDelalune @Parker_B_Assoc #bigdata #analytics

The latest #BigData #Analytics Daily! https://t.co/BDdeMOiHQ2 Thanks to @oriolto @AltheaDelalune @Parker_B_Assoc #bigdata #analytics Source: The latest #BigData#Analytics Daily! https://t.co/BDdeMOiHQ2 Thanks to @oriolto@AltheaDelalune@Parker_B_Assoc#bigdata#analytics — Sachin Sinha (@SachinSinha) November 23, 2017November 23, 2017 at 03:12PM
via IFTTT