Oracle alter table权限不足 [英] Oracle alter table insufficient privileges
问题描述
我刚刚安装了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 theCREATE TRIGGER
system privilege.
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 haveALTER 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屋!