9 Replies Latest reply on May 5, 2016 4:00 PM by rp0428

    HR Schema

    3206620

      Does anyone know how I can find on log into the HR schema? SQL plus asked me for a user name and password. I have been using HR as the user name, but do not know the password. I am following the instructions in chapter 1 Oracle 12c admin associate. 

      and we said...

      Normally its either 'hr' or 'oracle'

       

      If they dont work, you'll need to logon as SYS or SYSTEM or any DBA account you have and run:

       

      alter user hr identified by my_new_password;

       

      Hope this helps.

       

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

      I have tried this and I still can not connect to the SQLPlus. to unlock the HR Schema. I have having problems with the log on user name and password. can anyone help?

        • 1. Re: HR Schema
          2683628

          you may need your dba to unlock the aocount

          alter user hr account unlock;

           

          you may also need to grant connection and session privileges

          • 2. Re: HR Schema

            Please make up your mind WHAT PROBLEM you need help with.

             

            First you say you don't know the password. Then you say the account is locked.

             

            Which is it?

             

            In either case you need to follow the advice the other responder gave you. Connect as a DBA and either unlock the account or set a new password depending on what problem you now have.

            • 3. Re: HR Schema
              3206620

              it seems you do not understand Oracle. The problem is I need the user name and password to get to the HR Schema, Since the HR Scheme is locked, I would need to unlock in order to use the HR Scheme. SO far, none of the advise given is allowing me to use SQL plus, which requires a username and password to get into. I never used it before. Just download this recently.

              • 4. Re: HR Schema
                thatJeffSmith-Oracle

                who owns the database?

                 

                someone else? ask them to unlock the account.

                 

                You? you need to login as SYSTEM or SYS or another highly privileged account and unlock HR. If it's your database, you should know the passwords for those accounts - they are set at the time your database is created. If you don't know, you might be able to login this way

                 

                /users/oracle> sqlplus / as sysdba

                 

                Be careful, you're now in God-mode.

                • 5. Re: HR Schema
                  3206620

                  hi hx

                  SQLPLus only gives one option... USERNAME 

                  then once I enter A username. the PASSWORD

                   

                  since I do not know them. I can not get in. I tried dozens of different user names plus password that were created when I download the software and nothing works.

                  • 6. Re: HR Schema
                    3206620

                    When I installed Oracle software, I choose the Create Database With Default Configuration option, but this will not include the sample schemas . The account SYS is the Oracle dictionary owner, and SYSTEM is a database administrator (DBA) account . Initially, the sample schema user accounts are locked . to unlock, I need to log in to the database using SQL*Plus as the SYSTEM user and then unlock the account using the ALTER USER statement .To unlock the HR schema, use ALTER USER hr IDENTIFIED BY hrpassword ACCOUNT UNLOCK; .Now you can log in to the database using the hr user with the password hrpassword .

                     

                    However, SQLPLUS ask for the user name and password....I do not know this user name or password to get to the point where I can then unlock the HR Schema


                    SQL*Plus: Release 12.1.0.2.0 Production on Wed May 4 23:29:37 2016

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

                    Enter user-name: hr
                    Enter password:
                    ERROR:
                    ORA-01017: invalid username/password; logon denied


                    Enter user-name: SYSTEM
                    Enter password:
                    ERROR:
                    ORA-01017: invalid username/password; logon denied


                    Enter user-name:

                     

                     

                    Please Advise, if you can

                    • 7. Re: HR Schema
                      thatJeffSmith-Oracle

                      when you created the database, you had to supply password for SYS - use that password

                      • 8. Re: HR Schema
                        Gary Graham-Oracle

                        And if you use SYS, remember to supply AS SYSDBA as Jeff noted in an earlier post.  For a standard Oracle XE (11.2 R2) install, this is what I get even if no other environment variables (like PATH or ORACLE_HOME) are set for convenience...

                        Microsoft Windows [Version 6.1.7601]

                        Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

                         

                        C:\Users\gggraham>cd C:\oraclexe\app\oracle\product\11.2.0\server\bin

                         

                        C:\oraclexe\app\oracle\product\11.2.0\server\bin>sqlplus sys/thesyspassword as sysdba

                         

                        SQL*Plus: Release 11.2.0.2.0 Production on Thu May 5 08:15:14 2016

                         

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

                         

                         

                        Connected to:

                        Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

                         

                        SQL>

                        Hope this helps.

                         

                        Edit: Note that I use Oracle XE 11.2 R2 as an example for simplicity.  Using 12c potentially complicates matters by introducing the concept of multi-tenant architecture with a container database (CDB) managing one or more pluggable databases.  So if you are using 12c in a non-CDB deployment, I believe the comments regarding XE apply to your case, otherwise this a bit beyond the scope of this forum -- refer to the 12c documentation.

                        • 9. Re: HR Schema

                          Please Advise, if you can

                          You have been advised several times already.

                           

                          If an account is locked you need to connect as SYSDBA and unlock it before a 'normal user' (e.g. HR) can connect.

                           

                          And if you are using 12c multitenant the sample schemas are in a PDB named, by default, 'pdborcl'. So you must be connected to that 'container' in order to access the sample schemas or to use SYSDBA to change the password.

                           

                          In either case your problem is NOT related to Sql Developer so please mark the thread ANSWERED and repost it in the General DB forum

                          General Database Discussions

                           

                          Before you repost search the forum and read the MANY THREADS that have already answered your same question.