Thursday, 29 August 2019

Export table in oracle

Export table in oracle : 

Command for expdp a single table in oracle :-

vi Export.par

USERID='/ as sysdba'
DIRECTORY=EXPORT
DUMPFILE=15Mar_SCOTT_SCHEDULED_REQUESTS%U.dmp
logfile=15Mar_SCOTT_SCHEDULED_REQUESTS.log
tables=SCOTT.SCOTT_SCHEDULED_REQUESTS
filesize=2g
flashback_time="to_timestamp(to_char(SYSDATE-1/8640,'DD-MON-YYYY HH24:MI:SS'), 'DD-MON-YYYY HH24:MI:SS')"

Export DB_LINKS in oracle : 

userid='/ AS SYSDBA'
directory=CLONING_8FEB
content=metadata_only
full=y
include=db_link
logfile=expdp_db_link_8Feb_cloning.log

How to Export full Database FAST :

USERID='/ as sysdba'
DIRECTORY=qa_test
DUMPFILE=XYZ%U.dmp
logfile=XYZ.log
schemas=QA_TEST
filesize=2g
flashback_time="to_timestamp(to_char(SYSDATE-1/8640,'DD-MON-YYYY HH24:MI:SS'), 'DD-MON-YYYY HH24:MI:SS')"
exclude=statistics  --- this will reduce the time of export

After import gather stats of the database.


No comments:

Post a Comment

Temp tablespace usage in oracle

Script to monitor temp tablespace usage in oracle Create a folder mkdir -p /u01/app/oracle/script/chk_tmp_usage copy below scripts ...