5 Replies Latest reply on Dec 25, 2015 2:10 PM by Aman....

    Default users in 12c

    Rahul_India

      Which user in 12C has "traditinal" oracle table like Emp and dept?

       

      Couldn't find scott or hr in 12c

        • 1. Re: Default users in 12c
          Frank Kulash

          Hi,

           

          See

          Re: How to add SCOTT schema to my database?

          for a  script to create and populate the tables in the scott schema.

           

          Oracle is no longer using those tables, in favor of bigger tables.  I think that's a shame.  The scott tables can't illustrate all the problems that bigger tables can, but they're better for most problems, because they are small enough for you to see the raw data and figure out how things work.  I can look at 14 rows, and try to see why each was included or excluded from a result set.  I'm not going to do that for 100 or more rows.

          • 2. Re: Default users in 12c
            Solomon Yakobson

            SCOTT is in ORACLE_HOME\RDBMS\ADMIN\SCOTT.SQL and HR you install from demo file you download from oracle.

             

            SY.

            • 3. Re: Default users in 12c

              Oracle is no longer using those tables, in favor of bigger tables.

              Yes they are - when you install a sample database the SCOTT schema is installed and includes those tables.

              • 4. Re: Default users in 12c
                Which user in 12C has "traditinal" oracle table like Emp and dept?

                 

                Couldn't find scott or hr in 12c

                If you installed the sample database then the SCOTT user is in a PDB whose default name is PDBORCL.

                 

                You won't find ANY of the local users (scott, hr, etc) in the root/CDB.

                 

                So you are likely connecting to the root/CDB, looking for the SCOTT user and not finding it.

                 

                The PDBs, including the sample PDBORCL, do NOT open automatically when you restart the database.

                 

                You have three options:

                 

                1. Open the PDB(s) manually after you startup the database: ALTER PLUGGABLE DATABASE ALL OPEN

                 

                2. Create an AFTER STARTUP trigger to open the PDBs using that same ALTER statement

                 

                3. In 12.1 save the 'open' state of the PDB so it will reopen automatically: ALTER PLUGGABLE DATABASE pdborcl SAVE STATE

                 

                See this Oracle-Base article that explains ALL of those options.

                https://oracle-base.com/articles/12c/multitenant-startup-and-shutdown-cdb-and-pdb-12cr1

                • 5. Re: Default users in 12c
                  Aman....

                  Rahul_India wrote:

                   

                  Which user in 12C has "traditinal" oracle table like Emp and dept?

                   

                  Couldn't find scott or hr in 12c

                  The user SCOTT would be available if you have chosen to create sample schemas. So did you do that? If you haven't and it looks like that you haven't , it would be better that you drop this database and recreate one with the Sample Schema option chosen . If that's not what you want to do, follow the link  below,

                  http://docs.oracle.com/database/121/COMSC/installation.htm#COMSC001

                   

                  HTH

                  Aman....