Results 1 to 4 of 4

Thread: privilege

  1. #1
    Join Date
    Nov 2007
    Posts
    72

    Unanswered: privilege

    Hi,
    I have an requirement .

    i want to insert into a table with user x via stored procedure.but that user should not be able to insert into that table directly and should not have any privilege on that table.

    how can i achieve this ?
    Please help ASAP

  2. #2
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433
    Just create the procedure and grant execute to that user. DB2 will take care of your requirement
    Rahul Singh
    Certified DB2 9 DBA / Application Developer

  3. #3
    Join Date
    Nov 2007
    Posts
    72
    i did think of creating a stored procedure give privileges within the stored procedure and invoke them in the end ...but lot many ppl will be running this stored procedure so while 2 ppl are running the stored procedure 1 is giving a rite and second is revoking it ..when they both are running it ..

  4. #4
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433
    I think you have misunderstood.... i m talking about execute priv

    When a user executes a package that contains static SQL statements,
    explicit privileges for database objects referenced in the statements are
    not required. The user only needs EXECUTE privilege on the package to
    execute the statements. However, this does not mean that the user has
    direct access to the underlying database objects.
    Rahul Singh
    Certified DB2 9 DBA / Application Developer

Posting Permissions

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