Issues with security context

  • In proc, current loggin is impersonated to "somedb-admin" to access objects in other db. So when the procs are called from asp.net, one proc tries to access objects from another data base by impersonation from "sa" to "somedb-admin" and we get this error.

    The server principal "somedb-admin" is not able to access the database "CAA" under the current security context.

    Recently db was restored from live to test and data base ids were also corrected. we have also executed EXEC sp_change_users_login 'Report'; to know orphan users, but nothing was returned.

    cheers

    Siddarth

  • Am I reading your post correctly? You are using the sa account to access your database from a web server?

  • we use "some-sa" account for logging on to db server in connection string in asp.net web application.

    cheers

  • the issue is sorted. On one data base trusworty was set to on and on another data base it was set automatically to off when data base was restored from live. so when user was impersonated, the error came. this is very strange.

    We altered the data base and set trustworty on.

    cheers

    Siddarth

  • Hey guys,

    I had the same problem, in the same situation but with a non-sa-like account and setting the database as trustworthy worked just perfect.

    Thanks a lot !

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply