Whole database EXPORT

Posted on 2007-08-01
Last Modified: 2013-12-19
      I want to refresh a development database with production data. The database size is around 3GB.  As this is a full EXPORT and IMPORT of the database, how can i truncate the before data in development instance? I can directly IMPORT but that would leave some duplicate data. So, i would like to clean the development database first and then IMPORT with the new production data. Do i have to go and do a truncate at each user level or is there any way to get around this problem?

Also, do we have to do a FULL database export as SYS? or will the SYSTEM work?

Any information will be of great help.

Question by:harris2107
    LVL 76

    Accepted Solution

    FULL exports are fine.  There are those that will disagree with me but I would not do a FULL import.  FULL imports also try to import the SYSTEM user (or at least it used to.  I haven't done them in a while for this very reason).

    SYSTEM should work fine for the export and import.

    Depending on the number of schemas in the system, I would probably drop and recreate all the schemas then do a 'OWNER' specific import for the schemas in question.  This would be quicker than truncating all the tables ( again it depends on the setup).
    LVL 8

    Expert Comment

    I would add:  Create a specific user that you will use for all your exports, with the following privileges as Sys:

    create user backup_user identified by backup_user default tablespace users;
    grant connect, exp_full_database, imp_full_database, select_catalog_role, unlimited tablespace, select any sequence, become user, backup any table, analyze any to backup_user;

    grant select on sys.incexp to backup_user;
    grant select on sys.incfil to backup_user;
    grant select on sys.incvid to backup_user;            

    Now use this to import as slightwv says.


    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
    Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

    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

    20 Experts available now in Live!

    Get 1:1 Help Now