Re: Connecting a user from a backup database to a new login
- From: "Dan Guzman" <guzmanda@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 13 Jan 2007 14:33:00 -0600
What can I do to work around this? How do I connect a login to an
existing database user? Is there a system table where I can just map
the two?
See the sp_change_users_login stored procedure in the Books Online. Also, the Best Practice is to always schema-qualify objects.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"brad" <brad.eckrose@xxxxxxxxx> wrote in message news:1168719405.103237.233140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
All,
In SQL Server 2000, I loaded a backup file into a new local database.
The database has an existing user which owns several stored procedures,
tables, etc.
Using SQL Server authentication, I want to create a login of the same
name as the user, so that when I login, I have access to the objects
owned by that user without having to prefix the objects with the owner
name.
For instance exec sp_mystoredproc instead of exec
ownername.sp_mystoredproc. (In fact, several of the stored procedures
exec other procedures without the owner name prefix and to go add the
owner will be a tedious process)
When I try to add login and grant the login name to the existing user
it tells me it already exists.
I cannot drop the existing user because it owns a whole bunch of
objects.
What can I do to work around this? How do I connect a login to an
existing database user? Is there a system table where I can just map
the two?
Brad
.
- References:
- Prev by Date: Connecting a user from a backup database to a new login
- Next by Date: Web Data Admin for MSDE
- Previous by thread: Connecting a user from a backup database to a new login
- Next by thread: Web Data Admin for MSDE
- Index(es):
Relevant Pages
|