Tuesday, June 18, 2013

Data Pump Process

1) To test Schema names in Database( Connect with Admin Privileges)
     select * from  dba_users order by 1;

2) To Drop Existing User ,  Check for the Datafiles and Tablesspaces
     SELECT * FROM DBA_DATA_FILES; 

3) Drop Existing User  
    drop user CEPM cascade;

4) To Drop Tablespace with Datafiles 
     DROP TABLESPACE cepmtest INCLUDING CONTENTS AND DATAFILES;

5) after completing the above process to check users
     SELECT * FROM  DBA_USERS ORDER BY 1;

6) To Create table space for the User
     create tablespace cepm datafile '/u01/app/oracle/oradata/elcaro/cepm01.dbf'   SIZE 10G; 

7) After Atep 6 Create a user Using the Following Command 
    grant connect,resource to cepm identified by cepm;  

8) Assign Tables Space for Above Created User
    ALTER USER CEPM DEFAULT TABLESPACE CEPM; 

9) Apply Grant Privileges to the User
    GRANT CREATE ANY TABLE, SELECT ANY TABLE, CREATE ANY PROCEDURE,          EXECUTE   ANY PROCEDURE, CREATE ANY VIEW,CREATE ANY TYPE, CREATE ANY  SYNONYM ,CREATE ANY TRIGGER TO CEPM; 

10) Check the Logical Directories For the Data Pump  
      SELECT *FROM DBA_DIRECTORIES; 
      DATA_PUMP_DIR ----  This Logical Dump Directory Created While Create a Database  

10.1) To create a LOgical directory
       create directory expdp_dir as '/u01';
       grant read, write on directory expdp_dir to system, chdb; 

11) To Export Using Data Pump From EFPO DB
      expdp DIRECTORY=expdp_dir DUMPFILE=cepm_efpo_20130618.dmp                                 LOGFILE=efpo_20130618.log schemas=cepm,cepmro 
Note: Here expdp_dir is the Logical Directory

12) After Completing the Logical Export Copy this file in to Destination DB
       In perticular Logical Directory location 
       Copy Data pump file from /u02/backupef/cepm_efpo_20130618.dmp  to the ELCARO Machine in    to   the location /u01/app/oracle/admin/elcaro/dpdump/

scp cepm_efpo_20130618.dmp root@vm-cvce-um-00c:/u01/app/oracle/admin/elcaro/dpdump/

13) import the Logical Dump File in to the Elcaro DB
      impdp REMAP_SCHEMA=cepm:cepm REMAP_TABLESPACE=cepm:cepm    DIRECTORY=DATA_PUMP_DIR DUMPFILE=cepm_efpo_20130618.dmp  LOGFILE=cepm_efpo_20130618imp.log schemas=cepm

No comments :

Post a Comment