exp and imp in oracle

Posted on 2012-09-04
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
    LVL 76

    Accepted Solution

    >>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
    >> What do the docs say?

    It says yes ...

    Let me try this and will update.
    LVL 16

    Author Closing Comment

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


    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the dā€¦
    Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
    Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
    This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now