oracle 创建架构时“缺少授权条款”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10994414/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 00:53:27  来源:igfitidea点击:

"missing authorization clause" while creating schema

databaseoracleschema

提问by kawade

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

我正在尝试使用企业管理器控制台在 Oracle 中创建一个数据库模式:

CREATE SCHEMA SCM AUTHORIZATION SCM

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

但它给出的错误是:“缺少 AUTHORIZATION 子句”。

Can you please help.

你能帮忙吗。

回答by a_horse_with_no_name

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

CREATE SCHEMA用于在单个语句中创建一整套对象。它并没有创造“模式”的方式与其它数据库管理系统(如PostgreSQL的)使用这一术语。

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

使用 CREATE SCHEMA 语句在单个事务中创建多个表和视图并在您自己的架构中执行多个授权

And the big note at the very beginning:

一开始的重要说明:

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

本声明并不真正创建一个架构。创建用户时,Oracle 数据库会自动创建模式

(Emphasis mine)

(强调我的)

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

模式和用户在 Oracle 中(或多或少)是同一件事。所以很可能你实际上正在寻找:

create user scm identified by scm;