Re: Resynching DB Users after Restore
From: Geoff N. Hiten (SRDBA_at_Careerbuilder.com)
Date: 11/04/04
- Previous message: Dave: "Re: Resynching DB Users after Restore"
- In reply to: Dave: "Re: Resynching DB Users after Restore"
- Next in thread: Dave: "Re: Resynching DB Users after Restore"
- Reply: Dave: "Re: Resynching DB Users after Restore"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 4 Nov 2004 15:42:22 -0500
Not really. The users are linked via SID, not login name to avoid an
accidental security breach due to a cross-server restore. You have to fix
the SIDs somehow. You can use sp_change_users_login inside a script to do
this semi-automagically, especially if you have a small, known set of logins
and users to remap.
-- Geoff N. Hiten Microsoft SQL Server MVP Senior Database Administrator Careerbuilder.com I support the Professional Association for SQL Server www.sqlpass.org "Dave" <Dave@discussions.microsoft.com> wrote in message news:5157AF83-2A2E-421D-BD49-AB6740AD00D9@microsoft.com... > Is there any option or trick where we can aviod this while restoring database > from another server. I mean, where they restored with database adn we don't > have to add / drop users. > > "Geoff N. Hiten" wrote: > > > Look up sp_change_users_login. It does exactly what you need. > > > > -- > > Geoff N. Hiten > > Microsoft SQL Server MVP > > Senior Database Administrator > > Careerbuilder.com > > > > I support the Professional Association for SQL Server > > www.sqlpass.org > > > > "Tom" <Tom@discussions.microsoft.com> wrote in message > > news:1C5B610B-09AE-47A5-A264-D8C399A4A725@microsoft.com... > > > I know one has to sync up the database users to the server logins when you > > > restore a database from another db server. I generally do this by > > dropping > > > and readding users. I have a problem when the user is aliased - > > sp_dropalias > > > doesn't work. > > > > > > Is there a way to realias a user? The only thing I've seen in research > > > newsgroups is to delete the row in the sysusers table. > > > > > > > > > > > >
- Previous message: Dave: "Re: Resynching DB Users after Restore"
- In reply to: Dave: "Re: Resynching DB Users after Restore"
- Next in thread: Dave: "Re: Resynching DB Users after Restore"
- Reply: Dave: "Re: Resynching DB Users after Restore"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|