Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if the database reports an ORA-01196 error?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "database report ORA-01196 error how to do", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "database newspaper ORA-01196 error how to do" this article.

Find a problem

In a project in Zambia, the master-slave database is synchronized, the master database is located in the Zambian computer room, and the slave database is located on the Ali cloud server in Qingdao, China, which is implemented through Dataguard. After running for a period of time, the master-slave database is found to be inconsistent and the slave database cannot be started. The error "ORA-01196: file 1 is inconsistent due to media recovery session failure" is reported. The specific log information is as follows:

= "" log information "" =

Windows PowerShell

Copyright (C) 2009 Microsoft Corporation. All rights reserved.

PS C:\ Users\ Administrator > sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wednesday May 7 04:59:10 2014

Copyright (c) 1982, 2011, Oracle. All rights reserved.

Connect to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL > select OPen_mode from v$database

OPEN_MODE

-

MOUNTED

SQL > alter database open

Alter database open

*

An error occurred on line 1:

ORA-10458: standby database requires recovery

ORA-01196: file 1 is inconsistent due to media recovery session failure

ORA-01110: data file 1: d:\ APP\ ADMINISTRATOR\ ORADATA\ ORCL\ SYSTEM01.DBF'

= "end of log" = =

Solution:

From library startup to mount status:

SQL > SHUTDOWN IMMEDIATESQL > STARTUP MOUNT;SQL > ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USEING CURRENT LOGFILE DISCONNECT FROM SESSION

Operate on the main library:

SQL > ALTER SYSTEM SWITCH LOGFILE

After a few more operations, wait for a short period of time depending on the network speed. After a period of time, query the specified situation on the main database:

SQL > SELECT NAME,SEQUENCE#,ARCHIVED,APPLIED FROMV$ARCHIVED_LOG ORDER BY SEQUENCE#

If the returned result "APPLIED" is "YES" or only the last one is "NO", it means that all the archive logs have been archived, and then go to the slave database to operate:

Prepare the library operation:

SQL > ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCLE; SQL > ALTER DATABASE OPEN; SQL > ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION

= = solution =

Problem solved!

The above is all the contents of the article "how to report ORA-01196 errors in the database". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report