views:

157

answers:

2

Hi

My ASP.Net app is periodically getting the error 'Cannot find the object dbo."XXXX" because it does not exist or you do not have permissions' when it tries to execute a specific stored procedure that writes to the database.

I have seen a few forum posts about this issue but the strange thing is that the method works fine almost all of the time, just every now and then I see it in my error logs.

Can anyone tell me why this might works Ok most of the time but occassionally fire the error?

Application is C# using Enterprise Library 4.1 Data Access. Database is SQL Server 2005

Cheers

A: 

This error occurres when there is no such object in the database or user has no rights to access it. Do you drop/create your database objects or logins dynamically during your App run?

Andrew Bezzub
No. Neither of those situations occurs.
Mark
A: 

Could you try executing that SP from SQL server management studio when you see the error from the ASP.NET application. Most likely that object didnot exist at that time. Could be a permission issue as well where the application is using Windows application and the user did not have permission to access that object which the stored procedure is using.

ydobonmai
Unfortunately not. It is hosted at third party premises so errors are only picked up in logs. ANy time I go into management studio and attempt same activity it succeeds.
Mark