What might cause SQL error Cannot find the object "dbo.InspectionEvents" because it does not exist or you do not have permissions
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 mo开发者_如何学JAVAst of the time but occassionally fire the error?
Application is C# using Enterprise Library 4.1 Data Access. Database is SQL Server 2005
Cheers
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?
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.
精彩评论