In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Check to see if the database is in non-archive mode
Shut down the database
Shutdown immediate
Backup control files and data files (no log files are backed up, it is recommended to back up together)
[oracle@enmoedu1 PROD] $lltotal 2014624 lltotal RWRaq r-1 oracle oinstall 9748480 Jan 24 21:49 control01.ctl-rw-r- 1 oracle oinstall 9748480 Jan 24 21:49 control02.ctl-rw-r- 1 oracle oinstall 363077632 Jan 24 21:49 example01.dbf-rw-r- 1 oracle oinstall 52429312 Jan 24 21:48 redo01.log-rw-r- 1 oracle oinstall 52429312 Jan 24 21:49 redo02.log-rw-r -1 oracle oinstall 52429312 Jan 24 21:48 redo03.log-rw-r- 1 oracle oinstall 576724992 Jan 24 21:49 sysaux01.dbf-rw-r- 1 oracle oinstall 807411712 Jan 24 21:49 system01.dbf-rw-r- 1 oracle oinstall 30416896 Jan 24 21:48 temp01.dbf-rw-r- 1 oracle oinstall 110108672 Jan 24 21:49 undotbs01.dbf-rw-r- 1 oracle oinstall 26222592 Jan 24 21:49 users01 .dbf [oracle@enmoedu1 PROD] $cp * .dbf / home/oracle/bak/ [oracle@enmoedu1 PROD] $cp * .ctl / home/oracle/bak/ [oracle@enmoedu1 PROD] $
Start the database, create a table, and insert the data submission
Startup-launch database SYS@PROD > create table T4 (id number); Table created.SYS@PROD > insert into T4 values (1); 1 row created.SYS@PROD > commit;Commit complete.SYS@PROD > select * from T4; ID- 1SYS@PROD >
Close the database and delete data files and control files
[oracle@enmoedu1 PROD] $rm-rf * .dbf [oracle@enmoedu1 PROD] $rm-rf * .ctl [oracle@enmoedu1 PROD] $lltotal 153612When Rwashi r-1 oracle oinstall 52429312 Jan 24 21:56 redo01.log-rw-r- 1 oracle oinstall 52429312 Jan 24 21:57 redo02.log-rw-r- 1 oracle oinstall 52429312 Jan 24 21:56 redo03.log [oracle@enmoedu1 PROD] $
Start the database to nomount, indicating that the parameter file is fine, to mount, can not find the control file, use the operating system command to copy the control file and then mount
SYS@PROD > startup nomount;ORACLE instance started.Total System Global Area 835104768 bytesFixed Size 2257840 bytesVariable Size 536874064 bytesDatabase Buffers 289406976 bytesRedo Buffers 6565888 bytesSYS@PROD > alter database mount Alter database mount*ERROR at line 1:ORA-00205: error in identifying control file Check alert log for more infoSYS@PROD > host [oracle@enmoedu1 PROD] $cp / home/oracle/bak/*.ctl. / [oracle@enmoedu1 PROD] $lltotal 172652 oracle oinstall 9748480 Jan 24 22:01 control01.ctl-rw-r- 1 oracle oinstall 9748480 Jan 24 22:01 control02.ctl-rw-r- 1 oracle oinstall 52429312 Jan 24 21:56 redo01.log-rw-r- 1 oracle oinstall 52429312 Jan 24 21:57 redo02 .log-rw-r- 1 oracle oinstall 52429312 Jan 24 21:56 redo03.log [oracle@enmoedu1 PROD] $exitSYS@PROD > alter database mount -- you can go to mount. The control file is fine. Database altered.SYS@PROD > SYS@PROD > alter database open;-- cannot find the data file. Alter database open*ERROR at line 1:ORA-01157: cannot identify/lock data file 1-see DBWR trace fileORA-01110: data file 1:'/ u01/app/oracle/oradata/PROD/system01.dbf'SYS@PROD >
Copy back to the data file
[oracle@enmoedu1 PROD] $cp / home/oracle/bak/*.dbf. / [oracle@enmoedu1 PROD] $lltotal 2014848 RWML r-1 oracle oinstall 9748480 Jan 24 22:05 control01.ctl-rw-r- 1 oracle oinstall 9748480 Jan 24 22:05 control02.ctl-rw-r- 1 oracle oinstall 363077632 Jan 24 22:03 example01.dbf-rw-r- 1 oracle oinstall 52429312 Jan 24 21:56 redo01.log-rw-r- -1 oracle oinstall 52429312 Jan 24 21:57 redo02.log-rw-r- 1 oracle oinstall 52429312 Jan 24 21:56 redo03.log-rw-r- 1 oracle oinstall 576724992 Jan 24 22:04 sysaux01.dbf-rw-r- 1 oracle oinstall 807411712 Jan 24 22:05 system01.dbf-rw-r- 1 oracle oinstall 30416896 Jan 24 22:05 temp01.dbf-rw-r- 1 oracle oinstall 110108672 Jan 24 22:05 undotbs01. Dbf-rw-r- 1 oracle oinstall 26222592 Jan 24 22:05 users01.dbf [oracle@enmoedu1 PROD] $exitSYS@PROD > alter database open Alter database open*ERROR at line 1:ORA-03113: end-of-file on communication channelProcess ID: 2951Session ID: 125 Serial number: 3
Found that the error was reported, because I backed up the control file and data file, and then opened the database to create a new table, which caused the scn of the database log file to be inconsistent with the control file. Check the alter log.
Enter startup mount to execute
Recover database until cancel
Alter database open resetlogs
Startup mount-- go to mountSYS@PROD > recover database until cancel;-- incomplete recovery Media recovery complete.SYS@PROD > alter database open resetlogs;-- reset log Database altered.SYS@PROD > select open_mode from vault database match-database has been opened OPEN_MODE-READ WRITESYS@PROD > select * from T4 -- query T4 table, no data select * from T4 * ERROR at line 1:ORA-00942: table or view does not existSYS@PROD >
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Innobackupex full backup flow chart the entire backup process is shown below:
© 2024 shulou.com SLNews company. All rights reserved.