The database version: 11.2.0.4 64
Object library: operating system: oracle Linux 6.7 64 - bit memory 64 g
The database version: 11.2.0.4 64
Description: Oracle redo under Windows is not supported in Linux to restore, so backup must be cold standby,
Source library operation is as follows:
SQL> The create pfile from spfile.
# # pfile of source library files back to
SQL> Shutdown immediate
# # # close source library, there is no open archive, not cold RMAN backup archive modes
SQL> Startup the mount
# # source-sink start to mount state
In the mount state under cold rman backup
Enter the rman
C:\Users\Administrator> Rman target/
RMAN> The run {
Configure controlfile autobackup off;
The allocate channel c1 device type disk format 'D: \ databackup \ RMAN_full_backup p_ u_ \ T_ d_ c1_fullbak_ % % % % % s';
The allocate channel c2 device type disk format 'D: \ databackup \ RMAN_full_backup p_ u_ \ T_ d_ c2_fullbak_ % % % % % s';
BACKUP AS COMPRESSED BACKUPSET DATABASE;
BACKUP the CURRENT CONTROLFILE FORMAT 'D: \ databackup \ RMAN_controlfile p_ s_ d_ \ cntrl_ % % % % T';
Release channel c2;
Release channel c1;
}
# # # # backup completed
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Object library preparation: installed the oracle database, and create an instance, after close the database, delete the parameter files, control files, data files, online redo logs,
The source generated pfile file copy to the target of library "/u01/app/oracle/product/11.2.0/dbhome_1/DBS/" directory
The source database backup control file and backup set copy to the target library "/rman" directory,
Note: database can only install the software does not create an instance, in order to save trouble, I got all,
Source-sink recovery:
[oracle @ Primary DBS] $rman target/
# # into the rman
RMAN> The set dbid=2235095625;
# # # set dbid
RMAN> Startup nomount;
# # start to nomount state
RMAN> Restore controlfile from '/rman/CNTRL_QLYY_109_1_20200617';
# # # to restore the control file
RMAN> 'the alter database SQL mount';
# # # to open the database to mount
RMAN> Crosscheck backup;
Check the backup information
# # #RMAN> The delete expired backup;
# # # remove invalid backup
RMAN> The catalog start with a '/rman/';
# # to join RMAN backup files to the catalog, registered to control file
RMAN> The run
{
The ALLOCATE CHANNEL c1 DEVICE TYPE DISK;
1 to set newname for datafile '/u01/app/oracle/oradata/qlyy/SYSTEM01. DBF';
2 to set newname for datafile '/u01/app/oracle/oradata/qlyy/SYSAUX01. DBF';
3 to set newname for datafile '/u01/app/oracle/oradata/qlyy/UNDOTBS01. DBF';
4 to set newname for datafile '/u01/app/oracle/oradata/qlyy/USERS01. DBF';
5 to set newname for datafile '/u01/app/oracle/oradata/qlyy/ZLTOOLSTBS. DBF';
6 to set newname for datafile '/u01/app/oracle/oradata/qlyy/ZL9BASEITEM. DBF';
Set newname for tempfile as expected 1 to '/u01/app/oracle/oradata/qlyy/TEMP01. DBF';
Restore the database.
The switch datafile all;
The switch tempfile as expected all;
Recover the database noredo;
Release channel c1;
}
# # # to set data file path, restore database
RMAN> SQL 'alter database open resetlogs';
# # is not fully recovered to open the database
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
In found online redo logs not recovered under the default path, and in the "/u01/app/oracle/product/11.2.0/dbhome_1/DBS/" path, through the following change
SQL> Shutdown immediate
[oracle @ Primary DBS] $mv/u01/app/oracle/product/11.2.0/dbhome_1/DBS/D: ORADATAQLYYREDO01. LOG/u01/app/oracle/oradata qlyy/REDO01 LOG
[oracle @ Primary DBS] $mv/u01/app/oracle/product/11.2.0/dbhome_1/DBS/D: ORADATAQLYYREDO02. LOG/u01/app/oracle/oradata qlyy/REDO02 LOG
[oracle @ Primary DBS] $mv/u01/app/oracle/product/11.2.0/dbhome_1/DBS/D: ORADATAQLYYREDO03. LOG/u01/app/oracle/oradata qlyy/REDO03 LOG
# # # mobile online redo logs and modify the name
SQL> Startup the mount
# # start to mount
SQL> The ALTER DATABASE RENAME FILE '/u01/app/oracle/product/11.2.0/dbhome_1/DBS/D: ORADATAQLYYREDO01. LOG' to '/u01/app/oracle/oradata qlyy/REDO01 LOG';
SQL> The ALTER DATABASE RENAME FILE '/u01/app/oracle/product/11.2.0/dbhome_1/DBS/D: ORADATAQLYYREDO02. LOG' to '/u01/app/oracle/oradata qlyy/REDO02 LOG';
SQL> The ALTER DATABASE RENAME FILE '/u01/app/oracle/product/11.2.0/dbhome_1/DBS/D: ORADATAQLYYREDO03. LOG' to '/u01/app/oracle/oradata qlyy/REDO03 LOG';
# # modified online redo log path
SQL> The alter database open;
# # to open the database
@?/RDBMS/admin/utlrp. SQL;
To compile the invalid objects
-- -- -- -- -- -- end -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Who is a great god know why recovery time online redo log data file and did not return to a path?
You see if the above steps and lack of place, still hope to point out mistakes,
CodePudding user response:
When using rman across versions (Windows to Linux) data migration, also need to use the convert database conversion? Consult everybody bossesCodePudding user response: