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

发布于 2024-08-02 01:58:00 字数 196 浏览 3 评论 0原文

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

Schema_1、Schema_2 和 Schema_3。

模式 1 具有 DBA 权限。

是否可以从 Schema_1 中表到 Schema_2 或 Schema_3???

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

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

Schema_1,Schema_2 and Schema_3.

schema 1 had DBA Privilege.

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

攒眉千度 2024-08-09 01:58:00

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

select grantee from dba_sys_privs whereprivilege = 'CREATE ANY TABLE'

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

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

野味少女 2024-08-09 01:58:00

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

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

Oracle 数据字典是您的朋友。

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):

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

The Oracle data dictionary is your friend.

念三年u 2024-08-09 01:58:00

好吧,让我们澄清一些事情

  1. CREATE ANY TABLE是系统权限而不是角色
  2. 您可以通过简单地编写GRANT DBA TO来授予任何用户DBA权限 带管理员选项;
    话虽这么说,schema_1 将能够在任何用户上创建表,因为他拥有 CREATE ANY TABLE 权限

    创建表 hr.dbaMade_tab
    (身份证号码,
    名称 varchar2(20)
    );

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

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_1 will be able to create table on any user as he have CREATE ANY TABLE privilege

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

    If you schema_1 grants CREATE ANY TABLE then 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文