rman创建备库报错问题处理记录

2024-03-21 18:18

本文主要是介绍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创建备库报错问题处理记录的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/833489

相关文章

如何使用celery进行异步处理和定时任务(django)

《如何使用celery进行异步处理和定时任务(django)》文章介绍了Celery的基本概念、安装方法、如何使用Celery进行异步任务处理以及如何设置定时任务,通过Celery,可以在Web应用中... 目录一、celery的作用二、安装celery三、使用celery 异步执行任务四、使用celery

详谈redis跟数据库的数据同步问题

《详谈redis跟数据库的数据同步问题》文章讨论了在Redis和数据库数据一致性问题上的解决方案,主要比较了先更新Redis缓存再更新数据库和先更新数据库再更新Redis缓存两种方案,文章指出,删除R... 目录一、Redis 数据库数据一致性的解决方案1.1、更新Redis缓存、删除Redis缓存的区别二

oracle数据库索引失效的问题及解决

《oracle数据库索引失效的问题及解决》本文总结了在Oracle数据库中索引失效的一些常见场景,包括使用isnull、isnotnull、!=、、、函数处理、like前置%查询以及范围索引和等值索引... 目录oracle数据库索引失效问题场景环境索引失效情况及验证结论一结论二结论三结论四结论五总结ora

JAVA中整型数组、字符串数组、整型数和字符串 的创建与转换的方法

《JAVA中整型数组、字符串数组、整型数和字符串的创建与转换的方法》本文介绍了Java中字符串、字符数组和整型数组的创建方法,以及它们之间的转换方法,还详细讲解了字符串中的一些常用方法,如index... 目录一、字符串、字符数组和整型数组的创建1、字符串的创建方法1.1 通过引用字符数组来创建字符串1.2

element-ui下拉输入框+resetFields无法回显的问题解决

《element-ui下拉输入框+resetFields无法回显的问题解决》本文主要介绍了在使用ElementUI的下拉输入框时,点击重置按钮后输入框无法回显数据的问题,具有一定的参考价值,感兴趣的... 目录描述原因问题重现解决方案方法一方法二总结描述第一次进入页面,不做任何操作,点击重置按钮,再进行下

SpringBoot操作spark处理hdfs文件的操作方法

《SpringBoot操作spark处理hdfs文件的操作方法》本文介绍了如何使用SpringBoot操作Spark处理HDFS文件,包括导入依赖、配置Spark信息、编写Controller和Ser... 目录SpringBoot操作spark处理hdfs文件1、导入依赖2、配置spark信息3、cont

解决mybatis-plus-boot-starter与mybatis-spring-boot-starter的错误问题

《解决mybatis-plus-boot-starter与mybatis-spring-boot-starter的错误问题》本文主要讲述了在使用MyBatis和MyBatis-Plus时遇到的绑定异常... 目录myBATis-plus-boot-starpythonter与mybatis-spring-b

Servlet中配置和使用过滤器的步骤记录

《Servlet中配置和使用过滤器的步骤记录》:本文主要介绍在Servlet中配置和使用过滤器的方法,包括创建过滤器类、配置过滤器以及在Web应用中使用过滤器等步骤,文中通过代码介绍的非常详细,需... 目录创建过滤器类配置过滤器使用过滤器总结在Servlet中配置和使用过滤器主要包括创建过滤器类、配置过滤

手把手教你idea中创建一个javaweb(webapp)项目详细图文教程

《手把手教你idea中创建一个javaweb(webapp)项目详细图文教程》:本文主要介绍如何使用IntelliJIDEA创建一个Maven项目,并配置Tomcat服务器进行运行,过程包括创建... 1.启动idea2.创建项目模板点击项目-新建项目-选择maven,显示如下页面输入项目名称,选择

mysql主从及遇到的问题解决

《mysql主从及遇到的问题解决》本文详细介绍了如何使用Docker配置MySQL主从复制,首先创建了两个文件夹并分别配置了`my.cnf`文件,通过执行脚本启动容器并配置好主从关系,文中还提到了一些... 目录mysql主从及遇到问题解决遇到的问题说明总结mysql主从及遇到问题解决1.基于mysql