Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Why can't SYS account grant privileges for other user's objects?

Why can't SYS account grant privileges for other user's objects?

From: Thomas T <T_at_T>
Date: Tue, 15 Apr 2003 13:06:36 -0400
Message-ID: <3e9c3c1c$1@rutgers.edu>


Just wondering why, when I connect using SYS as SYSDBA, can't I grant privileges to other user's objects?

For instance, here's a snapshot of my SQL*PLUS session:



SQL> conn sys/syspassword @ myserver as sysdba Connected.
SQL> grant insert on JHS.application to scott; grant insert on JHS.application to scott
                     *

ERROR at line 1:
ORA-01031: insufficient privileges

SQL> disc
Disconnected from Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production With the Partitioning option
JServer Release 8.1.7.0.0 - Production
SQL> conn jhs/jhspassword @ myserver
Connected.
SQL> grant insert on JHS.application to scott;

Grant succeeded.

SQL>


What's funny is that I was able to create these objects using the sys account. As an example:



SQL> conn sys/syspassword @ myserver as sysdba Connected.
SQL> create view JHS.myview as
  2 select request, levelcode from JHS.application;

View created.

SQL> desc JHS.myview;

 Name                                      Null?    Type
 ----------------------------------------- -------- ------------------------

----
REQUEST NOT NULL VARCHAR2(15) LEVELCODE NOT NULL NUMBER

SQL> grant select on JHS.myview to scott; grant select on JHS.myview to scott

                     *

ERROR at line 1:
ORA-01031: insufficient privileges

SQL> disc


I thought "sys as sysdba" was the all-powerful user? What kind of sysdba can make a user's objects, and then can't grant access to them? :) What's funny is that I was able to create these objects using the sys account. Platform is Win2k server running Oracle 8i; these commands were run from a Win2k Pro workstation. Thanks!

-Thomas
Received on Tue Apr 15 2003 - 12:06:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US