Exporting and Importing using Datapump
Exporting from lower version and Importing to Higher version of oracle.
or Other words Application Schema Migration from one database (11.2.0.4) (SUSE o/s ) to linux o/s running 12.2.0.1 database
Steps taken to fulfil the activity . Though it is the simplest task to perform but providing steps becomes handy .
1. Below Steps to be performed target database.
a)
CREATE TABLESPACE NEIGHBOURHOOD DATAFILE
'/data/oragen1d/neighbourhood01.dbf' SIZE 4500M AUTOEXTEND ON NEXT 20M MAXSIZE 10000M
LOGGING
ONLINE
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;
b)
CREATE USER NEIGHBOURHOOD
IDENTIFIED BY nhood
DEFAULT TABLESPACE NEIGHBOURHOOD
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
ACCOUNT UNLOCK;
-- 1 Role for NEIGHBOURHOOD
GRANT CONNECT TO NEIGHBOURHOOD;
ALTER USER NEIGHBOURHOOD DEFAULT ROLE ALL;
-- 6 System Privileges for NEIGHBOURHOOD
GRANT CREATE INDEXTYPE TO NEIGHBOURHOOD;
GRANT CREATE SEQUENCE TO NEIGHBOURHOOD;
GRANT CREATE TABLE TO NEIGHBOURHOOD;
GRANT CREATE TRIGGER TO NEIGHBOURHOOD;
GRANT CREATE TYPE TO NEIGHBOURHOOD;
GRANT CREATE VIEW TO NEIGHBOURHOOD;
-- 1 Tablespace Quota for NEIGHBOURHOOD
ALTER USER NEIGHBOURHOOD QUOTA UNLIMITED ON NEIGHBOURHOOD;
2) Steps to perform on source database
expdp system/scallop SCHEMAS=NEIGHBOURHOOD FLASHBACK_TIME=SYSTIMESTAMP DIRECTORY=DPEXPORTS DUMPFILE=nhood_schema_expdp_25022019.dmp LOGFILE=nhood_schema_expdp_25022019.log version=11.2.0.4.0
Copy the export file to the target database and ensure we have got relevant logical directory created with appropriate permissions to the user performing the task.
create or replace directory backup as '/backup/exports/';
grant read,write on directory backup to system ;
3) Steps to be perform on target database
impdp system/Ora9en1_D3v SCHEMAS=NEIGHBOURHOOD DIRECTORY=BACKUP DUMPFILE=nhood_schema_expdp_25022019.dmp LOGFILE=nhood_schema_imppdp_19032019.log version=11.2.0.4.0
4) Create and assign profile for restricting usage .
SQL> CREATE PROFILE app_profile LIMIT PASSWORD_LIFE_TIME 60 PASSWORD_GRACE_TIME 5;
Profile created.
SQL> alter user neighbourhood profile app_profile;
User altered.
Happy reading !!!
or Other words Application Schema Migration from one database (11.2.0.4) (SUSE o/s ) to linux o/s running 12.2.0.1 database
Steps taken to fulfil the activity . Though it is the simplest task to perform but providing steps becomes handy .
1. Below Steps to be performed target database.
a)
CREATE TABLESPACE NEIGHBOURHOOD DATAFILE
'/data/oragen1d/neighbourhood01.dbf' SIZE 4500M AUTOEXTEND ON NEXT 20M MAXSIZE 10000M
LOGGING
ONLINE
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;
b)
CREATE USER NEIGHBOURHOOD
IDENTIFIED BY nhood
DEFAULT TABLESPACE NEIGHBOURHOOD
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
ACCOUNT UNLOCK;
-- 1 Role for NEIGHBOURHOOD
GRANT CONNECT TO NEIGHBOURHOOD;
ALTER USER NEIGHBOURHOOD DEFAULT ROLE ALL;
-- 6 System Privileges for NEIGHBOURHOOD
GRANT CREATE INDEXTYPE TO NEIGHBOURHOOD;
GRANT CREATE SEQUENCE TO NEIGHBOURHOOD;
GRANT CREATE TABLE TO NEIGHBOURHOOD;
GRANT CREATE TRIGGER TO NEIGHBOURHOOD;
GRANT CREATE TYPE TO NEIGHBOURHOOD;
GRANT CREATE VIEW TO NEIGHBOURHOOD;
-- 1 Tablespace Quota for NEIGHBOURHOOD
ALTER USER NEIGHBOURHOOD QUOTA UNLIMITED ON NEIGHBOURHOOD;
2) Steps to perform on source database
expdp system/scallop SCHEMAS=NEIGHBOURHOOD FLASHBACK_TIME=SYSTIMESTAMP DIRECTORY=DPEXPORTS DUMPFILE=nhood_schema_expdp_25022019.dmp LOGFILE=nhood_schema_expdp_25022019.log version=11.2.0.4.0
Copy the export file to the target database and ensure we have got relevant logical directory created with appropriate permissions to the user performing the task.
create or replace directory backup as '/backup/exports/';
grant read,write on directory backup to system ;
3) Steps to be perform on target database
impdp system/Ora9en1_D3v SCHEMAS=NEIGHBOURHOOD DIRECTORY=BACKUP DUMPFILE=nhood_schema_expdp_25022019.dmp LOGFILE=nhood_schema_imppdp_19032019.log version=11.2.0.4.0
4) Create and assign profile for restricting usage .
SQL> CREATE PROFILE app_profile LIMIT PASSWORD_LIFE_TIME 60 PASSWORD_GRACE_TIME 5;
Profile created.
SQL> alter user neighbourhood profile app_profile;
User altered.
Happy reading !!!
Comments