1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

GRANTS to user can insert data in table with procedure

Discussion in 'SQL PL/SQL' started by Alexey.Samoilov, Apr 1, 2014.

  1. Alexey.Samoilov

    Alexey.Samoilov Active Member

    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    55
    Where is my mistake?
    Code (Text):

    GRANT FORCE INSERT INTO User1.tab1 FOR USING IN EXECUTE ON stg.log_to_tab TO DWH;
     
     
  2. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    Oracle version ?
    What error code and the text of error ?

    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9013.htm#SQLRF54941
     
  3. Alexey.Samoilov

    Alexey.Samoilov Active Member

    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    55
    Version 11.2.0.3.0
    Error report:
    SQL Error: ORA-00990: 00990. 00000 - "missing or invalid privilege"
     
  4. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    1) force insert - on how many I know, such privilege isn't present

    2) these privileges can't be issued in one operator

    GRANT INSERT on User1.tab1 , EXECUTE ON stg.log_to_tab TO DWH;

    For exapmle :

    Code (SQL):

    SQL>
    CREATE USER test1 IDENTIFIED BY "123";

    SQL> GRANT dba, ALTER system,
        EXECUTE ON sys.dbms_lock
        TO test1
        /
    GRANT dba, ALTER system,
          *
    ERROR at line 1:
    ORA-00990: missing OR invalid privilege

    SQL> GRANT dba, ALTER system
        TO test1
        /

    GRANT succeeded.

    SQL> GRANT EXECUTE ON sys.dbms_lock
        TO test1
        /

    GRANT succeeded.

     
     
  5. NikoTrend1

    NikoTrend1 Active Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    55
    Thank you, man!