Home Forums SQL Server 2008 Security (SS2K8) Not able to access database - but what object is being sought? RE: Not able to access database - but what object is being sought?

  • You say that the error is on a certain line in a web script where there is a call to a stored procedure which is in "another database".

    But is the error with that call itself? Or does the procedure start executing and then runs into this error? An error message from SQL Server includes both procedure name and line number. If the line number is 0, the error is with invocation of that procedure. But of course, if you are looking at this from the web application, the web application may careless drop the information on the floor.

    One way to investigate this is to do:

    EXECUTE AS LOGIN = 'WebScriptUser'

    go

    EXEC storedproc @par1, @par2, ...

    go

    REVERT

    This should give you a clearer error message you can work from.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]