• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 790
  • Last Modified:

Whole database EXPORT

      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.

1 Solution
slightwv (䄆 Netminder) Commented:
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).
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now