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

ORA-01113: file 5 requires media recovery & & ORA-01110: data file 5: & # 39

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

Share

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

There are two problems in doing the experiment today:

1. I misnamed the name of the data file at the beginning, and the suffix should be dbf. As a result, I wrote bdf.

Alter tablespace ICSDB rename DATAFILE'/ ora_data/icsdb/icsdb01.bdf' to'/ ora_data/icsdb/icsdb01.dbf'

2. When I started the database, I found that the data file was not read and needed to be restored. At present, I also got it when I was doing the file recovery experiment.

SYS@icsdb > alter database datafile'/ ora_data/icsdb/icsdb01.dbf' online

Alter database datafile'/ ora_data/icsdb/icsdb01.dbf' online

*

An error occurred on line 1:

ORA-01113: file 5 requires media recovery

ORA-01110: data file 5:'/ ora_data/icsdb/icsdb01.dbf'

From the above prompt, we can know that the file needs recover.

SYS@icsdb > recover datafile'/ ora_data/icsdb/icsdb01.dbf'

Complete the media recovery.

SYS@icsdb > alter database datafile'/ ora_data/icsdb/icsdb01.dbf' online

The database has changed.

SYS@icsdb > select name,status from v$datafile

NAME STATUS

-

/ ora_data/icsdb/system01.dbf SYSTEM

/ ora_data/icsdb/sysaux01.dbf ONLINE

/ ora_data/icsdb/undotbs01.dbf ONLINE

/ ora_data/icsdb/users01.dbf ONLINE

/ ora_data/icsdb/icsdb01.dbf ONLINE

/ ora_data/icsdb/hr01.dbf ONLINE

6 rows have been selected.

SYS@icsdb > conn ics

Enter the password:

Connected.

ICS@icsdb >

ICS@icsdb >

ICS@icsdb > select count (*) from student

COUNT (*)

-

forty-two

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