In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
I did a new rman duplicate operation today.
[oracle@ora02 ~] $rman target / auxiliary sys/oracle@PROD
Recovery Manager: Release 11.2.0.4.0-Production on Mon Jan 11 15:32:10 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to target database: ORCL (DBID=1427785672)
Connected to auxiliary database: PROD (not mounted)
RMAN > DUPLICATE TARGET DATABASE TO PROD FROM ACTIVE DATABASE
2 > spfile PARAMETER_VALUE_CONVERT 'ORCL','PROD'
3 > set CONTROL_FILES='/u01/app/oracle/oradata/PROD/control01.ctl','/u01/app/oracle/fast_recovery_area/PROD/control02.ctl'
4 > set DB_FILE_NAME_CONVERT='ORCL','PROD'
5 > set LOG_FILE_NAME_CONVERT='ORCL','PROD'
Execute the last error report
Oracle instance shut down
RMAN-00571: =
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =
RMAN-00571: =
RMAN-03002: failure of Duplicate Db command at 01/11/2016 15:33:46
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 01/11/2016 15:33:37
ORA-17628: Oracle error 19505 returned by remote Oracle server
When checking the standby library, it is found that the parameter files and control files have been copied. At this point, check the slave database and find that the instance of the slave database is closed. Manually start the instance of the slave database, report an error, and the db_name in the parameter file is inconsistent with that in the control file. It can be concluded that this step of modifying the control file by rman is not completed.
All the directories that should be created should have been created. Oracle network access, static monitoring in the starting state, otherwise the file can not be copied over ah! The archive of the main library is also open, and at least one file is available. Check all kinds of documents.
RMAN > report schema
Report of database schema for database with db_unique_name ORCL
List of Permanent Datafiles
= =
File Size (MB) Tablespace RB segs Datafile Name
1 740 SYSTEM * / u02/app/oracle/oradata/ORCL/system01.dbf
2 520 SYSAUX * / u02/app/oracle/oradata/ORCL/sysaux01.dbf
3 70 UNDOTBS1 * / u02/app/oracle/oradata/ORCL/undotbs01.dbf
4 5 USERS * / u02/app/oracle/oradata/ORCL/users01.dbf
List of Temporary Files
=
File Size (MB) Tablespace Maxsize (MB) Tempfile Name
-
1 20 TEMP 32767 / u01/app/oracle/oradata/ORCL/temp01.dbf
Then I found the problem, why is the data file not in its usual location? I suddenly remembered that I had done some operations to change the path a few days ago. Look back at the log reported by rman.
Starting backup at 2016-01-11 15:33:33
Using channel ORA_DISK_1
Channel ORA_DISK_1: starting datafile copy
Input datafile file number=00001 name=/u02/app/oracle/oradata/ORCL/system01.dbf
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 01/11/2016 15:33:34
ORA-17628: Oracle error 19505 returned by remote Oracle server
Continuing other job steps, job failed will not be re-run
Channel ORA_DISK_1: starting datafile copy
Input datafile file number=00002 name=/u02/app/oracle/oradata/ORCL/sysaux01.dbf
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 01/11/2016 15:33:35
ORA-17628: Oracle error 19505 returned by remote Oracle server
Continuing other job steps, job failed will not be re-run
Channel ORA_DISK_1: starting datafile copy
Input datafile file number=00003 name=/u02/app/oracle/oradata/ORCL/undotbs01.dbf
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 01/11/2016 15:33:36
ORA-17628: Oracle error 19505 returned by remote Oracle server
Continuing other job steps, job failed will not be re-run
Channel ORA_DISK_1: starting datafile copy
Input datafile file number=00004 name=/u02/app/oracle/oradata/ORCL/users01.dbf
Oracle instance started
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 536874064 bytes
Database Buffers 289406976 bytes
Redo Buffers 6565888 bytes
Contents of Memory Script:
{
Sql clone "alter system set db_name =
'' PROD'' comment=
'' Reset to original value by RMAN'' scope=spfile''
Sql clone "alter system reset db_unique_name scope=spfile"
Shutdown clone immediate
}
Job has been failing because there is no corresponding directory for the repository. If you know the problem, it will be easy to solve it. Just add a corresponding relationship to the DB_FILE_NAME_CONVERT.
RMAN > connect auxiliary sys/oracle@PROD
Connected to auxiliary database: PROD (not mounted)
RMAN > DUPLICATE TARGET DATABASE TO PROD FROM ACTIVE DATABASE
2 > spfile PARAMETER_VALUE_CONVERT 'ORCL','PROD'
3 > set CONTROL_FILES='/u01/app/oracle/oradata/PROD/control01.ctl','/u01/app/oracle/fast_recovery_area/PROD/control02.ctl'
4 > set DB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/ORCL','/u01/app/oracle/oradata/PROD','/u02/app/oracle/oradata/ORCL','/u01/app/oracle/oradata/PROD'
5 > set LOG_FILE_NAME_CONVERT='ORCL','PROD'
Starting Duplicate Db at 2016-01-11 15:54:32
Allocated channel: ORA_AUX_DISK_1
Channel ORA_AUX_DISK_1: SID=10 device type=DISK
Contents of Memory Script:
{
Backup as copy reuse
Targetfile'/ u01 auxiliary format apprentices.oracle.productUniverse 11.2.0; dbhomecards 1; dbscospfileORCL.ora'According
'/ u01 apprenticespact oracleproductUniverse 11.2.0 Universe dbhomeowners 1 dbsUniverse spfilePROD.ora'
Sql clone "alter system set spfile=''/ u01 apprenticespact oracle.productUniverse 11.2.0; dbhomeowners 1 and dbfilePROD.oratrees'"
}
Executing Memory Script
Starting backup at 2016-01-11 15:54:32
Using channel ORA_DISK_1
Finished backup at 2016-01-11 15:54:34
Sql statement: alter system set spfile=''/ u01 apprenticespact oracleplicative product11.2.0 apprentices1 anddbfilePROD.oratrees'
Contents of Memory Script:
{
Sql clone "alter system set db_name =
'' PROD'' comment=
'' duplicate'' scope=spfile''
Sql clone "alter system set audit_file_dest =
'' / u01 comment= App to oracle, to admin, to PROD, to adum packs, to
'scope=spfile''
Sql clone "alter system set dispatchers =
'(PROTOCOL=TCP) (SERVICE=PRODXDB)' 'comment=
'scope=spfile''
Sql clone "alter system set CONTROL_FILES =
'' / u01appranumoracle oradata comment= PRODcontrol01.ctltransactions,'/ u01aphoraloracleplicasfastrecoverycosareaplicationPRODcontrol02.ctlareas' PRODcontrol
'scope=spfile''
Sql clone "alter system set db_file_name_convert =
'' / u01Grexample oradataPlacement,'/ u01plash,'/ u01plaza,'/ u01,'/ u01, comment=,'/ u01,'/ u01,
'scope=spfile''
Sql clone "alter system set LOG_FILE_NAME_CONVERT =
'' ORCL'',''PROD'' comment=
'scope=spfile''
Shutdown clone immediate
Startup clone nomount
}
Executing Memory Script
Sql statement: alter system set db_name =''PROD'' comment=' 'duplicate'' scope=spfile
Sql statement: alter system set audit_file_dest =''/ u01 * * scope=spfile * comment= *
Sql statement: alter system set dispatchers ='(PROTOCOL=TCP) (SERVICE=PRODXDB)''comment=' 'scope=spfile
Sql statement: alter system set CONTROL_FILES =''/ u01 *
Sql statement: alter system set db_file_name_convert =''/ u01 racket,'/ u01, comment=,','/ u01, comment=,'/ u01,'/ u01
Sql statement: alter system set LOG_FILE_NAME_CONVERT =''ORCL'',' PROD'' comment= 'scope=spfile
Oracle instance shut down
Connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 536874064 bytes
Database Buffers 289406976 bytes
Redo Buffers 6565888 bytes
Contents of Memory Script:
{
Sql clone "alter system set db_name =
'' ORCL'' comment=
'' Modified by RMAN duplicate'' scope=spfile''
Sql clone "alter system set db_unique_name =
'' PROD'' comment=
'' Modified by RMAN duplicate'' scope=spfile''
Shutdown clone immediate
Startup clone force nomount
Backup as copy current controlfile auxiliary format'/ u01qapplash oracle.oradataapprod 'control 01.ctl'.
Restore clone controlfile to'/ u01qqappActionoracleUniverse fastening recoveryAccording to PRODcontrol control02.ctl' from
'/ u01appranumoracleandoradata'PRODUniverse control01.ctl'
Alter clone database mount
}
Executing Memory Script
Sql statement: alter system set db_name =''ORCL'' comment=' 'Modified by RMAN duplicate'' scope=spfile
Sql statement: alter system set db_unique_name =''PROD'' comment=' 'Modified by RMAN duplicate'' scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 536874064 bytes
Database Buffers 289406976 bytes
Redo Buffers 6565888 bytes
Starting backup at 2016-01-11 15:54:47
Using channel ORA_DISK_1
Channel ORA_DISK_1: starting datafile copy
Copying current control file
Output file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_ORCL.f tag=TAG20160111T155447 RECID=9 STAMP=900863687
Channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 2016-01-11 15:54:48
Starting restore at 2016-01-11 15:54:48
Allocated channel: ORA_AUX_DISK_1
Channel ORA_AUX_DISK_1: SID=133 device type=DISK
Channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 2016-01-11 15:54:49
Database mounted
Contents of Memory Script:
{
Set newname for datafile 1 to
"/ u01/app/oracle/oradata/PROD/system01.dbf"
Set newname for datafile 2 to
"/ u01/app/oracle/oradata/PROD/sysaux01.dbf"
Set newname for datafile 3 to
"/ u01/app/oracle/oradata/PROD/undotbs01.dbf"
Set newname for datafile 4 to
"/ u01/app/oracle/oradata/PROD/users01.dbf"
Backup as copy reuse
Datafile 1 auxiliary format
"/ u01/app/oracle/oradata/PROD/system01.dbf" datafile
2 auxiliary format
"/ u01/app/oracle/oradata/PROD/sysaux01.dbf" datafile
3 auxiliary format
"/ u01/app/oracle/oradata/PROD/undotbs01.dbf" datafile
4 auxiliary format
"/ u01/app/oracle/oradata/PROD/users01.dbf"
Sql 'alter system archive log current'
}
Executing Memory Script
Executing command: SET NEWNAME
Executing command: SET NEWNAME
Executing command: SET NEWNAME
Executing command: SET NEWNAME
Starting backup at 2016-01-11 15:54:54
Using channel ORA_DISK_1
Channel ORA_DISK_1: starting datafile copy
Input datafile file number=00001 name=/u02/app/oracle/oradata/ORCL/system01.dbf
Output file name=/u01/app/oracle/oradata/PROD/system01.dbf tag=TAG20160111T155454
Channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
Channel ORA_DISK_1: starting datafile copy
Input datafile file number=00002 name=/u02/app/oracle/oradata/ORCL/sysaux01.dbf
Output file name=/u01/app/oracle/oradata/PROD/sysaux01.dbf tag=TAG20160111T155454
Channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
Channel ORA_DISK_1: starting datafile copy
Input datafile file number=00003 name=/u02/app/oracle/oradata/ORCL/undotbs01.dbf
Output file name=/u01/app/oracle/oradata/PROD/undotbs01.dbf tag=TAG20160111T155454
Channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Channel ORA_DISK_1: starting datafile copy
Input datafile file number=00004 name=/u02/app/oracle/oradata/ORCL/users01.dbf
Output file name=/u01/app/oracle/oradata/PROD/users01.dbf tag=TAG20160111T155454
Channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 2016-01-11 15:55:28
Sql statement: alter system archive log current
Contents of Memory Script:
{
Backup as copy reuse
Archivelog like "/ u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_01_11/o1_mf_1_23_c96qzjkx_.arc" auxiliary format
"/ u01/app/oracle/fast_recovery_area/PROD/archivelog/2016_01_11/o1_mf_1_23_%u_.arc"
Catalog clone recovery area
Switch clone datafile all
}
Executing Memory Script
Starting backup at 2016-01-11 15:55:28
Using channel ORA_DISK_1
Channel ORA_DISK_1: starting archived log copy
Input archived log thread=1 sequence=23 RECID=18 STAMP=900863728
Output file name=/u01/app/oracle/fast_recovery_area/PROD/archivelog/2016_01_11/o1_mf_1_23_1sqr45ng_.arc RECID=0 STAMP=0
Channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
Finished backup at 2016-01-11 15:55:29
Searching for all files in the recovery area
List of Files Unknown to the Database
= =
File Name: / u01/app/oracle/fast_recovery_area/PROD/archivelog/2016_01_11/o1_mf_1_23_1sqr45ng_.arc
Cataloging files...
Cataloging done
List of Cataloged Files
=
File Name: / u01/app/oracle/fast_recovery_area/PROD/archivelog/2016_01_11/o1_mf_1_23_1sqr45ng_.arc
List of files in Recovery Area not managed by the database
=
File Name: / u01/app/oracle/fast_recovery_area/PROD/control02.ctl
RMAN-07526: Reason: File is not an Oracle Managed File
Number of files not managed by recovery area is 1, totaling 9.28MB
Datafile 1 switched to datafile copy
Input datafile copy RECID=9 STAMP=900863730 file name=/u01/app/oracle/oradata/PROD/system01.dbf
Datafile 2 switched to datafile copy
Input datafile copy RECID=10 STAMP=900863730 file name=/u01/app/oracle/oradata/PROD/sysaux01.dbf
Datafile 3 switched to datafile copy
Input datafile copy RECID=11 STAMP=900863730 file name=/u01/app/oracle/oradata/PROD/undotbs01.dbf
Datafile 4 switched to datafile copy
Input datafile copy RECID=12 STAMP=900863730 file name=/u01/app/oracle/oradata/PROD/users01.dbf
Contents of Memory Script:
{
Set until scn 1026162
Recover
Clone database
Delete archivelog
}
Executing Memory Script
Executing command: SET until clause
Starting recover at 2016-01-11 15:55:29
Using channel ORA_AUX_DISK_1
Starting media recovery
Archived log for thread 1 with sequence 23 is already on disk as file / u01/app/oracle/fast_recovery_area/PROD/archivelog/2016_01_11/o1_mf_1_23_1sqr45ng_.arc
Archived log file name=/u01/app/oracle/fast_recovery_area/PROD/archivelog/2016_01_11/o1_mf_1_23_1sqr45ng_.arc thread=1 sequence=23
Media recovery complete, elapsed time: 00:00:00
Finished recover at 2016-01-11 15:55:30
Oracle instance started
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 536874064 bytes
Database Buffers 289406976 bytes
Redo Buffers 6565888 bytes
Contents of Memory Script:
{
Sql clone "alter system set db_name =
'' PROD'' comment=
'' Reset to original value by RMAN'' scope=spfile''
Sql clone "alter system reset db_unique_name scope=spfile"
Shutdown clone immediate
Startup clone nomount
}
Executing Memory Script
Sql statement: alter system set db_name =''PROD'' comment=' 'Reset to original value by RMAN'' scope=spfile
Sql statement: alter system reset db_unique_name scope=spfile
Oracle instance shut down
Connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 536874064 bytes
Database Buffers 289406976 bytes
Redo Buffers 6565888 bytes
Sql statement: CREATE CONTROLFILE REUSE SET DATABASE "PROD" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ('/ u01 REUSE) SIZE 50 M REUSE
GROUP 2 ('/ u01 REUSE) SIZE 50 M REUSE
GROUP 3 ('/ u01 SIZE REUSE) SIZE 50 M
DATAFILE
'/ u01plash appUnitionoracleandoradata'PRODUniple system01.dbf'
CHARACTER SET AL32UTF8
Contents of Memory Script:
{
Set newname for tempfile 1 to
"/ u01/app/oracle/oradata/PROD/temp01.dbf"
Switch clone tempfile all
Catalog clone datafilecopy "/ u01/app/oracle/oradata/PROD/sysaux01.dbf"
"/ u01/app/oracle/oradata/PROD/undotbs01.dbf"
"/ u01/app/oracle/oradata/PROD/users01.dbf"
Switch clone datafile all
}
Executing Memory Script
Executing command: SET NEWNAME
Renamed tempfile 1 to / u01/app/oracle/oradata/PROD/temp01.dbf in control file
Cataloged datafile copy
Datafile copy file name=/u01/app/oracle/oradata/PROD/sysaux01.dbf RECID=1 STAMP=900863742
Cataloged datafile copy
Datafile copy file name=/u01/app/oracle/oradata/PROD/undotbs01.dbf RECID=2 STAMP=900863742
Cataloged datafile copy
Datafile copy file name=/u01/app/oracle/oradata/PROD/users01.dbf RECID=3 STAMP=900863742
Datafile 2 switched to datafile copy
Input datafile copy RECID=1 STAMP=900863742 file name=/u01/app/oracle/oradata/PROD/sysaux01.dbf
Datafile 3 switched to datafile copy
Input datafile copy RECID=2 STAMP=900863742 file name=/u01/app/oracle/oradata/PROD/undotbs01.dbf
Datafile 4 switched to datafile copy
Input datafile copy RECID=3 STAMP=900863742 file name=/u01/app/oracle/oradata/PROD/users01.dbf
Contents of Memory Script:
{
Alter clone database open resetlogs
}
Executing Memory Script
Database opened
Finished Duplicate Db at 2016-01-11 15:55:45
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.