Oracle alter table权限不足 [英] Oracle alter table insufficient privileges

查看:1385
本文介绍了Oracle alter table权限不足的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了oracle 12c,然后尝试授予用户各种权限.

I have just installed oracle 12c and then i am trying to grant user various rights.

我已以系统身份登录,并且已经授予了create user的使用权.但是,虽然授予alter table的权限,却给了我错误

I am logged in as system and i had given rights for create user which worked. However, while granting rights for alter table it gave me error

ORA-00990: missing or invalid privilege

对这个问题的研究使我陷入了另一个

Researching on this problem brought me to another post on SO. The Comments on this post indicated that it is because i am not logged in as GLOBAL user.However i don't know how to log in as GLOBAL user.

我必须创建一个吗?

有其他替代解决方案吗?

Is there any alternative solution ?

推荐答案

没有ALTER TABLE特权.有效特权为在文档中列出.

There is no ALTER TABLE privilege. The valid privileges are listed in the documentation.

如果有CREATE TABLE,则可以创建和更改自己的表.要更改其他模式下的表定义,您需要ALTER ANY TABLE权限.

If you have CREATE TABLE then you can create and alter your own table. To alter the definition of a table in another schema you'd need the ALTER ANY TABLE privilege.

此页面确实是指ALTER TABLE:

例如,要在表上创建触发器,用户需要表的ALTER TABLE对象特权和CREATE TRIGGER系统特权.

For example, to create a trigger on a table, the user requires both the ALTER TABLE object privilege for the table and the CREATE TRIGGER system privilege.

ALTER TABLE命令先决条件也说:

The ALTER TABLE command prerequisites also say:

该表必须位于您自己的模式中,或者您必须对该表具有ALTER对象特权,或者您必须具有ALTER ANY TABLE系统特权.

The table must be in your own schema, or you must have ALTER object privilege on the table, or you must have ALTER ANY TABLE system privilege.

在这种情况下,它会更清晰一些; "ALTER对象特权"意味着它是所有者直接在表上授予了ALTER的权限,而不是通过ALTER ANY TABLE系统特权,如:

In this context it's a bit clearer; 'ALTER object privilege' means that you've been directly granted ALTER on the table by its owner, rather than via the ALTER ANY TABLE system privilege, as in:

create table t42(id number);
grant alter on t42 to user2;

然后user2可以alter table t42 ...或在其上创建触发器(例如),但不能在任何其他表上使用.

Then user2 would be able to alter table t42 ..., or create a trigger on it (for example), but not any other tables.

这篇关于Oracle alter table权限不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆