Personal tools
You are here: Home Oracle How To's Exporting and Compressing Oracle Databases
Navigation
Log in


Forgot your password?
 
Document Actions

Exporting and Compressing Oracle Databases

Exporting and Compressing Oracle Databases

 Purpose

Occasionally an ODBA will receive a request to provide a copy of a production database for the development community. One way to accomplish this is to export the
database and compress the exported file all in one script. The compressed
exported DB can then be ftp'd to the development server.


Steps:

The following outlines the steps necessary to accomplish this task.

  • Logon on as oracle to the server where the database resides which you are exporting.
  • Source the SID and ORACLE_HOME for the database you are exporting. For this example it is the XMS database.
  • cd to a directory that is big enough to hold your exported/compressed database. (The 33 gig database I exported and compressed, took about 800M of space after it was compressed.)
  • Run the following script. (wherever you see “xms” substitute the name of the database you are exporting.


NOTE: This script makes use of a unix operating system feature called pipes (mknod). This allows us to export the DB and at the same time compress the output file.

/usr/sbin/mknod xms_full p
exec > xmsfull.log 2>&1
cat xms_full | compress -c > xmsfullexp.dmp.Z &
exp file=xms_full parfile=exppar.txt &


         exppar.txt ….. (substitute system password)


         userid=system/

consistent=y
full=y
buffer = 200000



After the export is finished, you will have a compressed copy of the exported database in your current directory. “ xmsfullexp.dmp.Z”.

Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls