0

After that, I log in normally.

I tried it sqlplus as sysdba error is the same

Why this error occurs

I'm a beginner

[oracle@localhost ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on Wed Nov 21 13:08:51 2018

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

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


Enter user-name: system
Enter password: 
Last Successful login time: Wed Nov 21 2018 13:07:42 -05:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Goku
  • 125
  • 1
  • 7
  • 2
    @mustaccio This is valid syntax, we can do `sqlplus / as sysdba` without quotes starting with 10g. Until 9i, the quotes were required. `"/as sysdba"` and `"/ as sysdba"` both works. – Balazs Papp Nov 21 '18 at 21:04
  • But why do I get an error? – Goku Nov 22 '18 at 12:55

1 Answers1

0

Possible reasons:

  • You have SQLNET.AUTHENTICATION_SERVICES=(NONE) set in sqlnet.ora which disables operating system authentication based on group membership ($ORACLE_HOME/network/admin/sqlnet.ora, or $TNS_ADMIN/sqlnet.ora, it $TNS_ADMIN is set).

  • your user (oracle) is not the member of the group configured to be used for operating system authentication. Groups can be found in $ORACLE_HOME/rdbms/lib/config.c.

  • You have the environmental variable TWO_TASK set to something which is automatically added to sqlplus connection attemts as a TNS alias. For example if TWO_TASK is set to ORCL, sqlplus / as sysdba will become sqlplus /@ORCL as sysdba in the background, where operating system authentication does not work.

Balazs Papp
  • 37,755
  • 2
  • 20
  • 43
  • I use pre-built Oracle 12c So I think the settings are good – Goku Nov 22 '18 at 12:53
  • @petar Never trust anything pre-built, especially from Oracle. We encountered this already with their VM, same issue here, with `TWO_TASK` set: https://dba.stackexchange.com/questions/206500/how-to-connect-to-root-with-oracle-developer-vm/206521 – Balazs Papp Nov 22 '18 at 18:10
  • Thank you very much, I solved my problem with `unset TWO_TASK` – Goku Nov 22 '18 at 21:12
  • I read about TWO_TASK, but I'm not quite clear about it, I would like to ask you to send me a useful link for understanding TWO_TASK – Goku Nov 22 '18 at 21:15
  • @petar https://docs.oracle.com/database/121/NETAG/concepts.htm#NETAG363 – Balazs Papp Nov 22 '18 at 21:29
  • Thanks, after `unset TWO_TASK` my user has been deleted – Goku Nov 22 '18 at 21:32
  • I don't mind that, I did not have important data on the user, Is it normal or is there another problem? – Goku Nov 22 '18 at 21:33
  • @petar Your user is not deleted. You logged in to the root container of the CDB, instead of the pluggable database. https://docs.oracle.com/en/database/oracle/oracle-database/12.2/cncpt/introduction-to-the-multitenant-architecture.html#GUID-267F7D12-D33F-4AC9-AA45-E9CD671B6F22 – Balazs Papp Nov 22 '18 at 21:50