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

Control the recovery of files with backup

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

Share

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

Use backup to control the recovery of files. The control file does not contain data files, but it is in the online log.

Alter database backup controlfile to'd:\ control.ctl'

Create tablespace tp1 datafile'Dranger size tp1.dbf'DVERGUP 10m

Create table T1 (id int,name varchar2 (10)) tablespace tp1

Insert into T1 values (1meme pl1')

Commit

Stop service = > services.msc== > stop the oracle process

Rm-rf control*

Shutdown abort

Copy D:\ control.ctl D:\ app\ administrator\ oradata\ orcl\ control01.ctl

Startup mount

Select file#,checkpoint_change# from v$datafile

Select file#,checkpoint_change# from v$datafile_header

Alter database open; / / hint that the control file is old

Recover database using backup controlfile

Select * from v$log looking for current's log

Enter D:\ oradata\ orcl\ redo02.log-status is current

Prompt that there is a file that is not recognized

Select file#,name from v$datafile

Alter database rename file'D:\ app/administrator\ product\ 11.2.0\ dbhome_1\ database\ UNNAMED00005' to'd:\ tp1.dbf'

Recover database using backup controlfile

Enter: / oradata/orcl/redo02.log-select * from v$log

Alter database open resetlogs

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