I have just installed oracle 12c and then i am trying to grant user various rights.
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.
Do i have to create one ?
Is there any alternative solution ?
Trying to figer out what is the problem I guess you execute something like
In accordance to Oracle documentation:
http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9013.htm#BABEFFEE
you can grant ALTER ANY TABLE (which is a powerful right) or grant ALTER privilege on particular table in another schema:
Schema owner always has ALTER privilege over the objects it's owned:
http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_3001.htm#CJAHHIBI
"Prerequisites
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."
There is no
ALTER TABLE
privilege. The valid privileges are listed in the documentation.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 theALTER ANY TABLE
privilege.Curiously this page does refer to
ALTER TABLE
:The
ALTER TABLE
command prerequisites also say:In this context it's a bit clearer; '
ALTER
object privilege' means that you've been directly grantedALTER
on the table by its owner, rather than via theALTER ANY TABLE
system privilege, as in:Then
user2
would be able toalter table t42 ...
, or create a trigger on it (for example), but not any other tables.