探索Oracle之RMAN_07控制文件丢失恢复,基于控制文件的复合多路径性,它的丢失分为两种,一种是其中某个控制文件的损坏或丢失,另
1、 控制文件(controlfile)丢失恢复
基于控制文件的复合多路径性,它的丢失分为两种,一种是其中某个控制文件的损坏或丢失,另外一种是所有控制文件均丢失。基于第一种情况,只需把好的控制文件复制一份在损坏或丢失的那个控制文件路径下即可。第二种情况下则需要通过备份信息来对控制文件进行恢复或手工重建控制文件。
丢失单一控制文件的判断及恢复。
SQL>shutdown immediate
ORA-00210:cannot open the specified control file
ORA-00202:control file: '/DBData/oradata/WWL/control02.ctl'
ORA-27041:unable to open file
LinuxError: 2: No such file or directory
Additionalinformation: 3
必须强制关闭数据库
SQL>shutdown abort;
Oracleinstance shut down.
启动数据库报控制文件验证失败,检查告警日志文件
SQL>startup
ORACLEinstance started.
TotalSystem Global Area 285212672 bytes
FixedSize 1218968 bytes
VariableSize 104859240 bytes
DatabaseBuffers 171966464 bytes
RedoBuffers 7168000 bytes
ORA-00205:error in identifying control file, check alert log for more info
查看告警日志,报提示找不到controlfile2
Fri Jun 2211:54:26 2012
Errors infile /DBSoft/admin/WWL/udump/wwl_ora_4816.trc:
ORA-00210:cannot open the specified control file
ORA-00202:control file: '/DBData/oradata/WWL/control02.ctl'
ORA-27041:unable to open file
LinuxError: 2: No such file or directory
从上面的信息我们可以得出是由于控制文件丢失导致了数据库无法正常的启动和关闭,下面我们要做的就是对控制文件进行做恢复,因为我们知道控制文件具有重复多路径属性,默认会有三个控制文件。现在日志中看到的是控制文件2丢失,找不到,我们可以通过控制文件1和3来恢复2。
4.1 基于正常控制文件恢复损坏的控制文件
1、查看控制文件存在路径
SQL>show parameter control_files
NAME TYPE VALUE
----------------------------------------------- ------------------------------
control_files string /DBSoft/oradata/WWL/control01.ctl,/DBData/oradata/WWL/control02.ctl, /DBData/oradata/WWL/control03.ctl
SQL>
我们可以从如上看到,该套数据库存在三个控制文件其中一个控制文件存放在/DBSoft目中中的oradata/wwl/目录下,另外两个控制文件存在/DBData目录中的/oradata/wwl/的目录下,从上面刚才的信息中我们可以得之是control02.ctl控制文件丢失导致数据库故障。
2、检查下控制文件是不存在还是损坏了
[oracle@wwldb WWL]$cd /DBData/oradata/WWL/
[oracle@wwldb WWL]$ll
total 0
[oracle@wwldb WWL]$
怪了,这个目录怎么一个控制文件都没有了呀,看看控制文件一是否存在。
[oracle@wwldb WWL]$ cd/DBSoft/oradata/WWL/
[oracle@wwldb WWL]$ ls
control01.ctl
了。
3、关闭数据库
SQL> shutdown abort
ORACLE instance shut down.
SQL>
4、恢复损坏丢失的控制文件
[oracle@wwldbWWL]$ ls
control01.ctl
[oracle@wwldbWWL]$ pwd
/DBSoft/oradata/WWL
[oracle@wwldbWWL]$ ls
control01.ctl
[oracle@wwldbWWL]$ cp control01.ctl /DBData/oradata/WWL/control02.ctl
[oracle@wwldbWWL]$ cp control01.ctl /DBData/oradata/WWL/control03.ctl
[oracle@wwldbWWL]$ ll /DBData/oradata/WWL/
total13792
-rw-r-----1 oracle oinstall 7061504 Jun 22 12:51 control02.ctl
-rw-r-----1 oracle oinstall 7061504 Jun 22 12:51 control03.ctl
[oracle@wwldb WWL]$
2、启动数据库
SQL>startup
ORACLEinstance started.
Total SystemGlobal Area 285212672 bytes
FixedSize 1218968 bytes
VariableSize 104859240 bytes
DatabaseBuffers 171966464 bytes
RedoBuffers 7168000 bytes
Databasemounted.
Databaseopened.
SQL>
所有控制文件全部丢失。
丢失单一控制文件的判断及恢复。
号
SQL>shutdown immediate
ORA-00210:cannot open the specified control file
ORA-00202:control file: ' /DBSoft/oradata/WWL/control01.ctl'
ORA-27041:unable to open file
LinuxError: 2: No such file or directory
Additionalinformation: 3
必须强制关闭数据库
SQL>shutdown abort;
ORACLEinstance shut down.
启动数据库报控制文件验证失败,检查告警日志文件
SQL>startup
ORACLEinstance started.
TotalSystem Global Area 285212672 bytes
FixedSize 1218968 bytes
VariableSize 104859240 bytes
DatabaseBuffers 171966464 bytes
RedoBuffers 7168000 bytes
ORA-00205:error in identifying control file, check alert log for more info
查看告警日志,,报提示找不到controlfile1
Fri Jun 22 13:16:07 2012
Errors in file /DBSoft/admin/WWL/udump/wwl_ora_5104.trc:
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/DBSoft/oradata/WWL/control01.ctl'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
通过RMAN来进行控制文件的恢复:
SQL> startupforce nomount;
ORACLE instancestarted.
Total SystemGlobal Area 285212672 bytes
Fixed Size 1218968 bytes
VariableSize 109053544 bytes
Database Buffers 167772160 bytes
RedoBuffers 7168000 bytes
SQL> exit
控制文件恢复
RMAN>restore controlfile;
3、打开数据库
SQL>alter database mount;
Database altered.
SQL>alter database open;
Database altered.
相关阅读:
探索Oracle之RMAN_01概念
探索Oracle之RMAN_02基本使用
探索Oracle之RMAN_03非一致性备份
探索Oracle之RMAN_04非一致性备份
探索Oracle之RMAN_05增量备份
探索Oracle之RMAN_06备份策略
探索Oracle之RMAN_07单个数据文件丢失恢复
探索Oracle之RMAN_07整个业务表空间丢失恢复
探索Oracle之RMAN_07 磁盘损坏数据丢失恢复
探索Oracle之RMAN_07 数据库所有文件全部丢失恢复
探索Oracle之RMAN_07 重做日志redu文件丢失恢复
探索Oracle之RMAN_07 参数文件丢失恢复
探索Oracle之RMAN_07控制文件丢失恢复
探索Oracle之RMAN_07 system表空间丢失恢复

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Linux new version
SublimeText3 Linux latest version
