Wednesday, October 18, 2023

DATAPUMP Schema Level EXPORT & IMPORT.--- for remapping the schema with another.


DATAPUMP Schema Level EXPORT & IMPORT.--- for remapping the schema with another.

 

 create an directory at OS level dp_17_10_2023; automatically log file and dmp files will be created in this directory

 SQL> create directory datapump_schema as 'D:\dp_17_10_2023';

 Directory created.

 Grant permission to schema:

 SQL> grant read,write on directory datapump_schema to varshini;

Grant succeeded.

 SQL> grant read,write on directory datapump_schema to Ranesh;

Grant succeeded.

 

EXPORT and SCHEMA.

expdp directory=datapump_schema dumpfile=varshini.dmp logfile=varshini_bkp.log schemas=varshini


 Export: Release 19.0.0.0.0 - Production on Tue Oct 17 09:14:05 2023 Version 19.19.0.0.0

 Copyright (c) 1982, 2023, Oracle and/or its affiliates. All rights reserved.

 Username: / as sysdba

 

Export another schema  

expdp directory=datapump_schema dumpfile=Ranesh.dmp logfile=Ranesh_bkp.log schemas=Ranesh

 

 IMPORT and SCHEMA for remapping. before import need to remove that Schema - Ranesh

 

impdp directory=datapump_schema dumpfile=varshini.dmp logfile=IMP_varshini.log remap_schema=varshini:Ranesh

No comments:

Table import and export.

Create Data Pump Directory. The first step in Oracle Data Pump is to create an OS level directory which will be used by Oracle for perform...