简体   繁体   English

指定架构时,Oracle SQLPlus ORA-01017无效的凭证

[英]Oracle SQLPlus ORA-01017 invalid credentials when specifying schema

On an Oracle11g database, this works: 在Oracle11g数据库上,这可以工作:

SQL> connect USER/pass
Connected.

However, this doesn't: 但是,这不是:

SQL> connect USER/pass@db
ERROR:
ORA-01017: invalid username/password; logon denied

I have executed: 我已经执行:

SQL> grant connect to USER;
Grant succeeded.

What am I missing? 我想念什么?

tnsnames.ora: tnsnames.ora:

DB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = a.dom.b.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = db)
    )
  )

EDIT: 编辑:

:> sqlplus USER/pass
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Mar 11 15
Copyright (c) 1982, 2008, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production

The other two don't. 其他两个没有。

:> sqlplus USER/pass@db
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Mar 11 15:04:44 2013
Copyright (c) 1982, 2008, Oracle.  All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied

This one produces identifier error: 这产生标识符错误:

:> sqlplus USER/pass@db//localhost:1521
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Mar 11 15:10:38 2013
Copyright (c) 1982, 2008, Oracle.  All rights reserved.

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

I have verified tnsnames.ora entry and I am spelling service correctly. 我已经验证了tnsnames.ora条目,并且我正确拼写了服务。

EDIT2: 编辑2:

:> lsnrctl status

LSNRCTL for 64-bit Windows: Version 11.1.0.7.0 - Production on 11-MAR-2013 15:14:19

Copyright (c) 1991, 2008, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=a.dom.b.com)(PORT=1521
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.1.0.7.0 - Production
Start Date                01-MAR-2013 16:15:25
Uptime                    9 days 21 hr. 59 min. 8 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   d:\oracle\product\11.1.0\db_1\network\admin\listener.ora
Listener Log File         d:\oracle\diag\tnslsnr\TMDEV100\listener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=a.dom.b.com)(PORT=1521)))
Services Summary...
Service "db" has 1 instance(s).
  Instance "db", status READY, has 1 handler(s) for this service...
...
...
The command completed successfully

If you do not include the @db it will connect either via the TWO_TASk environment variable or do a local connection to the database on the machine you are connected to. 如果不包括@db,它将通过TWO_TASk环境变量进行连接,或者与您所连接的计算机上的数据库进行本地连接。 the @db will lookup the connection information via the tnsnames.ora and then connect. @db将通过tnsnames.ora查找连接信息,然后进行连接。 I am guessing that you are connecting to two different databases. 我猜您正在连接到两个不同的数据库。 One you have the username/password combination and the other you do not. 一个拥有用户名/密码组合,另一个则没有。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ORA-01017无效的用户名/密码作为默认角色oracle开发人员 - ORA-01017 invalid username/password as default role oracle developer ETL Oracle连接错误ORA-01017:无效的用户名/密码; - ETL Oracle Connection error ORA-01017: invalid username/password; Oracle JDBC:用户名/密码无效 (ora-01017) - Oracle JDBC : invalid username/password (ora-01017) 在Python中使用cx_Oracle时收到ORA-01017错误(无效的用户名/密码) - Receiving ORA-01017 error (invalid username/password) when using cx_Oracle in Python ORA-01017: 无效的用户名/密码; 连接时登录被拒绝 - ORA-01017: invalid username/password; logon denied when connection sqlplus 12.1中的ORA-01017错误,可以在其他应用程序中使用相同的凭据连接 - ORA-01017 error in sqlplus 12.1, can connect with same credentials in other applications Oracle DB 12c:sqlplus作为sysdba导致ORA-01017 - Oracle DB 12c: sqlplus as sysdba causes ORA-01017 ORA-01017:无效的用户名/密码-部署时 - ORA-01017: invalid username/password - On deployment 无法连接到Oracle-ORA-01017 - cant connect to oracle - ora-01017 ORA-01017: 无效的用户名/密码; 尝试通过 ODP.NET 连接时登录被拒绝 (Oracle.ManagedDataAccess.Client) - ORA-01017: invalid username/password; logon denied when trying to connect via ODP.NET (Oracle.ManagedDataAccess.Client)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM