ORA-01017 invalid username/password logon denied (using SERVICE_NAME)

2.1k views Asked by At

I get "ORA-01017 invalid username/password logon denied" just when I use SERVICE_NAME in sqlplus sentence, without using it works fine.

USING SERVICE_NAME in sqlplus sentence:

# sqlplus sys/password@orcl as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jul 11 13:46:45 2022
Copyright (c) 1982, 2011, Oracle.  All rights reserved.

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

without using SERVICE_NAME in the sentence, it works.

# sqlplus sys/password as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jul 11 13:46:42 2022
Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

tnsping SERVICE_NAME is working properly:

# tnsping orcl

TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 11-JUL-2022 13:48:08

Copyright (c) 1997, 2011, Oracle.  All rights reserved.

Used parameter files:
/srv/db/product/11.2.0.3/dbhome_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCL)))
OK (0 msec)

current tnsnames.ora configuration

ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL)
    )
  )

Any ideas? Thanks in advance

0

There are 0 answers