Re: Restore master?

From: Andrew J. Kelly (sqlmvpnooospam_at_shadhawk.com)
Date: 01/21/05


Date: Fri, 21 Jan 2005 17:35:12 -0500

To be honest I have never used that sp. It looks like that just takes care
of the Logins which are at the server level. You still need to run
sp_change_users_login for each db to map the Logins to the Users. For that
you absolutely need to have the db's in place first.

-- 
Andrew J. Kelly  SQL MVP
"FRR" <FRR@discussions.microsoft.com> wrote in message 
news:33958036-6808-412C-9346-872846D6E68D@microsoft.com...
> Restoring the user db, then running sp_help_revlogin looks like a straight
> forward way to do this.  Do I restore the user database first, then run 
> the
> sp, or vice versa?  Does this strategy work regardless if I have one user 
> db
> or two?  Thank you for your help.
>
> "Andrew J. Kelly" wrote:
>
>> The Logins would come with Master but the users are stored in each db. 
>> You
>> may need to run sp_change_users_login on each one .  Have a look here:
>>
>> http://www.support.microsoft.com/?id=246133     How To Transfer Logins 
>> and
>> Passwords Between SQL Servers
>> http://www.support.microsoft.com/?id=298897    Mapping Logins & SIDs 
>> after a
>> Restore
>> http://www.dbmaint.com/SyncSqlLogins.asp         Utility to map logins to
>> users
>> http://www.support.microsoft.com/?id=168001     User Logon and/or 
>> Permission
>> Errors After Restoring Dump
>> http://www.support.microsoft.com/?id=240872    How to Resolve Permission
>> Issues When a Database Is Moved Between SQL
>> http://www.support.microsoft.com/?id=314546     Moving DB's between 
>> Servers
>> http://www.support.microsoft.com/?id=224071     Moving SQL Server 
>> Databases
>> to a New Location with Detach/Attach
>> http://support.microsoft.com/?id=221465             Using WITH MOVE in a
>> Restore
>> Servers
>> http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=599
>> Restoring a .mdf
>> http://www.support.microsoft.com/?id=307775    Disaster Recovery Articles
>> for SQL Server
>>
>>
>> -- 
>> Andrew J. Kelly  SQL MVP
>>
>>
>> "FRR" <FRR@discussions.microsoft.com> wrote in message
>> news:AE94C44C-4F74-4547-85BB-76569BC0571A@microsoft.com...
>> >I restored the master, then the production db, but the logins did not 
>> >come
>> > over.  I beleive all the db users are orphaned (about 200).  I didn't 
>> > get
>> > any
>> > error message, etc...  What do I do now?  The os and service packs are
>> > identical (server 2k3 and sql 2000).  Thank you.
>> >
>> > "Andrew J. Kelly" wrote:
>> >
>> >> Depends on how much info you have in Master that you need.  Personally 
>> >> I
>> >> prefer to add what I need to the new master instead of restoring the 
>> >> old
>> >> as
>> >> there tends to be less chance you will get junk carried over. Plus if 
>> >> you
>> >> have different service packs you have to be careful.
>> >>
>> >>
>> >> -- 
>> >> Andrew J. Kelly  SQL MVP
>> >>
>> >>
>> >> "FRR" <FRR@discussions.microsoft.com> wrote in message
>> >> news:B775DEAD-BDD1-41B9-81FD-D2A684FA00F0@microsoft.com...
>> >> > Is there any advantage to restoring the master to a backup server, 
>> >> > or
>> >> > can
>> >> > I
>> >> > just bring over the logins/passwords?
>> >>
>> >>
>> >>
>>
>>
>> 


Relevant Pages

  • Re: object level permissions being lost when migrating
    ... I first transferred the logins from the 2000 server to the 2005 server via ... I then restored the databases and re-synched the users via the ... Errors After Restoring Dump ...
    (microsoft.public.sqlserver.security)
  • Cant add login for moved SMS database
    ... I'm testing the move of my site database and after restoring the database to ... SQL server. ... without the corresponding Logins and I can't add logins for them. ...
    (microsoft.public.sms.setup)
  • Re: SQL 2000 server hardware upgrade
    ... db's on the new server and get all the Logins / Users / Jobs etc squared ... all access to the old server and detach the db's, copy them to the new one ... Errors After Restoring Dump ... for SQL Server ...
    (microsoft.public.sqlserver.setup)
  • Re: upgrading from SQL 7.0 to SQL2000
    ... Andrew J. Kelly SQL MVP ... > Or use sp_help_revlogin from KB to export the SQL Server logins with SID's ... >> Andrew J. Kelly SQL MVP ...
    (microsoft.public.sqlserver.setup)
  • User already exists in the database error
    ... I have backed up the SQL database on server X. ... After restoring the database everything looks ... until I get ready to create users in the "Logins" section of Enterprise ...
    (microsoft.public.sqlserver.server)

Quantcast