首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >使用duplicate命令搭建DataGuard时遇到ORA-01103错误

使用duplicate命令搭建DataGuard时遇到ORA-01103错误

作者头像
Yunjie Ge
发布2025-06-23 14:02:11
发布2025-06-23 14:02:11
2340
举报
文章被收录于专栏:数据库与编程数据库与编程

最近搭建了一套Oracle 11.2.0.4单机的DataGuard,

使用duplicate target database 命令时遇到一个错误,见下:

代码语言:javascript
复制
RMAN> duplicate target database for standby nofilenamecheck;
Starting Duplicate Db at 18-JUN-25
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=1249 device type=DISK
contents of Memory Script:
{
   restore clone standby controlfile;
}
executing Memory Script
Starting restore at 18-JUN-25
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /home/ora11204/backup/STD_033saqo1_1_1
channel ORA_AUX_DISK_1: piece handle=/home/ora11204/backup/STD_033saqo1_1_1 tag=TAG20250618T134046
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/home/ora11204/app/oracle/oradata/std/control01.ctl
output file name=/home/ora11204/app/oracle/fast_recovery_area/std/control02.ctl
Finished restore at 18-JUN-25
contents of Memory Script:
{
   sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/18/2025 13:57:21
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on clone_default channel at 06/18/2025 13:57:21
RMAN-11003: failure during parse/execution of SQL statement: alter database mount standby database
ORA-01103: database name 'ORCL' in control file is not 'STD'
RMAN> exit

后来分析了一下,是DataGuard备库的参数文件的问题:

*.db_name='orcl',写成了*.db_name='std'

db_name有如下含义:

DB_NAME is a name that uniquely identified a database in a server,

It's defined at the time of database creation and written into control files.

One can't have two databases with the same DB name on the same server even in two different homes.

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2025-06-21,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 山东Oracle用户组 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档