Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 5

5.

Oracle Backup & Recovery


Log in vo SQL*Plus vi User l System v nhp lnh SQL sau y
to ra 2 th mc:
SQL>CREATE DIRECTORY datadir1 AS '/u01/home/oracle/wkdir';
SQL>CREATE DIRECTORY datadir2 AS '/home/oracle/wkdir';

Oracle Backup & Recovery

Sau khi th mc c to, ngi s dng to


ra th mc phi cp quyn c v ghi trn th
mc cho cc ngi s dng khc.
SQL>GRANT READ,WRITE ON DIRECTORY
datadir1 TO amss;
SQL>GRANT READ,WRITE ON DIRECTORY
datadir2 TO amss;

Oracle Backup & Recovery

backup s liu, m mt ca s terminal v


thc hin lnh Export nh sau:

$ expdp system/oracle \ tables=amss.msg0201 \


dumpfile=datadir1:msg0201.dmp \ nologfile=y

Oracle Backup & Recovery

phc hi d liu, s dng lnh Import nh


sau:

$impdp amss/amss \
tables=amss.msg0101 \
dumpfile=datadir1:msg0101.dmp \
nologfile=y \
content=data_only

Delete a Records
SQL>delete from msg0101 where msgid in (select
msgid from msg0101);

You might also like