{"id":3813,"date":"2018-10-16T11:57:08","date_gmt":"2018-10-16T11:57:08","guid":{"rendered":"https:\/\/dbtut.com\/?p=3813"},"modified":"2018-12-06T08:40:58","modified_gmt":"2018-12-06T08:40:58","slug":"how-to-migrate-mssql-server-logins-to-another-instance","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/","title":{"rendered":"How To Migrate MSSQL Server Logins To Another Instance"},"content":{"rendered":"<p>&nbsp;<\/p>\n<h3>Step 1: Create SP\u00a0sp_help_revlogin on master database of Source \/ Primary instance<\/h3>\n<p>The following script create two stored-procedures. You will use the first one when you want to transfer logins.<\/p>\n<div id=\"crayon-5bc06d59cfdee969443667\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\">\n<div class=\"crayon-main\">\n<pre class=\"lang:default decode:true  \">USE master\r\nGO\r\nIF OBJECT_ID ('sp_hexadecimal') IS NOT NULL\r\nDROP PROCEDURE sp_hexadecimal\r\nGO\r\nCREATE PROCEDURE sp_hexadecimal\r\n@binvalue varbinary(256),\r\n@hexvalue varchar (514) OUTPUT\r\nAS\r\nDECLARE @charvalue varchar (514)\r\nDECLARE @i int\r\nDECLARE @length int\r\nDECLARE @hexstring char(16)\r\nSELECT @charvalue = '0x'\r\nSELECT @i = 1\r\nSELECT @length = DATALENGTH (@binvalue)\r\nSELECT @hexstring = '0123456789ABCDEF'\r\nWHILE (@i &lt;= @length)\r\nBEGIN\r\nDECLARE @tempint int\r\nDECLARE @firstint int\r\nDECLARE @secondint int\r\nSELECT @tempint = CONVERT(int, SUBSTRING(@binvalue,@i,1))\r\nSELECT @firstint = FLOOR(@tempint\/16)\r\nSELECT @secondint = @tempint - (@firstint*16)\r\nSELECT @charvalue = @charvalue +\r\nSUBSTRING(@hexstring, @firstint+1, 1) +\r\nSUBSTRING(@hexstring, @secondint+1, 1)\r\nSELECT @i = @i + 1\r\nEND\r\n\r\nSELECT @hexvalue = @charvalue\r\nGO\r\n\r\nIF OBJECT_ID ('sp_help_revlogin') IS NOT NULL\r\nDROP PROCEDURE sp_help_revlogin\r\nGO\r\nCREATE PROCEDURE sp_help_revlogin @login_name sysname = NULL AS\r\nDECLARE @name sysname\r\nDECLARE @type varchar (1)\r\nDECLARE @hasaccess int\r\nDECLARE @denylogin int\r\nDECLARE @is_disabled int\r\nDECLARE @PWD_varbinary varbinary (256)\r\nDECLARE @PWD_string varchar (514)\r\nDECLARE @SID_varbinary varbinary (85)\r\nDECLARE @SID_string varchar (514)\r\nDECLARE @tmpstr varchar (1024)\r\nDECLARE @is_policy_checked varchar (3)\r\nDECLARE @is_expiration_checked varchar (3)\r\n\r\nDECLARE @defaultdb sysname\r\n\r\nIF (@login_name IS NULL)\r\nDECLARE login_curs CURSOR FOR\r\n\r\nSELECT p.sid, p.name, p.type, p.is_disabled, p.default_database_name, l.hasaccess, l.denylogin FROM \r\nsys.server_principals p LEFT JOIN sys.syslogins l\r\nON ( l.name = p.name ) WHERE p.type IN ( 'S', 'G', 'U' ) AND p.name &lt;&gt; 'sa'\r\nELSE\r\nDECLARE login_curs CURSOR FOR\r\n\r\nSELECT p.sid, p.name, p.type, p.is_disabled, p.default_database_name, l.hasaccess, l.denylogin FROM \r\nsys.server_principals p LEFT JOIN sys.syslogins l\r\nON ( l.name = p.name ) WHERE p.type IN ( 'S', 'G', 'U' ) AND p.name = @login_name\r\nOPEN login_curs\r\n\r\nFETCH NEXT FROM login_curs INTO @SID_varbinary, @name, @type, @is_disabled, @defaultdb, @hasaccess, @denylogin\r\nIF (@@fetch_status = -1)\r\nBEGIN\r\nPRINT 'No login(s) found.'\r\nCLOSE login_curs\r\nDEALLOCATE login_curs\r\nRETURN -1\r\nEND\r\nSET @tmpstr = '\/* sp_help_revlogin script '\r\nPRINT @tmpstr\r\nSET @tmpstr = '** Generated ' + CONVERT (varchar, GETDATE()) + ' on ' + @@SERVERNAME + ' *\/'\r\nPRINT @tmpstr\r\nPRINT ''\r\nWHILE (@@fetch_status &lt;&gt; -1)\r\nBEGIN\r\nIF (@@fetch_status &lt;&gt; -2)\r\nBEGIN\r\nPRINT ''\r\nSET @tmpstr = '-- Login: ' + @name\r\nPRINT @tmpstr\r\nIF (@type IN ( 'G', 'U'))\r\nBEGIN -- NT authenticated account\/group\r\n\r\nSET @tmpstr = 'CREATE LOGIN ' + QUOTENAME( @name ) + ' FROM WINDOWS WITH DEFAULT_DATABASE = [' + @defaultdb + ']'\r\nEND\r\nELSE BEGIN -- SQL Server authentication\r\n-- obtain password and sid\r\nSET @PWD_varbinary = CAST( LOGINPROPERTY( @name, 'PasswordHash' ) AS varbinary (256) )\r\nEXEC sp_hexadecimal @PWD_varbinary, @PWD_string OUT\r\nEXEC sp_hexadecimal @SID_varbinary,@SID_string OUT\r\n\r\n-- obtain password policy state\r\nSELECT @is_policy_checked = CASE is_policy_checked WHEN 1 THEN 'ON' WHEN 0 THEN 'OFF' ELSE NULL END FROM sys.sql_logins WHERE name = @name\r\nSELECT @is_expiration_checked = CASE is_expiration_checked WHEN 1 THEN 'ON' WHEN 0 THEN 'OFF' ELSE NULL END FROM sys.sql_logins WHERE name = @name\r\n\r\nSET @tmpstr = 'CREATE LOGIN ' + QUOTENAME( @name ) + ' WITH PASSWORD = ' + @PWD_string + ' HASHED, SID = ' + @SID_string + ', DEFAULT_DATABASE = [' + @defaultdb + ']'\r\n\r\nIF ( @is_policy_checked IS NOT NULL )\r\nBEGIN\r\nSET @tmpstr = @tmpstr + ', CHECK_POLICY = ' + @is_policy_checked\r\nEND\r\nIF ( @is_expiration_checked IS NOT NULL )\r\nBEGIN\r\nSET @tmpstr = @tmpstr + ', CHECK_EXPIRATION = ' + @is_expiration_checked\r\nEND\r\nEND\r\nIF (@denylogin = 1)\r\nBEGIN -- login is denied access\r\nSET @tmpstr = @tmpstr + '; DENY CONNECT SQL TO ' + QUOTENAME( @name )\r\nEND\r\nELSE IF (@hasaccess = 0)\r\nBEGIN -- login exists but does not have access\r\nSET @tmpstr = @tmpstr + '; REVOKE CONNECT SQL TO ' + QUOTENAME( @name )\r\nEND\r\nIF (@is_disabled = 1)\r\nBEGIN -- login is disabled\r\nSET @tmpstr = @tmpstr + '; ALTER LOGIN ' + QUOTENAME( @name ) + ' DISABLE'\r\nEND\r\nPRINT @tmpstr\r\nEND\r\n\r\nFETCH NEXT FROM login_curs INTO @SID_varbinary, @name, @type, @is_disabled, @defaultdb, @hasaccess, @denylogin\r\nEND\r\nCLOSE login_curs\r\nDEALLOCATE login_curs\r\nRETURN 0\r\nGO<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<p><a href=\"https:\/\/support.microsoft.com\/en-us\/kb\/246133\">https:\/\/support.microsoft.com\/en-us\/kb\/246133<\/a><\/p>\n<p>This script creates two stored procedures in your master database named sp_help_revlogin and sp_hexadecimal.<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 2: Execute the SP\u00a0sp_help_revlogin on Source Instance<\/h3>\n<p>This gives you the scripts of the Login\u2019s you want to carry in encrypted form. You can run it on the target server by copying the part of the login you want to move from the script.<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 3: Drop Role Members &amp; Users on target machine<\/h3>\n<p>Execute the following 2 queries on target machine to extract the members of roles and users in the current database<\/p>\n<p><strong>3a) Query1<\/strong><\/p>\n<pre class=\"lang:default decode:true \">SELECT 'sp_droprolemember ' +''''+ roleprinc.[name] + ''',''' + memberprinc.[name] +'''\r\nGO'\r\nFROM sys.database_role_members members JOIN sys.database_principals roleprinc ON roleprinc.[principal_id] = members.[role_principal_id]\r\nJOIN sys.database_principals memberprinc ON memberprinc.[principal_id] = members.[member_principal_id]\r\ninner join sys.syslogins s on s.name=memberprinc.name LEFT JOIN sys.login_token ulogin on memberprinc.[sid] = ulogin.[sid]<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>3b) Query2<\/strong><\/p>\n<pre class=\"lang:default decode:true \">\u00a0select' DROP USER '+ name +'\r\nGO' as nname from sys.sysusers where altuid is null and LEN(sid)&gt;5<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>3c) Drop Role Members &amp; Users<\/strong><\/p>\n<p>Extract the output of the above 2 queries and execute on the same target machine to drop role members and users from the database accordingly.<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 4: Add Users &amp;\u00a0 Role Members on target machine<\/h3>\n<p>Execute the following 2 queries on source\/production instance to extract the members of roles and users in the current database<\/p>\n<p><strong>4a) Query1<\/strong><\/p>\n<pre class=\"lang:default decode:true \">select 'CREATE USER '+name+ ' FOR LOGIN '+ name +'\r\nGO' from sys.syslogins where password is not null<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>4b) Query2<\/strong><\/p>\n<pre class=\"lang:default decode:true\">--------------------------ADD USERS TO THE ROLES FOR THAT Particular database----------------------------\r\nSELECT 'sp_addrolemember ' +''''+ roleprinc.[name] + ''',''' + memberprinc.[name] +'''\r\nGO' FROM\r\n--Role\/member associations\r\nsys.database_role_members members\r\nJOIN\r\n--Roles\r\nsys.database_principals roleprinc ON roleprinc.[principal_id] = members.[role_principal_id]\r\n--inner join sys.syslogins s on s.name=roleprinc.name\r\nJOIN\r\n--Role members (database users)\r\nsys.database_principals memberprinc ON memberprinc.[principal_id] = members.[member_principal_id]\r\ninner join sys.syslogins s on s.name=memberprinc.name\r\nLEFT JOIN\r\n--Login accounts\r\nsys.login_token ulogin on memberprinc.[sid] = ulogin.[sid]<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>4c) Add Role Members &amp; Users<\/strong><\/p>\n<p>Extract the output of the above 2 queries and execute on the same target machine to drop role members and users from the database accordingly.<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 5: Grant Permission to Users for specific Objects<\/h3>\n<p>Execute the following script on source \/ production server to extract the permissions on objects.<\/p>\n<pre class=\"lang:default decode:true \">SELECT perm.state_desc + ' ' +perm.[permission_name] + ' ON '+ OBJECT_NAME(perm.major_id) +' TO ', princ.[name] as aa\r\nFROM \r\n--database user\r\nsys.database_principals princ inner join sys.syslogins s on s.name=princ.name\r\nleft JOIN\r\n--Login accounts\r\nsys.login_token ulogin on princ.[sid] = ulogin.[sid]\r\ninner JOIN \r\n--Permissions\r\nsys.database_permissions perm ON perm.[grantee_principal_id] = princ.[principal_id]\r\n\r\nleft JOIN\r\nsys.objects obj ON perm.[major_id] = obj.[object_id]\r\nWHERE \r\nprinc.[type] in ('S','U')\r\nand obj.type_desc is not null<\/pre>\n<p>&nbsp;<\/p>\n<p>Export the output generated from this query and execute it on the target server to assign the relevant permissions.<\/p>\n<p>CHECK &amp; Verify Login Access and the permissions of database objects and their specific roles respectively.<\/p>\n\n<p>&nbsp;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_3813\" class=\"pvc_stats all  \" data-element-id=\"3813\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Step 1: Create SP\u00a0sp_help_revlogin on master database of Source \/ Primary instance The following script create two stored-procedures. You will use the first one when you want to transfer logins. USE master GO IF OBJECT_ID (&#8216;sp_hexadecimal&#8217;) IS NOT NULL DROP PROCEDURE sp_hexadecimal GO CREATE PROCEDURE sp_hexadecimal @binvalue varbinary(256), @hexvalue varchar (514) OUTPUT AS DECLARE &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_3813\" class=\"pvc_stats all  \" data-element-id=\"3813\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":181,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-3813","post","type-post","status-publish","format-standard","","category-mssql"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Migrate MSSQL Server Logins To Another Instance - Database Tutorials<\/title>\n<meta name=\"description\" content=\"How To Migrate MSSQL Server Logins To Another Instance\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Migrate MSSQL Server Logins To Another Instance - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"How To Migrate MSSQL Server Logins To Another Instance\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-10-16T11:57:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-12-06T08:40:58+00:00\" \/>\n<meta name=\"author\" content=\"Engr. Mohammad Rizwan Yasin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Engr. Mohammad Rizwan Yasin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/\"},\"author\":{\"name\":\"Engr. Mohammad Rizwan Yasin\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/9b0bcfe5e42a7f42c1aed036ae5c9f53\"},\"headline\":\"How To Migrate MSSQL Server Logins To Another Instance\",\"datePublished\":\"2018-10-16T11:57:08+00:00\",\"dateModified\":\"2018-12-06T08:40:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/\"},\"wordCount\":308,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"articleSection\":[\"MSSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/\",\"name\":\"How To Migrate MSSQL Server Logins To Another Instance - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"datePublished\":\"2018-10-16T11:57:08+00:00\",\"dateModified\":\"2018-12-06T08:40:58+00:00\",\"description\":\"How To Migrate MSSQL Server Logins To Another Instance\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Migrate MSSQL Server Logins To Another Instance\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/9b0bcfe5e42a7f42c1aed036ae5c9f53\",\"name\":\"Engr. Mohammad Rizwan Yasin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fe7a00fd631820cba9b5309a297ca14ce4b9e430fe57c00399e9cca2f0550e10?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fe7a00fd631820cba9b5309a297ca14ce4b9e430fe57c00399e9cca2f0550e10?s=96&d=mm&r=g\",\"caption\":\"Engr. Mohammad Rizwan Yasin\"},\"url\":\"https:\/\/dbtut.com\/index.php\/author\/mohammadrizwan\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Migrate MSSQL Server Logins To Another Instance - Database Tutorials","description":"How To Migrate MSSQL Server Logins To Another Instance","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/","og_locale":"en_US","og_type":"article","og_title":"How To Migrate MSSQL Server Logins To Another Instance - Database Tutorials","og_description":"How To Migrate MSSQL Server Logins To Another Instance","og_url":"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/","og_site_name":"Database Tutorials","article_published_time":"2018-10-16T11:57:08+00:00","article_modified_time":"2018-12-06T08:40:58+00:00","author":"Engr. Mohammad Rizwan Yasin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Engr. Mohammad Rizwan Yasin","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/"},"author":{"name":"Engr. Mohammad Rizwan Yasin","@id":"https:\/\/dbtut.com\/#\/schema\/person\/9b0bcfe5e42a7f42c1aed036ae5c9f53"},"headline":"How To Migrate MSSQL Server Logins To Another Instance","datePublished":"2018-10-16T11:57:08+00:00","dateModified":"2018-12-06T08:40:58+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/"},"wordCount":308,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"articleSection":["MSSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/","url":"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/","name":"How To Migrate MSSQL Server Logins To Another Instance - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"datePublished":"2018-10-16T11:57:08+00:00","dateModified":"2018-12-06T08:40:58+00:00","description":"How To Migrate MSSQL Server Logins To Another Instance","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2018\/10\/16\/how-to-migrate-mssql-server-logins-to-another-instance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"How To Migrate MSSQL Server Logins To Another Instance"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/9b0bcfe5e42a7f42c1aed036ae5c9f53","name":"Engr. Mohammad Rizwan Yasin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fe7a00fd631820cba9b5309a297ca14ce4b9e430fe57c00399e9cca2f0550e10?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fe7a00fd631820cba9b5309a297ca14ce4b9e430fe57c00399e9cca2f0550e10?s=96&d=mm&r=g","caption":"Engr. Mohammad Rizwan Yasin"},"url":"https:\/\/dbtut.com\/index.php\/author\/mohammadrizwan\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/3813","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/181"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=3813"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/3813\/revisions"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=3813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=3813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=3813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}