Log in
::
Register
::
Not logged in
Search:
Home
Articles
Editorials
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Advertise
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Development
»
Issues with security context
Issues with security context
Rate Topic
Display Mode
Topic Options
Author
Message
Rookee DBA
Rookee DBA
Posted Wednesday, November 04, 2009 9:39 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Today @ 11:25 AM
Points: 136,
Visits: 186
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
Post #813684
Lynn Pettis
Lynn Pettis
Posted Wednesday, November 04, 2009 10:30 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 7:48 PM
Points: 10,000,
Visits: 9,828
Am I reading your post correctly? You are using the sa account to access your database from a web server?
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #813723
Rookee DBA
Rookee DBA
Posted Wednesday, November 04, 2009 10:57 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Today @ 11:25 AM
Points: 136,
Visits: 186
we use "some-sa" account for logging on to db server in connection string in asp.net web application.
cheers
Post #813736
Rookee DBA
Rookee DBA
Posted Friday, November 06, 2009 4:15 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Today @ 11:25 AM
Points: 136,
Visits: 186
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
Post #814812
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2009 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use