Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have many stored procedures with...

  • EXECUTE permission given to role XXXUser.
  • Login XXXLogin is created and assigned to the role of XXXUser

There is one particular stored procedure that I have issue

  • When I run it, there is no problem
  • When I run it as XXXLogin, it won't return any result, not even hit the first line which is a print.

Questions

  • Why is this happening ?
  • How to fix it?

Thank you so much.

share|improve this question

closed as too localized by Jack Douglas Oct 3 '12 at 9:55

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
What is the error? –  Thomas Stringer Oct 2 '12 at 20:05
    
Which RDBMS???? –  Phil Oct 2 '12 at 20:16
    
SQL 2008 R2, there is no any message if I execute as XXXLogin –  mdivk Oct 2 '12 at 20:23
    
I can't understand why the first line seems not even touched, it's just a print '-----' –  mdivk Oct 2 '12 at 20:28
    
Please post your stored proc code. –  Thomas Stringer Oct 2 '12 at 20:31