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

Loss of Oracle undo tablespace data files forces the database to start (no uncommitted transactions)

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Environment: RHEL 6.5 Oracle 11.2.0.3

If there is a RMAN backup, it can be done if the data files are restored. This time, we test how to pull up the database without backup.

Rename the data file for the UNDO tablespace

[oracle@test-db orcl] $mv undotbs02.dbf undotbs02.dbf_bak

Start the database

SYS@orcl > startupORACLE instance started.Total System Global Area 784998400 bytesFixed Size 2232472 bytesVariable Size 591400808 bytesDatabase Buffers 188743680 bytesRedo Buffers 2621440 bytesDatabase mounted.ORA-01157: cannot identify/lock data file 7-see DBWR trace fileORA-01110: data file 7:'/ u01

If there is a problem with the prompt message data 7, view the alert.log file

ALTER DATABASE OPENErrors in file / u01/app/oracle/diag/rdbms/primary_orcl/orcl/trace/orcl_dbw0_2532.trc:ORA-01157: cannot identify/lock data file 7-see DBWR trace fileORA-01110: data file 7:'/ u01/app/oracle/oradata/orcl_data/orcl/undotbs02.dbf'ORA-27037: unable to obtain file statusLinux-x86_64 Error: 2: No such file or directoryAdditional information: 3Block change tracking file is current.Errors in file / u01/app/oracle/diag/rdbms / primary_orcl/orcl/trace/orcl_ora_2621.trc:ORA-01157: cannot identify/lock data file 7-see DBWR trace fileORA-01110: data file 7:'/ u01/app/oracle/oradata/orcl_data/orcl/undotbs02.dbf'ORA-1157 signalled during: ALTER DATABASE OPEN...Sun Jan 13 15:32:08 2019Checker run found 1 new persistent data failures

The log file also shows that the No. 7 data file can not be found.

#

Start forcibly pulling up the database

Start the database to MOUNT state

SYS@orcl > shutdown immediateORA-01109: database not openDatabase dismounted.ORACLE instance shut down.SYS@orcl > startup mount;ORACLE instance started.Total System Global Area 784998400 bytesFixed Size 2232472 bytesVariable Size 591400808 bytesDatabase Buffers 188743680 bytesRedo Buffers 2621440 bytesDatabase mounted.

Offline the database file with file number 7 and open the database

SYS@orcl > alter database datafile 7 offline drop;Database altered.SYS@orcl > alter database open;Database altered.

Create a new UNDO tablespace and set it to the database default tablespace

SYS@orcl > create undo tablespace undotbs1 datafile'/ u01 size size undotbs1.dbf` Tablespace created.SYS@orcl > show parameter undoNAME TYPE VALUE-- undo_management String AUTOundo_retention integer 900undo_tablespace string UNDOTBS2SYS@orcl > alter system set undo_tablespace='UNDOTBS1' scope=spfile System altered.

Restart the database

SYS@orcl > shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SYS@orcl > startupORACLE instance started.Total System Global Area 784998400 bytesFixed Size 2232472 bytesVariable Size 591400808 bytesDatabase Buffers 188743680 bytesRedo Buffers 2621440 bytesDatabase mounted.Database opened.SYS@orcl > show parameter undoNAME TYPE VALUE -undo_management string AUTOundo_retention integer 900undo_tablespace string UNDOTBS1SYS@orcl >

Summary:

This is the easiest case to recover from the loss of undo tablespaces, and it is also easy.

Directly offile related data files, open the database and recreate the UNDO tablespace and default to the database default tablespace

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