Thứ Hai, 7 tháng 12, 2020

Xóa archive log sử dụng RMAN trong Oracle Database

% rman TARGET /       # operating system authentication
% rman TARGET SYS@prod NOCATALOG  # RMAN prompts for SYS password
% rman TARGET / CATALOG rco@catdb # RMAN prompts for rco password
set NLS_DATE_FORMAT=YYYYMMDD HH24:MI:SS

Lệnh liệt kê các Archivelog:

list archivelog all; 
list copy of archivelog until time 'SYSDATE-1'; 
list copy of archivelog from time 'SYSDATE-1'; 
list copy of archivelog from time 'SYSDATE-1' until time 'SYSDATE-2'; 
list copy of archivelog from sequence 1000; 
list copy of archivelog until sequence 1500; 
list copy of archivelog from sequence 1000 until sequence 1500; 

Lênh xóa Archivelog:

delete archivelog all;
delete archivelog until time 'SYSDATE-1'; 
delete archivelog from time 'SYSDATE-1'; 
delete archivelog from time 'SYSDATE-1' until time 'SYSDATE-2'; 
delete archivelog from sequence 1000; 
delete archivelog until sequence 1500; 
delete archivelog from sequence 1000 until sequence 1500; 

Note : Nếu xóa TỰ ĐỘNG không cần hỏi thì dùng noprompt

delete noprompt archivelog until time 'SYSDATE-1';

#How to Delete Archivelog Using RMAN in Oracle

KẾT NỐI VỚI CHUYÊN GIA TRẦN VĂN BÌNH: 📧 Mail: binhoracle@gmail.com ☎️ Mobile: 0902912888 ⚡️ Skype: tranbinh48ca 👨 Facebook: https://www.facebook.com/BinhOracleMaster 👨 Inbox Messenger: https://m.me/101036604657441 (profile) 👨 Fanpage: https://www.facebook.com/tranvanbinh.vn 👨 Inbox Fanpage: https://m.me/tranvanbinh.vn 👨👩 Group FB: https://www.facebook.com/groups/OracleDBAVietNam 👨 Website: http://www.tranvanbinh.vn 👨 Blogger: https://tranvanbinhmaster.blogspot.com 🎬 Youtube: http://bit.ly/ytb_binhoraclemaster 👨 Tiktok: https://www.tiktok.com/@binhoraclemaster?lang=vi 👨 Linkin: https://www.linkedin.com/in/binhoracle 👨 Twitter: https://twitter.com/binhoracle 👨 Địa chỉ: Tòa nhà Sun Square - 21 Lê Đức Thọ - Phường Mỹ Đình 1 - Quận Nam Từ Liêm - TP.Hà Nội #OracleTutorial #OracleDBA #OracleDatabaseAdministration #học oracle database #oca #ocp #oce #ocm

ĐỌC NHIỀU

Trần Văn Bình - Oracle Database Master