Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


exp and imp in oracle

Posted on 2012-09-04
Medium Priority
Last Modified: 2012-09-04
Hello Experts,

I am having 5 to 6 tables in one of my local database with data.

Now I want to export with the same structure too, so I am using the below code as :

exp user/pass@xe file=D:\all_tab.dmp log=all_tab.log tables=(tab1,tab2,tab3,...tab6) rows=yes indexes=yes statistics=none 

Open in new window

Will this also take the constraints too ?

And if I do not have the tables on my target database then will I be able to import it with the same structure ?

And lastly is my import code correct , which will import the data and the structure too?

imp user/pass@host file=D:\all_tab.dmp fromuser=user1 touser=user2 statistics=none log=D:\all_tab_imp.log

Open in new window

Question by:Swadhin Ray
  • 2
LVL 78

Accepted Solution

slightwv (䄆 Netminder) earned 2000 total points
ID: 38364835
>>Will this also take the constraints too ?

What do the docs say?

Look at the following table:  Table 21-1 Objects Exported in Each Mode


Hint:  You are using "Table Mode"

>>which will import the data and the structure too?

It will try to create the tables.  Since you do not use the IGNORE flag, if the table does exist, this will cause an error.

The docs also talk about this.
LVL 16

Author Comment

by:Swadhin Ray
ID: 38364882
>> What do the docs say?

It says yes ...

Let me try this and will update.
LVL 16

Author Closing Comment

by:Swadhin Ray
ID: 38365939
@slightwv: You are a champ .. :)


Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question