Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

shifting sql server from one system to another Expand / Collapse
Author
Message
Posted Wednesday, November 14, 2012 12:59 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, February 15, 2013 10:25 PM
Points: 1, Visits: 39
Hi all,
In our organisation we are shifting sql server to another system. we are done with that but we are not able to get logins. we need to have login to be shifted from present server to new server with same id passwords roles and permissions. is there any way to acheive this
Post #1384429
Posted Wednesday, November 14, 2012 1:20 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 3:20 AM
Points: 1,375, Visits: 2,661
abdsubhani (11/14/2012)
Hi all,
In our organisation we are shifting sql server to another system. we are done with that but we are not able to get logins. we need to have login to be shifted from present server to new server with same id passwords roles and permissions. is there any way to acheive this


See this link

http://support.microsoft.com/kb/918992

Post #1384438
Posted Wednesday, November 14, 2012 1:21 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 3:17 PM
Points: 42,450, Visits: 35,505
Use the SSIS Transfer Logins task.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1384441
Posted Wednesday, November 14, 2012 3:53 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 9:50 AM
Points: 6,175, Visits: 13,319
abdsubhani (11/14/2012)
Hi all,
In our organisation we are shifting sql server to another system. we are done with that but we are not able to get logins. we need to have login to be shifted from present server to new server with same id passwords roles and permissions. is there any way to acheive this

This doesnt move any roles but it will get all the windows and SQL logins including the SQL users passwords, roles should be pretty easy for you to figure out

USE DATABASE
GO
select 'CREATE LOGIN ' + sl.name +
' WITH PASSWORD = ' + sys.fn_varbintohexstr(sl.password_hash) +
' HASHED, SID = ' + sys.fn_varbintohexstr(sl.sid) +
', DEFAULT_DATABASE = ' + quotename(sl.default_database_name) +
', DEFAULT_LANGUAGE = ' + sl.default_language_name +
', CHECK_EXPIRATION = ' +
case
when sl.is_expiration_checked = 0 then 'off'
else 'on'
end + ', CHECK_POLICY = ' +
case
when sl.is_policy_checked = 0 then 'off'
else 'on'
end
from sys.sql_logins sl
where exists (select sid from sys.database_principals dp
where dp.sid = sl.sid) and sl.principal_id > 4

UNION ALL

select 'CREATE LOGIN ' + QUOTENAME(sp.name) +
' FROM WINDOWS WITH DEFAULT_DATABASE = ' +
quotename(sp.default_database_name) + ', DEFAULT_LANGUAGE = ' +
sp.default_language_name
from sys.server_principals sp
where exists (select sid from sys.database_principals dp
where dp.sid = sp.sid) AND sp.principal_id > 4 AND sp.type IN ('G','U')



-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1384519
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse