|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Friday, June 14, 2013 2:30 AM
Points: 3,063,
Visits: 1,335
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 10:29 PM
Points: 2,178,
Visits: 3,599
|
|
Very good scenario based question.
Mohammed Moinudheen
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Today @ 6:02 AM
Points: 738,
Visits: 1,147
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Tuesday, April 19, 2011 1:59 AM
Points: 1,042,
Visits: 234
|
|
Good question.
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Today @ 6:30 AM
Points: 9,410,
Visits: 6,495
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Tuesday, May 28, 2013 1:34 AM
Points: 1,263,
Visits: 1,080
|
|
Thank you very much for this question and scenario--and for the update regarding the sp_change_users_login stored procedure.
Regards, Michael
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 1:43 AM
Points: 1,992,
Visits: 1,855
|
|
This is an old problem with sql2000 too: restoring a database on a different instance, logins to database become invalid. The solution is create login on the restoring instance with the same sid of the source instance
See here: http://msdn.microsoft.com/en-us/library/ms189751.aspx
CREATE LOGIN loginName { WITH <option_list1> | FROM <sources> }
<option_list1> ::= PASSWORD = { 'password' | hashed_password HASHED } [ MUST_CHANGE ] [ , <option_list2> [ ,... ] ]
<option_list2> ::= SID = sid | DEFAULT_DATABASE = database | DEFAULT_LANGUAGE = language | CHECK_EXPIRATION = { ON | OFF} | CHECK_POLICY = { ON | OFF} | CREDENTIAL = credential_name
<sources> ::= WINDOWS [ WITH <windows_options>[ ,... ] ] | CERTIFICATE certname | ASYMMETRIC KEY asym_key_name
<windows_options> ::= DEFAULT_DATABASE = database | DEFAULT_LANGUAGE = language
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Friday, November 30, 2012 1:52 AM
Points: 1,116,
Visits: 602
|
|
Exactly a scenario that happens in our environments. Thanks for the question!
Ronald Hensbergen
Help us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/ ------------------------------------------------------------------------- 2+2=5 for significant large values of 2
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Friday, June 14, 2013 2:30 AM
Points: 3,063,
Visits: 1,335
|
|
Thanks for the kind comments everyone - this was my first question, so it's good to get a positive response!
And thanks Carlo for the extra information - I wasn't previously aware you could do that.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 10:02 AM
Points: 1,383,
Visits: 4,870
|
|
I always use sp_change_users_login in these circumstances, so had to pick an answer at random, luckily I got the right one :).
I wonder why they are withrawing this procedure? Anyone know if the replacement command does all the security checking that the procedure does?
|
|
|
|