Menu Chiudi

Oracle 10g compressed export import

Import/Export compresso

Sometime happens that I needed to make a database export (either partially or ‘FULL’) not having enough disk free space available for all the operations. The export file by itself could barely fit into the few free disk space available so that I could not even think to compress it, because almost at the end of compression (gzip) the scenario would have been: export_file.dmp added to the almost 99.9% of the compressed export_file.dmp would exceed the free disk space available.

The following examples show how to do an export into a compressed file (gzip) in one single step to avoid wasting disk space.

momo@ora10g:~ $ mkfifo fifo_dbexport_20081119.dmp
momo@ora10g:~ $
momo@ora10g:~ $ nohup gzip \
      < fifo_dbexport_20081119.dmp \
      > real_db_export_20081119.dmp.gz &
momo@ora10g:~ $
momo@ora10g:~ $ nohup exp \
      scott/tiger \
      tables=(TABLE_1, TABLE_2, TABLE_3) \
      FILE=fifo_dbexport_20081119.dmp \
      LOG=dbexport_20081119.log &
momo@ora10g:~ $
momo@ora10g:~ $ rm fifo_dbexport_20081119.dmp

The following examples show how to do an export into a compressed file (gzip) in one single step to avoid wasting disk space.

momo@ora10g:~ $ mkfifo fifo_dbimport_20081119.dmp
momo@ora10g:~ $ nohup gzip -d \
      < real_db_export_20081119.dmp.gz \
      > fifo_dbimport_20081119.dmp &
momo@ora10g:~ $ nohup imp \
      scott/tiger \
      tables=(TABLE_1, TABLE_2, TABLE_3) \
      IGNORE=Y \
      FILE=fifo_dbimport_20081119.dmp \
      LOG=dbimport_20081119.log &
momo@ora10g:~ $ rm fifo_dbimport_20081119.dmp

I hope this was useful

Condividi
Leggi anche:   Come installare Cygwin su Windows ed emulare Linux

Disclaimer

Questa pagina potrebbe contenere link di affiliazione. Gli acquisti o gli ordini che effettuerai tramite tali link possono generare commissioni che ci aiutano a sostenere questo sito web.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato.

Moderazione dei commenti attiva. Il tuo commento non apparirà immediatamente.

Scroll to top button