Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"missing authorization clause" while creating schema

I am trying to create a database schema in Oracle using Enterprise Manager Console as:

CREATE SCHEMA SCM AUTHORIZATION SCM

but it is giving error as: "missing AUTHORIZATION clause".

Can you please help.

like image 445
kawade Avatar asked Jun 12 '12 10:06

kawade


1 Answers

CREATE SCHEMA is used to create a whole set of objects in a single statement. It does not create "schema" the way other DBMS (e.g. PostgreSQL) use that term.

From the manual:

Use the CREATE SCHEMA statement to create multiple tables and views and perform multiple grants in your own schema in a single transaction

And the big note at the very beginning:

This statement does not actually create a schema. Oracle Database automatically creates a schema when you create a user

(Emphasis mine)

A schema and a user are (more or less) the same thing in Oracle. So most probably you are actually looking for:

create user scm identified by scm;
like image 111
a_horse_with_no_name Avatar answered Sep 29 '22 02:09

a_horse_with_no_name