944,134 Members | Top Members by Rank

Ad:
  • MS SQL Discussion Thread
  • Unsolved
  • Views: 2269
  • MS SQL RSS
Mar 7th, 2007
0

SQL 2000 - getting data from two databases, same server

Expand Post »
I'm having a problem querying data from two different databases on a SQL 2000 server. We have two databases, a main data db, and a separate security db that has login info.

Database logins for the data db DO NOT have access to the security db. I have a function that runs in the data db, but needs to query the security db. This works if the function runs from a user that has permissions in both databases (sa for example). But as a general user, it fails, because that general user login isn't a valid user in the security db. How can I do this?

Is there any way in SQL 2000 to "run as" another user? I just want to execute the subquery that goes to the security database as a user that has permissions to access that info. 2005 apparently has an "execute as" method, but that doesn't help me now. There's *got* to be some way to do this in 2000, right?? Thanks for any help!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
edmicman is offline Offline
33 posts
since Oct 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS SQL Forum Timeline: query to find the 10th maximum salary
Next Thread in MS SQL Forum Timeline: Dts!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC