1 / 5

5. Oracle Backup & Recovery

5. Oracle Backup & Recovery. Log in vào SQL*Plus với User là System và nhập lệnh SQL sau đây để tạo ra 2 thư mục: SQL>CREATE DIRECTORY datadir1 AS '/u01/home/oracle/wkdir'; SQL>CREATE DIRECTORY datadir2 AS '/home/oracle/wkdir';. Oracle Backup & Recovery.

benny
Download Presentation

5. Oracle Backup & Recovery

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 5. Oracle Backup & Recovery Log in vào SQL*Plus với User là System và nhập lệnh SQL sau đây để tạo ra 2 thư mục: SQL>CREATE DIRECTORY datadir1 AS '/u01/home/oracle/wkdir'; SQL>CREATE DIRECTORY datadir2 AS '/home/oracle/wkdir';

  2. Oracle Backup & Recovery • Sau khi thư mục được tạo, người sử dụng tạo ra thư mục phải cấp quyền đọc và ghi trên thư mục đó cho các người sử dụng khác. SQL>GRANT READ,WRITE ON DIRECTORY datadir1 TO amss; SQL>GRANT READ,WRITE ON DIRECTORY datadir2 TO amss;

  3. Oracle Backup & Recovery • Để backup số liệu, mở một cửa sổ terminal và thực hiện lệnh Export như sau: $ expdp system/oracle \ tables=amss.msg0201 \ dumpfile=datadir1:msg0201.dmp \ nologfile=y

  4. Oracle Backup & Recovery • Để phục hồi dữ liệu, sử dụng lệnh Import như sau: $impdp amss/amss \ tables=amss.msg0101 \ dumpfile=datadir1:msg0101.dmp \ nologfile=y \ content=data_only

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

More Related