Home » Infrastructure » Windows » Installing example Schemas...Help (Oracle 12c)
Installing example Schemas...Help [message #652230] Sat, 04 June 2016 22:49 Go to next message
icm63
Messages: 22
Registered: December 2007
Junior Member
I have windows7(64)

I have installed the Oracle Developer Database for 12c (latest version) on my localhost PC

Trying to install the example schemas running this code in SQL*Plus
2.3 Invoke the Sample Schema creation script. Using the values listed
in Sections 2.1 and 2.2, the command would look like this:

SQL> @?/demo/schema/mksample <SYSTEM_password> <SYS_password>
<HR_password> <OE_password> <PM_password> <IX_password>
<SH_password> <BI_password> EXAMPLE TEMP
$ORACLE_HOME/demo/schema/log/

The mksample script lists all the objects created in the data dictionary.



I get this error for the HUMAN_RESOURCES (same for all) example schema.

QUESTION: What do i do to make this work??


DROP USER hr CASCADE
          *
ERROR at line 1:
ORA-01918: user 'HR' does not exist


CREATE USER hr IDENTIFIED BY HR
            *
ERROR at line 1:
ORA-65096: invalid common user or role name


ALTER USER hr DEFAULT TABLESPACE EXAMPLE_TEMP
           *
ERROR at line 1:
ORA-01918: user 'HR' does not exist


ALTER USER hr TEMPORARY TABLESPACE $ORACLE_HOME/demo/schema/log/
                                   *
ERROR at line 1:
ORA-00911: invalid character


GRANT CREATE SESSION, CREATE VIEW, ALTER SESSION, CREATE SEQUENCE TO hr
                                                                     *
ERROR at line 1:
ORA-01917: user or role 'HR' does not exist


GRANT CREATE SYNONYM, CREATE DATABASE LINK, RESOURCE , UNLIMITED TABLESPACE TO hr
                                                                               *
ERROR at line 1:
ORA-01917: user or role 'HR' does not exist


Connected.
GRANT execute ON sys.dbms_stats TO hr
                                   *
ERROR at line 1:
ORA-01917: user or role 'HR' does not exist


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


Warning: You are no longer connected to ORACLE.
SP2-0640: Not connected
SP2-0640: Not connected
******  Creating REGIONS table ....
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
******  Creating COUNTRIES table ....
SP2-0640: Not connected
SP2-0640: Not connected
******  Creating LOCATIONS table ....
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
******  Creating DEPARTMENTS table ....
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
******  Creating JOBS table ....
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
******  Creating EMPLOYEES table ....
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
******  Creating JOB_HISTORY table ....
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
******  Creating EMP_DETAILS_VIEW view ...
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
******  Populating REGIONS table ....
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
******  Populating COUNTIRES table ....
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
******  Populating LOCATIONS table ....
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
******  Populating DEPARTMENTS table ....
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
******  Populating JOBS table ....
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
******  Populating EMPLOYEES table ....
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
******  Populating JOB_HISTORY table ....
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0641: "EXECUTE" requires connection to server




[Updated on: Sat, 04 June 2016 22:50]

Report message to a moderator

Re: Installing example Schemas...Help [message #652239 is a reply to message #652230] Sun, 05 June 2016 02:35 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8779
Registered: November 2002
Location: California, USA
Senior Member
I am not sure what all you did, but I have Oracle 12.1 running on Windows 10 and I just downloaded and installed the Examples. Perhaps you can start over and try what I did.

I downloaded the examples from this page:

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-win64-download-2297732.html

by scrolling down to:

Oracle Database Examples (12.1.0.2.0) for Microsoft Windows (x64)

and clicking on the little red down arrow.

I saved the file, then went to my Windows directory and unzipped it to a sub-directory winx64_12102_examples. I clicked on that directory, then the examples sub-directory, then clicked on setup. That started the Oracle universal installer, and I followed the prompts from there to complete the installation.

When following the prompts, it seemed to offer new names for things as a default. Instead, I clicked the down arrow and selected things that already existed, such as an Oracle Home.

I hope this works for you.






Re: Installing example Schemas...Help [message #652240 is a reply to message #652239] Sun, 05 June 2016 02:46 Go to previous messageGo to next message
icm63
Messages: 22
Registered: December 2007
Junior Member
.."I saved the file, then went to my Windows directory and unzipped it to a sub-directory winx64_12102_examples. I clicked on that directory, then the examples sub-directory, then clicked on setup. That started the Oracle universal installer, and I followed the prompts from there to complete the installation."...

YES thats is what I did, but where are they after the intall??

I logged onto my DEV database (SID orcl), and I couldnt find the tables or anything?

Where and how do you access the HR sample for example? Maybe I have installed it but not knowing it??

Re: Installing example Schemas...Help [message #652241 is a reply to message #652230] Sun, 05 June 2016 02:59 Go to previous messageGo to next message
John Watson
Messages: 7184
Registered: January 2010
Location: Global Village
Senior Member
You created a multitenant database, and you are trying to run the scripts in the root container. You can't do that, note your ORA-65096 errors. As you are not familiar with multitenant, you had better drop the database and start again. Next time create a non-CDB.
Re: Installing example Schemas...Help [message #652242 is a reply to message #652240] Sun, 05 June 2016 03:00 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8779
Registered: November 2002
Location: California, USA
Senior Member
From SQL*Plus, I logged in as a user with DBA privileges, unlocked the hr account, set a new password, connected as hr, then was able to view the tables and select from them, as shown below.

SCOTT@orcl_12.1.0.2.0> alter user hr account unlock;

User altered.

SCOTT@orcl_12.1.0.2.0> alter user hr identified by hr;

User altered.

SCOTT@orcl_12.1.0.2.0> connect hr/hr
Connected.
HR@orcl_12.1.0.2.0> select table_name from user_tables;

TABLE_NAME
--------------------------------------------------------------------------------
JOB_HISTORY
REGIONS
LOCATIONS
DEPARTMENTS
JOBS
EMPLOYEES
COUNTRIES

7 rows selected.

HR@orcl_12.1.0.2.0> select count(*) from employees;

  COUNT(*)
----------
       107

1 row selected.

HR@orcl_12.1.0.2.0>

Re: Installing example Schemas...Help [message #652262 is a reply to message #652242] Sun, 05 June 2016 14:42 Go to previous messageGo to next message
icm63
Messages: 22
Registered: December 2007
Junior Member
...

SCOTT@orcl_12.1.0.2.0> alter user hr account unlock;

..

SQL>alter user hr account unlock;

I get HR user does not exists!
Re: Installing example Schemas...Help [message #652263 is a reply to message #652241] Sun, 05 June 2016 14:44 Go to previous messageGo to next message
icm63
Messages: 22
Registered: December 2007
Junior Member
John..

In 12.01.2.0

https://blogs.oracle.com/UPGRADE/entry/non_cdb_architecture_of_oracle

Non-CDB architecture of Oracle databases is DEPRECATED since Oracle Database 12.1.0.2
Re: Installing example Schemas...Help [message #652264 is a reply to message #652263] Sun, 05 June 2016 14:56 Go to previous messageGo to next message
John Watson
Messages: 7184
Registered: January 2010
Location: Global Village
Senior Member
Thank you for directing me towards that blog article. Had I not read the upgrade guide when 12.1.0.2 was released in (if I remember correctly) summer 2014, it would have been news to me.
The fact remains: you clearly do not understand multitenant architecture. You should therefore either take an introductory course in 12c DB admin, or create a non-CDB, as Barbara has done. Your choice. Perhaps you are not aware of the difference between "deprecated" and "desupported".
Re: Installing example Schemas...Help [message #652265 is a reply to message #652263] Sun, 05 June 2016 14:58 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8779
Registered: November 2002
Location: California, USA
Senior Member
Did you check the responses here and follow the links provided?

https://community.oracle.com/thread/3937088
Re: Installing example Schemas...Help [message #652266 is a reply to message #652264] Sun, 05 June 2016 14:58 Go to previous messageGo to next message
icm63
Messages: 22
Registered: December 2007
Junior Member
This is true I am a newbie, I am moving from MS SQL

I have found a solution: https://www.youtube.com/watch?v=iVo6Xnzeteg

Thanks

Re: Installing example Schemas...Help [message #652267 is a reply to message #652266] Sun, 05 June 2016 15:09 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8779
Registered: November 2002
Location: California, USA
Senior Member
Thanks for providing the link. That's a great demonstration, but he sure talks fast. I think I need a speed control as well as a volume control.
Re: Installing example Schemas...Help [message #652268 is a reply to message #652267] Sun, 05 June 2016 15:12 Go to previous message
icm63
Messages: 22
Registered: December 2007
Junior Member
You are soooo right...

Good stuff on that channel

I am uninstalling everything and restarting from scratch following his videos on 12c

Previous Topic: Multiple-step OLE DB operation generated errors.
Next Topic: Installing Oracle 12c
Goto Forum:
  


Current Time: Thu Dec 14 23:04:18 CST 2017

Total time taken to generate the page: 0.06918 seconds