实验:Oracle基于cancel的不完全恢复 实验环境查看 lsnrctl statusselect open_mode from v$database; --监听与数据库状态 show
实验:Oracle基于cancel的不完全恢复
实验环境查看
lsnrctl status
select open_mode from v$database;
--监听与数据库状态
show parameter recovery;
select flashback_on from v$database;
archive log list;
--闪回与归档的配置
1)准备环境:RMAN全库备份
RMAN> backup as compressed backupset full database;
--压缩备份
--backup full database ;备份集备份
Starting backup at 20-MAR-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=45 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/ORA11GR2/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/ORA11GR2/sysaux01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/ORA11GR2/undotbs01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/ORA11GR2/example01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/ORA11GR2/users01.dbf
channel ORA_DISK_1: starting piece 1 at 20-MAR-13
channel ORA_DISK_1: finished piece 1 at 20-MAR-13
piece handle=/u01/app/FRA/ORA11GR2/backupset/2013_03_20/o1_mf_nnndf_TAG20130320T151949_8nlrrrfm_.bkp tag=TAG20130320T151949 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:17
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 20-MAR-13
channel ORA_DISK_1: finished piece 1 at 20-MAR-13
piece handle=/u01/app/FRA/ORA11GR2/backupset/2013_03_20/o1_mf_ncsnf_TAG20130320T151949_8nlrx2qs_.bkp tag=TAG20130320T151949 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 20-MAR-13
2)创建测试数据
SYS@ORA11GR2>create table scott.t1 as select 1 as id from dual;
Table created.
SYS@ORA11GR2>alter system archive log current;
System altered.
SYS@ORA11GR2>create table scott.t2 as select 2 as id from dual;
Table created.
SYS@ORA11GR2>alter system archive log current;
System altered.
SYS@ORA11GR2>create table scott.t3 as select 3 as id from dual;
Table created.
SYS@ORA11GR2>alter system archive log current;
System altered.
SYS@ORA11GR2>
SYS@ORA11GR2>select table_name,tablespace_name from dba_tables where owner='SCOTT' AND table_name LIKE 'T_';
TABLE_NAME TABLESPACE_NAME
------------------------- ------------------------------
T3 USERS
T2 USERS
T1 USERS
完成测试数据构造后,查看生成的归档日志
ls /u01/app/oracle/fast_recovery_area/PROD/archivelog/2014_10_08
ls -lrt
3)删除所有数据文件和在线数据文件
在sqlplus里面删除:
SYS@PROD>select name from v$datafile;
NAME
--------------------
/u01/app/oracle/oradata/PROD/datafile/o1_mf_system_b2251bs1_.dbf
/u01/app/oracle/oradata/PROD/datafile/o1_mf_sysaux_b2251bvo_.dbf
/u01/app/oracle/oradata/PROD/datafile/o1_mf_undotbs1_b2251bw5_.dbf
/u01/app/oracle/oradata/PROD/datafile/o1_mf_users_b2251byw_.dbf
/u01/app/oracle/oradata/PROD/datafile/o1_mf_example_b2257d0c_.dbf
/u01/app/oracle/oradata/PROD/datafile/tbs_move_01.dbf
SYS@PROD>select member from v$logfile;
MEMBER
----------------------------------------------------------------------------------------------------------------------------------
/u01/app/oracle/oradata/PROD/onlinelog/o1_mf_3_b22567o2_.log
/u01/app/oracle/fast_recovery_area/PROD/onlinelog/o1_mf_3_b2256827_.log
/u01/app/oracle/oradata/PROD/onlinelog/o1_mf_2_b2255zsg_.log
/u01/app/oracle/fast_recovery_area/PROD/onlinelog/o1_mf_2_b22560gb_.log
/u01/app/oracle/oradata/PROD/onlinelog/o1_mf_1_b2255npg_.log
/u01/app/oracle/fast_recovery_area/PROD/onlinelog/o1_mf_1_b2255nxl_.log
SYS@PROD>!rm /u01/app/oracle/oradata/PROD/datafile/*.dbf;
SYS@PROD>!rm /u01/app/oracle/oradata/PROD/onlinelog/*.log;
SYS@PROD>!rm /u01/app/oracle/fast_recovery_area/PROD/onlinelog/*.log;
在OS里面删除:
[oracle@ocmu ORA11GR2]$ pwd
/u01/app/oracle/oradata/ORA11GR2
[oracle@ocmu ORA11GR2]$ ls
control01.ctl example01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbf
control02.ctl redo01.log redo03.log system01.dbf undotbs01.dbf
[oracle@ocmu ORA11GR2]$ rm *.log
[oracle@ocmu ORA11GR2]$ ls
control01.ctl example01.dbf system01.dbf undotbs01.dbf
control02.ctl sysaux01.dbf temp01.dbf users01.dbf
[oracle@ocmu ORA11GR2]$
4)数据库启动到mount模式
SYS@ORA11GR2>shutdown abort;
ORACLE instance shut down.
SYS@ORA11GR2>startup mount;
ORACLE instance started.

本文探討了Docker中的優化MySQL內存使用量。 它討論了監視技術(Docker統計,性能架構,外部工具)和配置策略。 其中包括Docker內存限制,交換和cgroups

本文介紹了MySQL的“無法打開共享庫”錯誤。 該問題源於MySQL無法找到必要的共享庫(.SO/.DLL文件)。解決方案涉及通過系統軟件包M驗證庫安裝

本文討論了使用MySQL的Alter Table語句修改表,包括添加/刪除列,重命名表/列以及更改列數據類型。

本文比較使用/不使用PhpMyAdmin的Podman容器直接在Linux上安裝MySQL。 它詳細介紹了每種方法的安裝步驟,強調了Podman在孤立,可移植性和可重複性方面的優勢,還

本文提供了SQLite的全面概述,SQLite是一個獨立的,無服務器的關係數據庫。 它詳細介紹了SQLite的優勢(簡單,可移植性,易用性)和缺點(並發限制,可伸縮性挑戰)。 c

本指南展示了使用自製在MacOS上安裝和管理多個MySQL版本。 它強調使用自製裝置隔離安裝,以防止衝突。 本文詳細詳細介紹了安裝,起始/停止服務和最佳PRA

文章討論了為MySQL配置SSL/TLS加密,包括證書生成和驗證。主要問題是使用自簽名證書的安全含義。[角色計數:159]

文章討論了流行的MySQL GUI工具,例如MySQL Workbench和PhpMyAdmin,比較了它們對初學者和高級用戶的功能和適合性。[159個字符]


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

DVWA
Damn Vulnerable Web App (DVWA) 是一個PHP/MySQL的Web應用程序,非常容易受到攻擊。它的主要目標是成為安全專業人員在合法環境中測試自己的技能和工具的輔助工具,幫助Web開發人員更好地理解保護網路應用程式的過程,並幫助教師/學生在課堂環境中教授/學習Web應用程式安全性。 DVWA的目標是透過簡單直接的介面練習一些最常見的Web漏洞,難度各不相同。請注意,該軟體中

Atom編輯器mac版下載
最受歡迎的的開源編輯器

Dreamweaver Mac版
視覺化網頁開發工具

PhpStorm Mac 版本
最新(2018.2.1 )專業的PHP整合開發工具

SecLists
SecLists是最終安全測試人員的伙伴。它是一個包含各種類型清單的集合,這些清單在安全評估過程中經常使用,而且都在一個地方。 SecLists透過方便地提供安全測試人員可能需要的所有列表,幫助提高安全測試的效率和生產力。清單類型包括使用者名稱、密碼、URL、模糊測試有效載荷、敏感資料模式、Web shell等等。測試人員只需將此儲存庫拉到新的測試機上,他就可以存取所需的每種類型的清單。