statement terminator and grants...
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: statement terminator and grants...

  1. #1
    Join Date
    Mar 2002
    Posts
    12

    Unhappy

    Hello All,

    could some kind soul tell me the difference between terminating statements with / and ; in a SQL script?
    Is there a difference?

    While I'm at it, would anyone know why a user with DBA proviliges (e.g. system) can't grant object priviliges on objects in another schema? e.g.

    SQL> connect system/manager
    Connected.

    SQL> grant select on noel.test to bob;
    grant select on noel.test to bob
    *
    ERROR at line 1:
    ORA-01031: insufficient privileges


    SQL> connect noel/noel
    Connected.
    SQL> grant select on noel.test to bob;

    Grant succeeded.

    SQL>

    I thought someone with DBA privs could grant privs on any object?

    Thanks,
    Noel.


  2. #2
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    1)
    / can terminate any sql, pl/sql script, including single sql statments.
    ; can terminate only single sql statments.

    2)
    To grant an object privilege, you must fulfill one of the following conditions:
    * You own the object specified.
    * You have been granted the object privileges being granted with the GRANT
    OPTION.
    (but some object privileges can't grant to role with grant options, only directly to user)
    DBA role has system privilege GRANT ANY PRIVILEGE WITH GRANT OPTIONS,
    but this privilege doesn't work with user's object privileges.




    [Edited by Shestakov on 04-24-2002 at 01:41 PM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width