RMAN-10003: unable to connect to target database、ORA-01017: 用户名/口令无效; 登录被拒绝

 

今天远程协助处理一个RMAN无法分配备份通道的问题
备份脚本里run部分如下:

run{
allocate channel d1 device type disk connect 'sys/oracle@TESTDB1';
allocate channel d2 device type disk connect 'sys/oracle@TESTDB2';
backup format '/u01/testdb/testdb_%s_%R_%T.arc' archivelog all delete all input;
release channel d1;
release channel d2;
}

 

 

 

报错如下:

using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-12001: could not open channel d1
RMAN-10008: could not create channel context
RMAN-10003: unable to connect to target database
ORA-01017: 用户名/口令无效; 登录被拒绝


虽然无法分配备份通道,但已经收到ORA-01017,说明连接串TESTDB1和TESTDB2配置没错,测试连接证实:

[oracle@rac1 testdb]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Fri Sep 19 12:57:18 2014

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

SQL> conn <a target=_blank href="mailto:system/oracle@TESTDB1">system/oracle@TESTDB1</a>;
Connect

sys用户远程登录需要读取密码文件,如果密码文件损坏或丢失都将无法登录,检查密码文件:

果然是密码文件orapwtestdb1出问题了.通过重建密码文件或修改密码文件的权限可以解决问题:

 

$ orapw file=$ORACLE_HOME/dbs/orapwtestdb1 password=oracle entries=5 force=y

如果不知道这些参数是什么意思,可以查看命令帮助:

$ orapwd help=y
Usage: orapwd file=<fname> entries=<users> force=<y/n> ignorecase=<y/n> nosysdba=<y/n>

  where
    file - name of password file (required),
    password - password for SYS will be prompted if not specified at command line,
    entries - maximum number of distinct DBA (optional),
    force - whether to overwrite existing file (optional),
    ignorecase - passwords are case-insensitive (optional),
    nosysdba - whether to shut out the SYSDBA logon (optional Database Vault only).
    
  There must be no spaces around the equal-to (=) character.


重建密码文件之后就可以连接成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值