您的位置:首页 > 其它

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

2014-09-20 10:30 543 查看
 

今天远程协助处理一个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.


重建密码文件之后就可以连接成功
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐