4 Replies Latest reply on Apr 16, 2015 2:33 PM by rp0428

    ORA-01017: invalid username/password; logon denied in 12c database

    Kumar Vellaisamy

      Hi,


      I have created the new user in 12c pdb and granted previliges also,

       

      but i coudnt able to connect that user.

       

      Kindly suggest me.

       

      Steps which i have done.

       

      SQL> alter session set container=TESTPDB1;

       

      Session altered.

       

      SQL> create user test1 identified by welcome;

       

      User created.

       

      SQL> grant connect,resource to test1;

       

      Grant succeeded.

       

      SQL> commit

        2  ;

      Commit complete.


      SQL> conn test1/welcome;

      ERROR:

      ORA-01017: invalid username/password; logon denied

      Warning: You are no longer connected to ORACLE.


      Regards

      Kumar V


        • 1. Re: ORA-01017: invalid username/password; logon denied in 12c database
          12cdb

          Hi,

           

          To connect to the PDB you need to make sure you use the service name.

           

          Check the Listener status (e.g. lsnrctl status) and find out the service name registered for PDB.

           

          Now create a tnsnames.ora entry or use easy connect method;

           

          example ;  connect test1/welcome@ServerName:PORT_NUMBER/PDB_SERVICE_NAME

           

          For more help you can check this note - point 2

           

          http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/12c/r1/pdb/pdb_basics/pdb_basics.html

           

          HTH,

           

          Pradeep

          • 2. Re: ORA-01017: invalid username/password; logon denied in 12c database

            I have created the new user in 12c pdb and granted previliges also,

            Yes you create a LOCAL user in the PDB

            but i coudnt able to connect that user.

            SQL> conn test1/welcome;

            ERROR:

            ORA-01017: invalid username/password; logon denied

            Warning: You are no longer connected to ORACLE.

            Correct - there is NO SUCH USER 'TEST1' in the root/CDB.

             

            The user you created is in the PDB and is a LOCAL user. You tried to connect as that user to the CDB. You did NOT specify a SERVICE_NAME so you are connecting to the ONLY database that the OS environment variables know about which is the root.

             

            Many things, even basic things like creating users, are done differently in 12c. In 12c there are common users and local users.

             

            Even for EXPERT Oracle DBAs and developers it is MANDATORY to read and understand chapters 17 and 18 of the Concepts doc about the new multitenant architecture of 12c.

            http://docs.oracle.com/cd/E16655_01/server.121/e17633/part_consol.htm#CHDGDBHJ

             

            You, and others, will continue to face similar problems working with multitenant if you don't first read those chapters. Users, grants, privileges are ALL done differently in 12c multitenant.

             

            That PDB won't even be open when you restart the database unless you either open it manually or create an AFTER STARTUP trigger to open it for you.

             

            See my replies in this thread and others about this same issue.

            Re: 12c: ORA-65049: creation of local user or role is not allowed in CDB$ROOT

            • 3. Re: ORA-01017: invalid username/password; logon denied in 12c database
              Kumar Vellaisamy

              Dear All,

               

              The issue has been fixed now.

               

              in 12c database we couldnt able to connect the local user in pluggable database.

               

              We have to connect the users like below,

               

              [oracle@dg admin]$ sqlplus sys/welcome@PDBDEV as sysdba

               

              SQL*Plus: Release 12.1.0.2.0 Production on Thu Apr 16 12:56:38 2015

               

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

              Connected to:

              Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

              With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

               

              SQL> show con_name;

               

              CON_NAME

              ------------------------------

              PDBDEV

              SQL> create user kumar identified by kumar;

              User created.

               

              SQL> grant connect,resource to kumar;

              Grant succeeded.

               

              SQL> commit;

              Commit complete.

               

              SQL> conn kumar/kumar;

              ERROR:

              ORA-01017: invalid username/password; logon denied

               

              Warning: You are no longer connected to ORACLE.

              SQL> conn sys as sysdba

              Enter password:

              Connected.

              SQL> show con_name;


              CON_NAME

              ------------------------------

              CDB$ROOT

              SQL> conn kumar/kumar@PDBDEV

              Connected.

               

              SQL> show con_name;

               

              CON_NAME

              ------------------------------

              PDBDEV

              SQL> show user;

              USER is "KUMAR"

               

              Thanks for the suggestions.

               

              Regards

              Kumar

              • 4. Re: ORA-01017: invalid username/password; logon denied in 12c database

                Which is EXACTLY what I told you in my reply.

                 

                Glad I was able to help.