In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
If data corruption or user errors only affect CDB's root container, then you may only consider restoring the root container. However, Oracle strongly recommends that you restore all PDB after restoring the root container to prevent root from being inconsistent with the metadata in PDB. In this case, it is better to perform a restore operation on the entire CDB.
Using RMAN to perform a full restore of root is as follows:
1. Start RMAN and connect to the root container as a public user with sysdba or sysbackup privileges.
[oracle@jytest1] $rman target/ catalog rco/xxxxxx@jypdb Recovery Manager: Release 12.2.0.1.0-Production on Mon Dec 11 15:55:18 2017Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.connected to target database: JY (DBID=979425723, not open) connected to recovery catalog database
two。 Boot the entire CDB to the mount state
SQL > shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL > startup mountORACLE instance started.Total System Global Area 6442450944 bytesFixed Size 8807168 bytesVariable Size 1895828736 bytesDatabase Buffers 4529848320 bytesRedo Buffers 7966720 bytesDatabase mounted.SQL > select name from v$pdbs NAME----PDB$SEEDJYPDB
3. Optionally, use the configure command to configure the default device type and automatic channel.
4. Execute the following command to restore and restore the root container
RMAN > restore database root Starting restore at 11-DEC-17starting full resync of recovery catalogfull resync completeallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=1521 instance=jy1 device type=DISKchannel ORA_DISK_1: starting datafile backup set restorechannel ORA_DISK_1: specifying datafile (s) to restore from backup setchannel ORA_DISK_1: restoring datafile 00001 to + DATA/JY/DATAFILE/system.317.962209603channel ORA_DISK_1: restoring datafile 00003 to + DATA/JY/DATAFILE/sysaux.298.962209605channel ORA_DISK_1: restoring datafile 00004 to + DATA/JY/DATAFILE/undotbs1.277 .962209605 channel ORA_DISK_1: restoring datafile 00007 to + DATA/JY/DATAFILE/users.301.962209605channel ORA_DISK_1: restoring datafile 00009 to + DATA/JY/DATAFILE/undotbs2.312.962209605channel ORA_DISK_1: reading from backup piece + TEST/rman_backup/jy_979425723_20171208_0fslkbg2_1_1channel ORA_DISK_1: piece handle=+TEST/rman_backup/jy_979425723_20171208_0fslkbg2_1_1 tag=TAG20171208T165528channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete Elapsed time: 00:00:45Finished restore at 11-DEC-17RMAN > recover database root Starting recover at 11-DEC-17using channel ORA_DISK_1starting media recoveryarchived log for thread 1 with sequence 14 is already on disk as file + TEST/arch/1_14_961976319.dbfarchived log for thread 1 with sequence 15 is already on disk as file + TEST/arch/1_15_961976319.dbfarchived log for thread 1 with sequence 16 is already on disk as file + TEST/arch/1_16_961976319.dbfarchived log for thread 1 with sequence 17 is already on disk as file + TEST/arch/1_17_961976319.dbfarchived log for thread 1 with sequence 18 is Already on disk as file + TEST/arch/1_18_961976319.dbfarchived log for thread 1 with sequence 19 is already on disk as file + TEST/arch/1_19_961976319.dbfarchived log for thread 1 with sequence 20 is already on disk as file + TEST/arch/1_20_961976319.dbfarchived log for thread 1 with sequence 21 is already on disk as file + TEST/arch/1_21_961976319.dbfarchived log for thread 1 with sequence 22 is already on disk as file + TEST/arch/1_22_961976319.dbfarchived log for thread 1 with sequence 23 is Already on disk as file + TEST/arch/1_23_961976319.dbfarchived log for thread 1 with sequence 24 is already on disk as file + TEST/arch/1_24_961976319.dbfarchived log for thread 1 with sequence 25 is already on disk as file + TEST/arch/1_25_961976319.dbfarchived log for thread 1 with sequence 26 is already on disk as file + TEST/arch/1_26_961976319.dbfarchived log for thread 1 with sequence 27 is already on disk as file + TEST/arch/1_27_961976319.dbfarchived log for thread 2 with sequence 12 is Already on disk as file + TEST/arch/2_12_961976319.dbfarchived log for thread 2 with sequence 13 is already on disk as file + TEST/arch/2_13_961976319.dbfarchived log for thread 2 with sequence 14 is already on disk as file + TEST/arch/2_14_961976319.dbfarchived log for thread 2 with sequence 15 is already on disk as file + TEST/arch/2_15_961976319.dbfarchived log for thread 2 with sequence 16 is already on disk as file + TEST/arch/2_16_961976319.dbfarchived log for thread 2 with sequence 17 is Already on disk as file + TEST/arch/2_17_961976319.dbfarchived log for thread 2 with sequence 18 is already on disk as file + TEST/arch/2_18_961976319.dbfarchived log for thread 2 with sequence 19 is already on disk as file + TEST/arch/2_19_961976319.dbfarchived log for thread 2 with sequence 20 is already on disk as file + TEST/arch/2_20_961976319.dbfarchived log file name=+TEST/arch/1_14_961976319.dbf thread=1 sequence=14archived log file name=+TEST/arch/2_12_961976319.dbf thread=2 sequence=12archived log file Name=+TEST/arch/1_15_961976319.dbf thread=1 sequence=15archived log file name=+TEST/arch/2_13_961976319.dbf thread=2 sequence=13archived log file name=+TEST/arch/1_16_961976319.dbf thread=1 sequence=16archived log file name=+TEST/arch/1_17_961976319.dbf thread=1 sequence=17archived log file name=+TEST/arch/2_14_961976319.dbf thread=2 sequence=14archived log file name=+TEST/arch/1_18_961976319.dbf thread=1 sequence=18archived log file name=+TEST/arch/1_19_961976319.dbf thread=1 sequence=19archived log file name=+TEST/arch/1_20_961976319.dbf thread=1 sequence=20archived log file Name=+TEST/arch/2_15_961976319.dbf thread=2 sequence=15archived log file name=+TEST/arch/1_21_961976319.dbf thread=1 sequence=21archived log file name=+TEST/arch/1_22_961976319.dbf thread=1 sequence=22archived log file name=+TEST/arch/2_16_961976319.dbf thread=2 sequence=16archived log file name=+TEST/arch/1_23_961976319.dbf thread=1 sequence=23archived log file name=+TEST/arch/1_24_961976319.dbf thread=1 sequence=24archived log file name=+TEST/arch/2_17_961976319.dbf thread=2 sequence=17archived log file name=+TEST/arch/1_25_961976319.dbf thread=1 sequence=25archived log file Name=+TEST/arch/2_18_961976319.dbf thread=2 sequence=18archived log file name=+TEST/arch/1_26_961976319.dbf thread=1 sequence=26media recovery complete Elapsed time: 00:06:07Finished recover at 11-DEC-17starting full resync of recovery catalogfull resync complete
5. Check the output to see if the media has been restored successfully. If the media is restored successfully, continue with the following
6. Highly recommended action to restore all PDB, including CDB seed
RMAN > restore pluggable database 'PDB$SEED',jypdb;Starting restore at 11-DEC-17using channel ORA_DISK_1skipping datafile 5; already restored to file + DATA/JY/5F9AA264B21F3ED9E053AB828A0A6088/DATAFILE/system.256.962209675skipping datafile 6; already restored to file + DATA/JY/5F9AA264B21F3ED9E053AB828A0A6088/DATAFILE/sysaux.270.962209675skipping datafile 8 Already restored to file + DATA/JY/5F9AA264B21F3ED9E053AB828A0A6088/DATAFILE/undotbs1.296.962209675channel ORA_DISK_1: starting datafile backup set restorechannel ORA_DISK_1: specifying datafile (s) to restore from backup setchannel ORA_DISK_1: restoring datafile 00010 to + DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/system.271.962209649channel ORA_DISK_1: restoring datafile 00011 to + DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/sysaux.316.962209649channel ORA_DISK_1: restoring datafile 00012 to + DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/undotbs1.264.962209649channel ORA_DISK_1: restoring Datafile 00013 to + DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/undo_2.268.962209649channel ORA_DISK_1: restoring datafile 00014 to + DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/users.278.962209649channel ORA_DISK_1: restoring datafile 00015 to + DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/test.275.962210609channel ORA_DISK_1: reading from backup piece + TEST/rman_backup/jy_979425723_20171208_0gslkbie_1_1channel ORA_DISK_1: piece handle=+TEST/rman_backup/jy_979425723_20171208_0gslkbie_1_1 tag=TAG20171208T165528channel ORA_DISK_ 1: restored backup piece 1channel ORA_DISK_1: restore complete Elapsed time: 00:00:25Finished restore at 11-DEC-17RMAN > recover pluggable database 'PDB$SEED',jypdb Starting recover at 11-DEC-17using channel ORA_DISK_1starting media recoveryarchived log for thread 1 with sequence 14 is already on disk as file + TEST/arch/1_14_961976319.dbfarchived log for thread 1 with sequence 15 is already on disk as file + TEST/arch/1_15_961976319.dbfarchived log for thread 1 with sequence 16 is already on disk as file + TEST/arch/1_16_961976319.dbfarchived log for thread 1 with sequence 17 is already on disk as file + TEST/arch/1_17_961976319.dbfarchived log for thread 1 with sequence 18 is Already on disk as file + TEST/arch/1_18_961976319.dbfarchived log for thread 1 with sequence 19 is already on disk as file + TEST/arch/1_19_961976319.dbfarchived log for thread 1 with sequence 20 is already on disk as file + TEST/arch/1_20_961976319.dbfarchived log for thread 1 with sequence 21 is already on disk as file + TEST/arch/1_21_961976319.dbfarchived log for thread 1 with sequence 22 is already on disk as file + TEST/arch/1_22_961976319.dbfarchived log for thread 1 with sequence 23 is Already on disk as file + TEST/arch/1_23_961976319.dbfarchived log for thread 1 with sequence 24 is already on disk as file + TEST/arch/1_24_961976319.dbfarchived log for thread 1 with sequence 25 is already on disk as file + TEST/arch/1_25_961976319.dbfarchived log for thread 1 with sequence 26 is already on disk as file + TEST/arch/1_26_961976319.dbfarchived log for thread 1 with sequence 27 is already on disk as file + TEST/arch/1_27_961976319.dbfarchived log for thread 2 with sequence 12 is Already on disk as file + TEST/arch/2_12_961976319.dbfarchived log for thread 2 with sequence 13 is already on disk as file + TEST/arch/2_13_961976319.dbfarchived log for thread 2 with sequence 14 is already on disk as file + TEST/arch/2_14_961976319.dbfarchived log for thread 2 with sequence 15 is already on disk as file + TEST/arch/2_15_961976319.dbfarchived log for thread 2 with sequence 16 is already on disk as file + TEST/arch/2_16_961976319.dbfarchived log for thread 2 with sequence 17 is Already on disk as file + TEST/arch/2_17_961976319.dbfarchived log for thread 2 with sequence 18 is already on disk as file + TEST/arch/2_18_961976319.dbfarchived log for thread 2 with sequence 19 is already on disk as file + TEST/arch/2_19_961976319.dbfarchived log for thread 2 with sequence 20 is already on disk as file + TEST/arch/2_20_961976319.dbfarchived log file name=+TEST/arch/1_14_961976319.dbf thread=1 sequence=14archived log file name=+TEST/arch/2_12_961976319.dbf thread=2 sequence=12archived log file Name=+TEST/arch/1_15_961976319.dbf thread=1 sequence=15archived log file name=+TEST/arch/2_13_961976319.dbf thread=2 sequence=13archived log file name=+TEST/arch/1_16_961976319.dbf thread=1 sequence=16archived log file name=+TEST/arch/1_17_961976319.dbf thread=1 sequence=17archived log file name=+TEST/arch/2_14_961976319.dbf thread=2 sequence=14archived log file name=+TEST/arch/1_18_961976319.dbf thread=1 sequence=18archived log file name=+TEST/arch/1_19_961976319.dbf thread=1 sequence=19archived log file name=+TEST/arch/1_20_961976319.dbf thread=1 sequence=20archived log file Name=+TEST/arch/2_15_961976319.dbf thread=2 sequence=15archived log file name=+TEST/arch/1_21_961976319.dbf thread=1 sequence=21archived log file name=+TEST/arch/1_22_961976319.dbf thread=1 sequence=22archived log file name=+TEST/arch/2_16_961976319.dbf thread=2 sequence=16archived log file name=+TEST/arch/1_23_961976319.dbf thread=1 sequence=23archived log file name=+TEST/arch/1_24_961976319.dbf thread=1 sequence=24archived log file name=+TEST/arch/2_17_961976319.dbf thread=2 sequence=17archived log file name=+TEST/arch/1_25_961976319.dbf thread=1 sequence=25archived log file Name=+TEST/arch/2_18_961976319.dbf thread=2 sequence=18archived log file name=+TEST/arch/1_26_961976319.dbf thread=1 sequence=26media recovery complete Elapsed time: 00:02:52Finished recover at 11-DEC-17starting full resync of recovery catalogfull resync complete
Check the output to see if the media has been restored successfully. If the media is restored successfully, continue with the following
7.open CDB and all PDB
RMAN > alter database open;Statement processedRMAN > alter pluggable database all open;Statement processedstarting full resync of recovery catalogfull resync complete
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
© 2024 shulou.com SLNews company. All rights reserved.