簡體   English   中英

指定架構時,Oracle SQLPlus ORA-01017無效的憑證

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

在Oracle11g數據庫上,這可以工作:

SQL> connect USER/pass
Connected.

但是,這不是:

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

我已經執行:

SQL> grant connect to USER;
Grant succeeded.

我想念什么?

tnsnames.ora:

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

編輯:

:> 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

其他兩個沒有。

:> 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

這產生標識符錯誤:

:> 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

我已經驗證了tnsnames.ora條目,並且我正確拼寫了服務。

編輯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

如果不包括@db,它將通過TWO_TASk環境變量進行連接,或者與您所連接的計算機上的數據庫進行本地連接。 @db將通過tnsnames.ora查找連接信息,然后進行連接。 我猜您正在連接到兩個不同的數據庫。 一個擁有用戶名/密碼組合,另一個則沒有。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM