﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server Newbies  / shifting sql server from one system to another / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 18 May 2013 20:09:36 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: shifting sql server from one system to another</title><link>http://www.sqlservercentral.com/Forums/Topic1384429-1292-1.aspx</link><description>[quote][b]abdsubhani (11/14/2012)[/b][hr]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[/quote]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 ;-)[code="SQL"]USE DATABASEGOselect		'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'		endfrom sys.sql_logins slwhere exists (select sid from sys.database_principals dp where dp.sid = sl.sid) and sl.principal_id &amp;gt; 4UNION ALLselect		'CREATE LOGIN ' + QUOTENAME(sp.name) + 		' FROM WINDOWS WITH DEFAULT_DATABASE = ' +		quotename(sp.default_database_name) + ', DEFAULT_LANGUAGE = ' + 		sp.default_language_namefrom sys.server_principals spwhere exists (select sid from sys.database_principals dp where dp.sid = sp.sid) AND sp.principal_id &amp;gt; 4 AND sp.type IN ('G','U')[/code]</description><pubDate>Wed, 14 Nov 2012 03:53:05 GMT</pubDate><dc:creator>Perry Whittle</dc:creator></item><item><title>RE: shifting sql server from one system to another</title><link>http://www.sqlservercentral.com/Forums/Topic1384429-1292-1.aspx</link><description>Use the SSIS Transfer Logins task.</description><pubDate>Wed, 14 Nov 2012 01:21:48 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: shifting sql server from one system to another</title><link>http://www.sqlservercentral.com/Forums/Topic1384429-1292-1.aspx</link><description>[quote][b]abdsubhani (11/14/2012)[/b][hr]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[/quote]See this link[url]http://support.microsoft.com/kb/918992[/url]</description><pubDate>Wed, 14 Nov 2012 01:20:47 GMT</pubDate><dc:creator>SQLSACT</dc:creator></item><item><title>shifting sql server from one system to another</title><link>http://www.sqlservercentral.com/Forums/Topic1384429-1292-1.aspx</link><description>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</description><pubDate>Wed, 14 Nov 2012 00:59:11 GMT</pubDate><dc:creator>smshyd</dc:creator></item></channel></rss>