Oracle DBA 特权是否包括“CREATE ANY TABLE”角色?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1276500/
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-18 18:47:44  来源:igfitidea点击:

Is Oracle DBA Privilege include "CREATE ANY TABLE" role?

databaseoraclepermissionsdatabase-permissions

提问by King

I Just need to create table from a user to any user under the same DB. letz consider 3 Schemas.

我只需要创建从用户到同一数据库下的任何用户的表。让兹考虑 3 个模式。

Schema_1,Schema_2 and Schema_3.

Schema_1、Schema_2 和 Schema_3。

schema 1 had DBA Privilege.

模式 1 具有 DBA 特权。

Is it possible to table in SChema_2 or Schema_3 from Schema_1????

是否可以在 Schema_1 中的 SCHema_2 或 Schema_3 中进行表????

or we need to give this role "CREATE ANY TABLE" also ??

或者我们还需要给这个角色“创建任何表”??

回答by dpbradley

The DBA role should have this privilege in a typical installation - you can see other roles/users who have this by:

DBA 角色在典型安装中应该具有此权限 - 您可以通过以下方式查看其他具有此权限的角色/用户:

select grantee from dba_sys_privs where privilege = 'CREATE ANY TABLE'

从 dba_sys_privs 中选择被授权者,其中权限 = 'CREATE ANY TABLE'

回答by DCookie

As @dpbradly states, Oracle "out of the box" privileges for the DBA role include the 'CREATE ANY TABLE' privilege. You can check this out with the following query (and see all the system privileges granted to this role as well):

正如@dpbradly 所说,Oracle DBA 角色的“开箱即用”特权包括“CREATE ANY TABLE”特权。您可以使用以下查询进行检查(并查看授予此角色的所有系统权限):

SELECT * FROM role_sys_privs WHERE role = 'DBA' ORDER BY PRIVILEGE;

The Oracle data dictionary is your friend.

Oracle 数据字典是您的朋友。

回答by Faz13able

Ok lets make some things clear

好的,让我们弄清楚一些事情

  1. CREATE ANY TABLEis system privilege not role
  2. you can grant any user DBA privileges by simply writing GRANT DBA TO <USER_NAME> WITH ADMIN OPTION;That being said, schema_1will be able to create table on any user as he have CREATE ANY TABLEprivilege

    create table hr.dbaMade_tab (id number, name varchar2(20) );

    If you schema_1 grants CREATE ANY TABLEthen schema_2 and schema_3 will be able to create table to any table. Do not grant DBA role to anyone. Make new role and give it necessary privileges and grant that role to other users. In your case schema_2 and schema_3. Hope that helps.

  1. CREATE ANY TABLE是系统权限不是角色
  2. 您可以通过简单地编写来授予任何用户 DBA 权限 话GRANT DBA TO <USER_NAME> WITH ADMIN OPTION;虽如此,他schema_1将能够在任何用户上创建表,因为他有CREATE ANY TABLE权限

    create table hr.dbaMade_tab (id number, name varchar2(20) );

    如果您 schema_1 授予,CREATE ANY TABLE那么 schema_2 和 schema_3 将能够为任何表创建表。不要将 DBA 角色授予任何人。创建新角色并赋予其必要的权限并将该角色授予其他用户。在您的情况下,schema_2 和 schema_3。希望有帮助。