异常断电导致ORACLE控制文件等受到破坏的处理
故障现象:客户某台WINDOWS服务器掉电,ORACLE数据库STARTUP提示控制文件CONTROL01.CTL、CONTROL02.CTL被破坏。一、处理控制文件异常故障方法:直接拷贝CONTROL0
一、处理控制文件异常故障
二、尝试启动
SQL> startup;
ORACLE 例程已经启动。
Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 146803588 bytes
Database Buffers 457179136 bytes
Redo Buffers 7135232 bytes
数据库装载完毕。
SQL> recover database;
完成介质恢复。
SQL> shutdown immediate;
ORA-01109: 数据库未打开
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup;
ORACLE 例程已经启动。
Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 146803588 bytes
Database Buffers 457179136 bytes
Redo Buffers 7135232 bytes
数据库装载完毕。
ORA-00607: 当更改数据块时出现内部错误
SQL> SELECT SEGMENT_NAME FROM DBA_ROLLBACK_SEGS;
SEGMENT_NAME
------------------------------
SYSTEM
_SYSSMU1$
_SYSSMU2$
_SYSSMU3$
_SYSSMU4$
_SYSSMU5$
_SYSSMU6$
_SYSSMU7$
_SYSSMU8$
_SYSSMU9$
_SYSSMU10$
SEGMENT_NAME
------------------------------
_SYSSMU11$
_SYSSMU12$
_SYSSMU13$
_SYSSMU14$
_SYSSMU15$
_SYSSMU16$
_SYSSMU17$
_SYSSMU18$
SQL>
SQL> CREATE PFILE='D:\oracle\product\10.2.0\oradata\zjport\BACKFILE\ORACLEADMINORCLPFILEINITORCL.ORA' FROM SPFILE;
文件已创建。
添加下面的参数:
undo_management='MANUAL'
_corrupted_rollback_segments=
(_SYSSMU1&,_SYSSMU2&,_SYSSMU3&,_SYSSMU4&,_SYSSMU5&,_SYSSMU6&,_SYSSMU7&,_SYSSMU8&,_SYSSMU9&,_SYSSMU10&,_SYSSMU11&,_SYSSMU12&,_SYSSMU13&,_SYSSMU14&,_SYSSMU15&,_SYSSMU16&,_SYS
SMU17&,_SYSSMU18&)
C:\Documents and Settings\Administrator>sqlplus / as sysdba
Copyright (c) 1982, 2005, Oracle. All rights reserved.
已连接到空闲例程。
SQL> STARTUP PFILE=D:\oracle\product\10.2.0\oradata\zjport\BACKFILE\ORACLEADMINORCLPFILEINITORCL.ORA MOUNT
ORACLE 例程已经启动。
Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 146803588 bytes
Database Buffers 457179136 bytes
Redo Buffers 7135232 bytes
数据库装载完毕。
7、介质恢复
SQL> RECOVER DATABASE;
完成介质恢复。
SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL
D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ZJPORT\ARCHIVELOG\2012_09_20\O1_MF_1_145_%U_.ARC
指定日志: {
cancel
介质恢复已取消。
SQL> ALTER DATABASE OPEN RESETLOGS;
数据库已更改。
SQL>
---------------------------------------------------
至此数据库恢复,服务器空间,后续执行数据备份并写入SPFILE
---------------------------------------------------
1、数据库备份
create spfile from pfile='D:\oracle\product\10.2.0\oradata\zjport\BACKFILE\ORACLEADMINORCLPFILEINITORCL.ORA';
---------------------------------------------------------------------------
至此数据库完全恢复、数据也备份完成,香港虚拟主机,香港虚拟主机,后续修改不归档方式为为归档方式
---------------------------------------------------------------------------
--归档路径
SQL> alter system set log_archive_dest_1='LOCATION=D:\oracle\product\10.2.0\oradata\zjport\archivelog';
--归档命名格式
SQL> alter system set log_archive_max_processes = 5;
SQL> alter system set log_archive_format = "archive_%t_%s_%r.arc" scope=spfile;
2、重启数据库
SQL> shutdown immediate
SQL> startup mount;
SQL> alter database archivelog;
SQL> alter database open;
3、确认
SQL> archive log list;
本文出自 “麦地坞” 博客,请务必保留此出处

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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

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

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

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 popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]
