Sunday, November 27, 2011

Exporting an Oracle XE Database



To export a dump file of the database, you need to use the expdp application. In Oracle XE on Windows, the executable is located in the folder "c:\oraclexe\app\oracle\product\10.2.0\server\BIN".

Just execute the expdp typing:

expdp usurname/password@XE directory=my_folder  dumpfile=myFile.dmp

Note that XE is the default SID name of Oracle XE. To connect to servers in your network, you need to configure other SID names in the TSNAMES.ORA file.

The directory to export the dump file can be a shared folder.

To import the dump file, there is the impdp application.

*Update


When importing, you can remap your table schema to a new user, to do this see about the REMAP_SCHEMA parameter. Ex.:


impdp myUser/password@xe dumpfile=banco.dmp REMAP_SCHEMA=(oldUser:myUser


When importing, maybe Oracle throw an error he can't find the Tablespace. Just create one and try importing again.

No comments:

Post a Comment