oracle-rman-如何在oracle dg端进行rman备份

简介:

在备库执行rman备份会报错,原因备份时无法连接主库强制切换日志

RMAN archivelog backup at the standby site is throws the following errors at the start of the job:
Starting backup at 15-JAN-2014 13:44:46
RMAN-06820: WARNING: failed to archive current log at primary database   <<<<<<<<<<
ORACLE error from target database:
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-01017: invalid username/password; logon denied           <<<<<<<<<<
ORA-17629: Cannot connect to the remote database server
But the rest of the backup actually complete successfully:
skipping archived log of thread 1 with sequence 607; already backed up
skipping archived log of thread 1 with sequence 614; already backed up
channel t1: starting archived log backup set
channel t1: specifying archived log(s) in backup set
input archived log thread=1 sequence=678 RECID=290 STAMP=836919086
input archived log thread=1 sequence=679 RECID=291 STAMP=836919369
input archived log thread=1 sequence=680 RECID=292 STAMP=836919706
input archived log thread=1 sequence=681 RECID=293 STAMP=836919873
channel t1: starting piece 1 at 15-JAN-2014 13:44:52
channel t1: finished piece 1 at 15-JAN-2014 13:46:17
piece handle=LOG_THMDB_20140115_171228_1_1 tag=LOG_TWMDB comment=API Version 2.0,MMS Version
5.4.1.0
channel t1: backup set complete, elapsed time: 00:01:25
Finished backup at 15-JAN-2014 13:46:17

Workaround 处理:用远程登录认证代替本地操作系统认证

Do not use operating system authentication to login with RMAN. Use a username and password.
That is, do not use just the "/" (operating system authentication) connect to the standby database:
      $ rman target /
      Connecting as 'rman target /' 
# it gets the sys user but not the password and so, it does NOT mean it is being explicitly 
# specified to connect as sysdba.

    **Instead put in the username and password for the SYSDBA user:**
      $ rman target sys/password@stby
      Connecting as 'rman target sysdba_user/password@stby'


例子:

[oracle@dgdpl2530 rman]$ more /u01/app/oracle/scripts/rman_backup.txt

connect target  sys/passwd@orclstb
run{
crosscheck archivelog all;
crosscheck backup;
delete noprompt expired backup;
delete noprompt expired archivelog all;
backup as compressed backupset database format
'/data01/arch01/backup/rman/%d_DB_%U.bak' plus archivelog
format '/data01/arch01/backup/rman/%d_ARCH_%U.bak' delete all input;
backup current controlfile format '/data01/arch01/backup/rman/%d_CTRL_%U.bak';
backup spfile format '/data01/arch01/backup/rman/%d_SPFILE_%U.bak';
delete noprompt obsolete Recovery Window of 7 days;
}
参考:
RMAN-06820 ORA-17629 During Backup at Standby Site (Doc ID 1616074.1)
Howto make a consistent RMAN backup in an Standby database in Active DataGuard mode (Doc ID 1419923)
目录
相关文章
|
6月前
|
Oracle 关系型数据库 数据库
9-2 Oracle数据库(表)的逻辑备份与恢复 --导出与导入
9-2 Oracle数据库(表)的逻辑备份与恢复 --导出与导入
|
15天前
|
SQL Oracle 关系型数据库
【Oracle】玩转Oracle数据库(七):RMAN恢复管理器
【Oracle】玩转Oracle数据库(七):RMAN恢复管理器
41 5
|
7天前
|
Oracle 安全 关系型数据库
Oracle数据守卫(DG):数据的“守护者”与“时光机”
【4月更文挑战第19天】Oracle Data Guard保障数据安全,通过实时维护备库实现故障切换,保证业务连续性。它使用日志传输和应用保持数据同步,如同“时光机”,借助闪回技术能恢复误操作数据。此外,它还提供数据压缩、加密和故障转移等功能,提升数据库安全性与性能。作为数据管理员,理解并善用Data Guard是确保企业数据安全的关键。
|
3月前
|
SQL 存储 Oracle
oracle如何定期备份数据库sql文件
【1月更文挑战第7天】oracle如何定期备份数据库sql文件
58 8
|
8月前
|
Oracle 关系型数据库 数据库
通过数据泵expdp、impdp方式备份与还原(导出与导入)Oracle数据库
通过数据泵expdp、impdp方式备份与还原(导出与导入)Oracle数据库
|
Oracle 关系型数据库 5G
Oracle 12C rman备份占用大量临时表空间
Oracle 12C rman备份占用大量临时表空间
389 0
|
11月前
|
存储 SQL 监控
Oracle BCT(Block Change Tracking)与增量备份---发表在数据和云
BCT(Block Change Tracking)是Oracle从10g开始有的特性。BCT的原理是记录数据文件里每个数据块的变化,并把这些变化信息保存在BCT的跟踪文件中。
306 0
|
11月前
|
Oracle 关系型数据库 内存技术
|
11月前
|
Oracle 关系型数据库 Linux
Oracle自动备份脚本(Linux)
Oracle自动备份脚本(Linux)
97 0
|
SQL Oracle 关系型数据库
Oracle中如何备份控制文件?备份控制文件的方式有哪几种?
Oracle中如何备份控制文件?备份控制文件的方式有哪几种?
278 0