异常断电导致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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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











Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

MySQL and MariaDB can coexist, but need to be configured with caution. The key is to allocate different port numbers and data directories to each database, and adjust parameters such as memory allocation and cache size. Connection pooling, application configuration, and version differences also need to be considered and need to be carefully tested and planned to avoid pitfalls. Running two databases simultaneously can cause performance problems in situations where resources are limited.

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

LaravelEloquent Model Retrieval: Easily obtaining database data EloquentORM provides a concise and easy-to-understand way to operate the database. This article will introduce various Eloquent model search techniques in detail to help you obtain data from the database efficiently. 1. Get all records. Use the all() method to get all records in the database table: useApp\Models\Post;$posts=Post::all(); This will return a collection. You can access data using foreach loop or other collection methods: foreach($postsas$post){echo$post->

Data Integration Simplification: AmazonRDSMySQL and Redshift's zero ETL integration Efficient data integration is at the heart of a data-driven organization. Traditional ETL (extract, convert, load) processes are complex and time-consuming, especially when integrating databases (such as AmazonRDSMySQL) with data warehouses (such as Redshift). However, AWS provides zero ETL integration solutions that have completely changed this situation, providing a simplified, near-real-time solution for data migration from RDSMySQL to Redshift. This article will dive into RDSMySQL zero ETL integration with Redshift, explaining how it works and the advantages it brings to data engineers and developers.

In MySQL database, the relationship between the user and the database is defined by permissions and tables. The user has a username and password to access the database. Permissions are granted through the GRANT command, while the table is created by the CREATE TABLE command. To establish a relationship between a user and a database, you need to create a database, create a user, and then grant permissions.

MySQL is suitable for beginners because it is simple to install, powerful and easy to manage data. 1. Simple installation and configuration, suitable for a variety of operating systems. 2. Support basic operations such as creating databases and tables, inserting, querying, updating and deleting data. 3. Provide advanced functions such as JOIN operations and subqueries. 4. Performance can be improved through indexing, query optimization and table partitioning. 5. Support backup, recovery and security measures to ensure data security and consistency.
