0% found this document useful (0 votes)
30 views6 pages

Datapump Work Orders

The document outlines procedures for taking consistent backups of Oracle databases using Data Pump, including verifying objects and tablespaces, setting parameters for flashback, and creating directories for dump files. It also details steps for schema-level and object-level refreshes between source and target databases, including the use of parameter files for export and import operations. Additionally, it includes instructions for transferring schemas across databases using database links without dump files.

Uploaded by

manumanasa248
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views6 pages

Datapump Work Orders

The document outlines procedures for taking consistent backups of Oracle databases using Data Pump, including verifying objects and tablespaces, setting parameters for flashback, and creating directories for dump files. It also details steps for schema-level and object-level refreshes between source and target databases, including the use of parameter files for export and import operations. Additionally, it includes instructions for transferring schemas across databases using database links without dump files.

Uploaded by

manumanasa248
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 6

datapump workorders

*****************************

FR000070 Please take the consistent backup of vdscd using parfile. VDSCD

step 1: connect to the vdscd server as oracle user


ps -ef | grep smon
. oraenv vdscd
before backup verify the objects, objects_types, objects_counts
connect to database sql as / sysdba

to check the object count and object details :


----------------------------------------------
set lines 900
set pages 900
col owner for a25;
colobjects_name for a45;
select owner,object_name,object_type, created,status from dba_objects where
owner='cr413_cp' order by object_type;

select object_type,count(*) from dba_objects where owner='cr413_cp' group by


object_type;

To check the Tablespaces :---


--------------------------
SELECT DISTINCT TABLESPACE_NAME FROM DBA_SEGMENTS WHERE OWNER='CR001_C';

to check the object size:


--------------------------
SELECT SUM(BYTES)/1024/1024 FROM DBA_OBJECTS WHERE OWNER='CR001_CD'

we are take takeing consistent backup check the flashback_scn or flashback_time


PARAMETERS:
-----------

FLASHBACK_SCN
SCN used to reset session snapshot.

SQL> SELECT dbms_flashback.get_system_change_number FROM DUAL;

GET_SYSTEM_CHANGE_NUMBER
------------------------
8243886

SQL>
FLASHBACK_SCN=8243886

FLASHBACK_TIME
Time used to find the closest corresponding SCN value.

flashback_time=systimestamp
flashback_time=”to_timestamp(’03-09-2014 14:41:00′, ‘DD-MM-YYYY HH24:MI:SS’)”

check the directory


--------------------
select owner,directory_name,directory_path from dba_directories where
directory_name='datapump';
incase not have the directory create directory in os level and database level

expdp directory=DATAPUMP dumpfile=CR001_CD_01052024.dmp


logfile=CR001_CD_01052024.log schemas= CR001_CD

cat expdp_consistant_01052024.par ----->parfile name

userid=' / as sysdba'
directory= datapump
parallel=2
dumpfile=CR413_CD_01052024.dmp
logfile=CR001_CD_01052024.log
schemas=CR001_CD
FLASHBACK_SCN=8243886

# expdp parfile = expdp_consistant_01052024.par


***********************************************************************************
******************

FR000071--Please take the backup of vdscad database and Splitting dumpfile into
multiple locations-VDSCAD
FR000072--Please take the backup of dbworxz database and Splitting dumpfile into
multiple locations.-DBWORXZ
-----------------------------------------------------------------------------------
-------------------------
create multiple directories in os level and database level, in par file
dumpfile=directory1:dumpfile1,directory2:dumpfile2

we ca use multiple filesystem to proced with export

mkdir -p /home/oracle/dumpfiles
mkdir -p /home/oracle/dumpfiles2
sql> create or replace directory expdpfull as '/home/oracle/dumpfiles';
sql> create or replace directory expdpfull2 as '/home/oracle/dumpfiles2';
sql> grant read,write on directory expdpfull to public;
sql> grant read,write on directory expdpfull2 to public;

cat expdpfull_01022024.par
userid='/ as sysdba'
full =y
parallel=2
dumpfile=expdpfull:expdpfull1_01022024.dmp,expdpfull2:expdpfull2_01022024dmp
file size= 10m
log file= expdpfull:expdpfull_01022024.log

nohup expdp parfile= expdpfull_01022024.par &


***********************************************************************************
********************

FR000073 Please do schema level refresh from to

Source :
Database : vdsct
Schema :<cr413_ct>

Target :
Database : vdscd
Schema : <cr413_cd>. VDSCD
step1: connect to source server vdsct as oracle
. oraenv vdsct

SET LINES 400


SET PAGES 400
COL USERNAME FOR A25;
COL PROFILE FOR A45;
select USERNAME,ACCOUNT_STATUS,CREATED,PROFILE,DEFAULT_TABLESPACE
from dba_users where username in ('CR413_CT');

--------------------------
Before Export on Source:
--------------------------

To check the Object count and Object details :--


--------------------------------------------
SET LINES 900
SET PAGES 900
COL OWNER FOR A25;
COL OBJECT_NAME FOR A65;
SELECT OWNER,OBJECT_NAME,OBJECT_TYPE,CREATED,STATUS FROM DBA_OBJECTS WHERE
OWNER='CR413_CT' order by OBJECT_TYPE;

SELECT OBJECT_TYPE,COUNT(*) FROM DBA_OBJECTS WHERE OWNER='CR413_CT' GROUP BY


OBJECT_TYPE;

To check the Tablespaces :---


--------------------------
SELECT DISTINCT TABLESPACE_NAME FROM DBA_SEGMENTS WHERE OWNER='CR413_CT';

To check the Constraints :---


--------------------------
SET LINES 900
SET PAGES 900
COL OWNER FOR A20;
COL CONSTRAINT_NAME FOR A35;
COL CONSTRAINT_TYPE FOR A25;
COL TABLE_NAME FOR A35;
select OWNER,CONSTRAINT_NAME,CONSTRAINT_TYPE,TABLE_NAME,STATUS FROM
dba_constraints where OWNER='CR413_CT';

To check the Object level PRIVILEGE


------------------------------------
COL GRANTEE FOR A25;
COL GRANTOR FOR A25;
SELECT GRANTEE,OWNER,TABLE_NAME,GRANTOR,PRIVILEGE FROM DBA_TAB_PRIVS WHERE
GRANTEE='CR413_CT';

To Check the roles


-------------------
COL GRANTED_ROLE FOR A25;
SELECT GRANTEE,GRANTED_ROLE,ADMIN_OPTION FROM DBA_ROLE_PRIVS WHERE
GRANTEE='CR413_CT';

To check the system level privilege


-----------------------------------
SELECT GRANTEE,PRIVILEGE FROM DBA_SYS_PRIVS WHERE GRANTEE='CR413_CT';
SET PAGESIZE 0
SET LONG 100000
select dbms_metadata.get_ddl('USER', 'CR413_CT') from dual;

expdp directory=DATAPUMP dumpfile=CR001_CP_27042023.dmp


logfile=CR001_CP_27042023.log schemas=CR001_CP
or
cat expdp_schema_cr413_ct_01012024.par
userid='/ as sysdba'
directory=datapump
dumpfile=cr413_ct_01022024.dmp
logfile=cr413_ct_01022024.log
schema=cr413_cp

nohup expdp parfile= expdp_schema_01012024.par &

copy the dump files soucre to target server

scp cr413_ct_01022024.dmp vdscd:/home/oracle/datapump

connet to target server vdscd


. oraenv vdscd
verify the directory or create directory
mkdir -p /home/oracle/datapump
cd /home/oracle/datapump

copy the dumpfile

cp cr413_ct_01022024.dmp cr413_ct_01022024.dmp.bkp

impdp directory=DATA_PUMP_DIR dumpfile=CR413_ct_01022024.dmp


logfile=CR001_CP_01022024_imp.log
remap_schema=CR413_ct:CR413_CP

cat impdp_cr413_cp_01022024.par
userid = '/ as sysdba'
directory = datapump
dumpfile= cr413_ct_01022024.dmp
logfile = cr413_cp_01022024_imp.log
remap_schema = cr413_ct:cr413_cp

nohup expdp parfile = impdp_cr413_cp_01022024.par &


***********************************************************************************
******************

FR000074 Transfer schema across database using db links without dump file.

Source :
Database : vdscat
Schema : <*cat>

Target :
Database : vdscad
Schema : <*_cad>. VDSCAD
***********************************************************************************
*
FR000075 Please do tablespace level refresh from to

Source :
Database : vdscp
Schema : <*_cp>

Target :
Database : vdscu
Schema : <*_cu> VDSCU

FR000076 Please do object level refresh from to


Source :
Database : DBWORXZ
Schema : <*_db>
Object name : tb1

Target :
Database : qrcc
Schema : <*_qr>
Object name : tb1. QRCC

step1 : connect to sourece server as a oracle user


. oraenv dbworxz
connect to database sqlplus / as sysdba
verify the datapump directory

select * from dba_directory ;

select owner,directory_name,directory_path from dba_directories where


directory_name='datapump';

cat expdp_object_01022024.par

userid =' / as sysdba'


directory = datapump
dumpfile = expobject_cr413_db_01022024.dmp
logfile = expobject _cr413_db_01022024.log
schema = cr413_db
object = tb1

nohup expdp parfile = expdp_object_01022024.par &

copy the dumpfiles source server to target server

scp expobject_cr413_db_01022024.dmp oracle@ 192.168.100.220:/home/oracle/datapump

connect to target server

.oraenv qrcc

connect to database sqlplus / as sysdba

verify the directory

select owner,directory_name, directory_path form dba_directories where


directory_name = 'datapump';

cp expobject_cr413_db_01022024.dmp expobject_cr413_db_01022024.dmp.bkp

cat impdp_object_cr413_qr_01022024.par

userid = ' /as sysdba'


directory = datapump
dumpfile = expobject_cr413_db_01022024.dmp
logfile = imp_object_cr413_qr_01022024.log
remap_schema = cr413_db:cr413_qr
remap_tablespace = tb1:tb1

nohup impdp parfile = impdp_object_cr413_qr_01022024.par &

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy