本文主要是介绍rman创建备库报错问题处理记录,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
报错1:
[oracle@dgcrm ~]$ rman target sys/123456@CRM auxiliary sys/123456@DGCRM
Recovery Manager: Release 11.2.0.4.0 - Production on Thu Dec 1 10:26:53 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: CRM (DBID=991422785)
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04006: error from auxiliary database: ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
监听配置不对
报错2:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/01/2016 18:37:56
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on prmy4 channel at 12/01/2016 18:37:56
ORA-17628: Oracle error 19505 returned by remote Oracle server
主备库的数据库文件路径不对,又没有加b_file_name_convert、log_file_name_convert,报错
如:控制文件的目录没有创建
[oracle@oracle_backup oradata]$ cd /u01/app/oracle/oradata/CRM/
-bash: cd: /u01/app/oracle/oradata/CRM/: No such file or directory
[oracle@oracle_backup oradata]$ mkdir -p /u01/app/oracle/oradata/CRM/
[oracle@oracle_backup oradata]$ mkdir -p /oradata/hzjxc
报错3:
DBGSQL: TARGET> begin :fhdbi := dbms_rcvcat.getDbid; end;
DBGSQL: sqlcode = 6550
DBGSQL: B :fhdbi = 32767
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/01/2016 10:58:37
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
ORA-06550: line 1, column 17:
PLS-00201: identifier 'DBMS_RCVCAT.GETDBID' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
一些配置修改了,rman需要登录连接
报错4:
rman target sys/123456@CRM auxiliary /
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/01/2016 10:24:46
RMAN-05501: aborting duplication of target database
RMAN-06217: not connected to auxiliary database with a net service name
辅助库不能本地方式连接
报错5:
SQL> startup nomount
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=Redhat6.5T)(PORT=1521))'
--alert.log---
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
ORACLE_HOME = /u01/app/oracle/11204
System name: Linux
Node name: Redhat6.5T
Release: 2.6.32-431.el6.x86_64
Version: #1 SMP Sun Nov 10 22:19:54 EST 2013
Machine: x86_64
VM name: VMWare Version: 6
Using parameter settings in server-side pfile /u01/app/oracle/11204/dbs/initCRM.ora
System parameters with non-default values:
processes = 1500
sessions = 2272
sga_target = 46720M
control_files = "/u01/app/oracle/oradata/CRM/control01.ctl"
control_files = "/oradata/fast_recovery_area/CRM/control02.ctl"
control_files = "/u01/app/oracle/oradata/CRM/control03.ctl"
db_block_size = 8192
compatible = "11.2.0.4.0"
log_archive_dest_2 = "service=dgcrm LGWR SYNC affirm valid_for=(online_logfiles,primary_role) db_unique_name=dgcrm"
log_archive_dest_state_1 = "ENABLE"
log_archive_dest_state_2 = "ENABLE"
fal_client = "CRM"
fal_server = "DGCRM"
log_archive_config = "dg_config=(CRM,dgcrm)"
log_archive_format = "%t_%s_%r.dbf"
db_recovery_file_dest = "/oradata/fast_recovery_area"
db_recovery_file_dest_size= 41820M
standby_file_management = "AUTO"
undo_tablespace = "UNDOTBS1"
remote_login_passwordfile= "EXCLUSIVE"
db_domain = ""
dispatchers = "(PROTOCOL=TCP) (SERVICE=CRMXDB)"
audit_file_dest = "/u01/app/oracle/admin/CRM/adump"
audit_trail = "DB"
db_name = "CRM"
db_unique_name = "CRM"
open_cursors = 300
pga_aggregate_target = 15559M
diagnostic_dest = "/u01/app/oracle"
USER (ospid: 16260): terminating the instance due to error 119
Instance terminated by USER, pid = 16260
SQL> startup nomount
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=Redhat6.5T)(PORT=1521))'
机器名没有改变正确
报错6:备库没有接受到归档
SQL> show parameter LOG_ARCHIVE_DEST_2;
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
log_archive_dest_2 string service=dg LGWR SYNC affirm v
alid_for=(online_logfiles,prim
ary_role) db_unique_name=dg
log_archive_dest_20 string
log_archive_dest_21 string
log_archive_dest_22 string
log_archive_dest_23 string
log_archive_dest_24 string
log_archive_dest_25 string
log_archive_dest_26 string
log_archive_dest_27 string
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
log_archive_dest_28 string
log_archive_dest_29 string
SQL> select dest_id,error,status,log_sequence,applied_scn from v$archive_dest where dest_id=2;
DEST_ID ERROR STATUS LOG_SEQUENCE APPLIED_SCN
---------- ----------------------------------------------------------------- --------------------------- ------------ -----------
2 ORA-16047: DGID mismatch between destination setting and target ERROR 0 0
database
SQL>
原因备库的log_archive_config忘记配了
alter system set log_archive_config='dg_config=(CRM,dgcrm)' scope=spfile;
配置后关闭,再starup mount; 再alter database recover managed standby database disconnect from session;
///正常执行duplicate过程/
[oracle@Redhat6 ~]$
[oracle@Redhat6 ~]$ rman target sys/123456@CRM auxiliary sys/123456@dgcrm
Recovery Manager: Release 11.2.0.4.0 - Production on Thu Dec 1 17:23:21 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: CRM (DBID=991398108)
connected to auxiliary database: CRM (not mounted)
RMAN> run {
2> allocate auxiliary channel c1 device type disk;
allocate auxiliary channel c2 device type disk;
4> duplicate target database for standby nofilenamecheck dorecover;
release channel c1;
release channel c2;
7> }
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=10 device type=DISK
allocated channel: c2
channel c2: SID=1146 device type=DISK
Starting Duplicate Db at 01-DEC-16
contents of Memory Script:
{
set until scn 1064069;
restore clone standby controlfile;
}
executing Memory Script
executing command: SET until clause
Starting restore at 01-DEC-16
channel c1: starting datafile backup set restore
channel c1: restoring control file
channel c1: reading from backup piece /oradata/fast_recovery_area/CRM/backupset/2016_12_01/o1_mf_ncsnf_TAG20161201T161453_d3zq060s_.bkp
channel c1: piece handle=/oradata/fast_recovery_area/CRM/backupset/2016_12_01/o1_mf_ncsnf_TAG20161201T161453_d3zq060s_.bkp tag=TAG20161201T161453
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/CRM/control01.ctl
output file name=/oradata/fast_recovery_area/CRM/control02.ctl
output file name=/u01/app/oracle/oradata/CRM/control03.ctl
Finished restore at 01-DEC-16
contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
contents of Memory Script:
{
set until scn 1064069;
set newname for tempfile 1 to
"/oradata/CRM/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/oradata/CRM/system01.dbf";
set newname for datafile 2 to
"/oradata/CRM/sysaux01.dbf";
set newname for datafile 3 to
"/oradata/CRM/undotbs01.dbf";
set newname for datafile 4 to
"/oradata/CRM/users01.dbf";
restore
clone database
;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
renamed tempfile 1 to /oradata/CRM/temp01.dbf in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 01-DEC-16
channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00001 to /oradata/CRM/system01.dbf
channel c1: restoring datafile 00002 to /oradata/CRM/sysaux01.dbf
channel c1: restoring datafile 00003 to /oradata/CRM/undotbs01.dbf
channel c1: restoring datafile 00004 to /oradata/CRM/users01.dbf
channel c1: reading from backup piece /oradata/fast_recovery_area/CRM/backupset/2016_12_01/o1_mf_nnndf_TAG20161201T161453_d3zpzxxx_.bkp
channel c1: piece handle=/oradata/fast_recovery_area/CRM/backupset/2016_12_01/o1_mf_nnndf_TAG20161201T161453_d3zpzxxx_.bkp tag=TAG20161201T161453
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:15
Finished restore at 01-DEC-16
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=1 STAMP=929467441 file name=/oradata/CRM/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=2 STAMP=929467441 file name=/oradata/CRM/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=3 STAMP=929467441 file name=/oradata/CRM/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=4 STAMP=929467441 file name=/oradata/CRM/users01.dbf
contents of Memory Script:
{
set until scn 1064069;
recover
standby
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 01-DEC-16
starting media recovery
archived log for thread 1 with sequence 4 is already on disk as file /oradata/fast_recovery_area/CRM/archivelog/2016_12_01/o1_mf_1_4_d3zq077r_.arc
archived log file name=/oradata/fast_recovery_area/CRM/archivelog/2016_12_01/o1_mf_1_4_d3zq077r_.arc thread=1 sequence=4
media recovery complete, elapsed time: 00:00:00
Finished recover at 01-DEC-16
Finished Duplicate Db at 01-DEC-16
released channel: c1
released channel: c2
RMAN>
RMAN>
RMAN>
RMAN>
RMAN>
这篇关于rman创建备库报错问题处理记录的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!