February 19, 2010 at 11:49 am
Hi,
We have recently deployed a database through Visual studio team suit.while building the database built script through Visual studio it gaves an warning that one of our stored procedure uses system stored procedure "SP_Send_DBmail" whose dependency can not be determined as the system database MSDb is not in visual studio and the application may fail during runtime.
We ignored the warning as we know that the server we are going to deploy has MSDB database and dbmail stored procedure.
Now when our application executes the stored procedure it gaves an error as mentioned in the subject line. Whereas the account running the stored procedure has sysadmin permission and we are able to manually run the stored procedure from mgmt studio using the same account.
Any insight will be appreciated.
Thanks,
Piyush
February 21, 2010 at 9:34 pm
justpiyushmittal-1127780 (2/19/2010)
...Now when our application executes the stored procedure it gaves an error as mentioned in the subject line. Whereas the account running the stored procedure has sysadmin permission and we are able to manually run the stored procedure from mgmt studio using the same account....
What is the execution context that your application is running your stored procedure?
What I mean is, what are the sequence of things in your app (from a process, connection & login/user standpoint).
FYI, I doubt that this is corruption.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
February 22, 2010 at 6:46 am
Sounds like you should read this article[/url]. While you say the account running the procedure is in sysadmin, the error certainly indicates that it does not.
As Barry has said, this is really not a a corruption issue.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
February 22, 2010 at 8:38 am
Thanks for the replies.
I have got the solution, I have to set trustworthy option on the DB so that stored procedures can execute the system objects programatically.
Thanks Again.
February 22, 2010 at 8:45 am
Did you read the article I linked to? Setting TrustWorthy on has effects as well, so be sure that's what you really want to do.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply