Results 1 to 6 of 6

Thread: privilege

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Answers
    12

    privilege

    you have created a procedure DELETETABLE which uses dynamic sql to our remove a table in your schema. you have granted the EXECUTE privilege to a user X on this procedure
    when user X executes the procedure under whose privilege are the operation performed bydefault
    1.yours
    2.user X


  2. #2
    Expert Member
    Join Date
    Dec 2006
    Answers
    204

    Re: privilege

    under user X's privilage.
    It user X does not has access to a table that is to be deleted in the procedure, it will throws an error.


  3. #3
    Junior Member
    Join Date
    Feb 2007
    Answers
    17

    Re: privilege

    i st option is right
    if u want that procedure should execute under user priv instead of ur privs u should include a keyword 'authid current_user' in create pocedure.


  4. #4
    Expert Member
    Join Date
    Sep 2006
    Answers
    130

    Re: privilege

    Hi Gujjar,

    Yeah, Smitai is right.

    When you create a procedure, it will be executed under the privileges of the creator, unless the procedure has the "AUTHID CURRENT_USER" statement.
    If it is not mentioned explicitly, by default, the procedure executes under the owner's privileges.

    *** Innila ***


  5. #5
    Expert Member
    Join Date
    Sep 2006
    Answers
    477

    Re: privilege

    Huh huh! That was news for me. I guess the same rules apply in SYBASE too. Recently when I created an SP with a DBA privileged login, an user without the DBA privilege could not run the report. I had to face some angry grunts from an old friend for that.

    Ofcourse I resolved the issue rather simply. Just used "grant" command to give execute privilege to everyone as I was unable to find the root cause of the problem then.

    This post of Innila does deserve a thanks

    Cheers!
    Kalayama

    [COLOR="Blue"][SIZE="2"]"If you are not living on the edge of your life, you are wasting space"[/SIZE][/COLOR]

    Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"

  6. #6
    Junior Member
    Join Date
    Feb 2007
    Answers
    12

    Re: privilege

    hi
    thanks to innila and smitai. this helped me for the correct answer


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact