0

I am trying to create a new Schema in Oracle 11g.

I have referred to the Oracle documentation

I have tried to execute the commands mentioned there.

CREATE SCHEMA AUTHORIZATION oe

   CREATE TABLE new_product 

      (color VARCHAR2(10)  PRIMARY KEY, quantity NUMBER) 

   CREATE VIEW new_product_view 

      AS SELECT color, quantity FROM new_product WHERE color = 'RED' 

   GRANT select ON new_product_view TO hr; 

I am getting the following error when I run this commands in Eclipse.

ORA-02421: missing or invalid schema authorization identifier (0 rows affected)

Elapsed Time: 0 hr, 0 min, 0 sec, 0 ms.

Anybody has an idea why this is happening ?

Thank you.

2 Answers 2

4

At at a guess, I'd say you're not logged in as user oe (which the docs you reference say you must be).

Also see the description of the error you're getting.

Sign up to request clarification or add additional context in comments.

Comments

4

Go to Command Prompt. Login as System and Password as orcl

SQL> create user [username] identified by [password];

User created.

SQL> grant create session to [username];

Grant succeeded.

SQL> grant create table to [username];

Grant succeeded.

SQL> create role developer;

Role created.

SQL> grant developer to [username];

Grant succeeded.

SQL> grant resource to [username];

1 Comment

I think this is the better answer regarding creating schema, in Oracle schema = user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.