本文主要是介绍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 /nologSQL*Plus: Release 11.2.0.4.0 Production on Fri Sep 19 12:57:18 2014Copyright (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>wherefile - 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.
重建密码文件之后就可以连接成功
这篇关于RMAN-10003: unable to connect to target database、ORA-01017: 用户名/口令无效; 登录被拒绝的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!