tags:

views:

6526

answers:

2

hi,

In Oracle.. Using PL/Sql DEveloper..

i need to take dump of a user(including table,procedure,etc.) as "FILENAME.dmp".

if i create a new user and import that "FILENAME.dmp" then, everything would be created.

Kindly tel me, how to take .dmp file..

Don tel the option run->EXP or run->imp.. Coz, due to some problem, that feture is not working for me..

Thanks in advance..

A: 

export ( or datapump if you have 10g/11g ) is the way to do it.. why not ask how to fix your problems with that rather than trying to find another way to do it?

Matthew Watson
+1  A: 

EXP (export) and IMP (import) are the two tools you need. It's is better to try to run these on the command line and on the same machine.

It can be run from remote, you just need to setup you TNSNAMES.ORA correctly and install all the developer tools with the same version as the database. Without knowing the error message you are experiencing then I can't help you to get exp/imp to work.

The command to export a single user:

exp userid=dba/dbapassword OWNER=username DIRECT=Y FILE=filename.dmp

This will create the export dump file.

To import the dump file into a different user schema, first create the newuser in SQLPLUS:

SQL> create user newuser identified by 'password' quota unlimited users;

Then import the data:

imp userid=dba/dbapassword FILE=filename.dmp FROMUSER=username TOUSER=newusername

If there is a lot of data then investigate increasing the BUFFERS or look into expdp/impdp

*Most common errors for exp and imp are setup. Check your PATH includes $ORACLE_HOME/bin, check $ORACLE_HOME is set correctly and check $ORACLE_SID is set*

Guy