{"id":16218,"date":"2021-04-22T06:07:55","date_gmt":"2021-04-22T04:07:55","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/"},"modified":"2021-04-22T06:07:55","modified_gmt":"2021-04-22T04:07:55","slug":"sql-server-replace-the-old-scom-login-by-the-new-one","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/","title":{"rendered":"SQL Server: Replace the old SCOM login by the new one"},"content":{"rendered":"<p>It\u2019s every time hard to replace a login who as role and permissions in every database like the service account for SCOM.<br \/>\nIn the previous version of Scom, you create a service account (dbiscom) to access the SQL Server and check the health of the databases.<br \/>\nNow it&#8217;s possible to use the System Center Operations Manager Health Service (NT SERVICEHealthService).<br \/>\nTo do this change on all SQL Servers, I write a script.<\/p>\n<p>I create the script to replace the old SCOM login with the new one on 5 steps:<\/p>\n<ul>\n<li>Step 1: kill sessions with the old scom login<\/li>\n<li>Step 2: drop the old user scom in all databases<\/li>\n<li>Step 3: drop server role scom in the instance<\/li>\n<li>Step 4: Drop the old scom login<\/li>\n<li>Step 5: Set the new scom account<\/li>\n<\/ul>\n<h3>Step 1: kill sessions with the old scom login<\/h3>\n<p>Before dropping the login, you need to be sure that he has no more connection to the instance.<br \/>\nMost of the time, the service will be stop but this script insure you that no process is connected.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\/*Step 1: kill sessions with the old scom login*\/\nDECLARE @LoginToDrop sysname SET @LoginToDrop='dbiscom';\nDECLARE @SessionToKill nvarchar(max) SET @SessionToKill = ''; \n\nSELECT @SessionToKill=@SessionToKill + 'Kill '+ CAST(session_id as nvarchar(10)) +';' \n        FROM sys.dm_exec_sessions\n        WHERE is_user_process = 1 and login_name=@LoginToDrop;\nPRINT (@SessionToKill) \nEXEC(@SessionToKill)<\/pre>\n<p>&nbsp;<\/p>\n<h3>Step 2: drop the old user scom in all databases<\/h3>\n<p>The second part of the script is to go though all databases and drop the user-databases<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\/*Step 2: drop user scom in all databases sessions with the old scom session *\/\nDECLARE @DropDatabaseUserAndRole nvarchar(max);\nSET @DropDatabaseUserAndRole = ''; \nSELECT @DropDatabaseUserAndRole = @DropDatabaseUserAndRole  + ' USE ' + QUOTENAME(db.name) + '; DROP USER ['+@LoginToDrop+'];' \n  FROM sys.databases db  \n  LEFT JOIN sys.dm_hadr_availability_replica_states hadrstate ON db.replica_id = hadrstate.replica_id  \n  WHERE db.database_id != 2 AND db.user_access = 0 AND db.state = 0 AND db.is_read_only = 0 AND (hadrstate.role = 1 or hadrstate.role IS NULL); \nPRINT (@DropDatabaseUserAndRole ) \nEXEC(@DropDatabaseUserAndRole ) \nGO<\/pre>\n<p>&nbsp;<\/p>\n<h3>Step 3: drop server role scom in the instance<\/h3>\n<p>This step is optional and only if you create a server role for the scom login. In this script, the first part is to drop all members from the role and after drop the role<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\/*Step 3: drop server role scom in the instance*\/\nUSE [master]\nGO\nDECLARE @RoleName sysname;\nset @RoleName = N'scom';\nIF @RoleName &lt;&gt; N'public' and (select is_fixed_role from sys.server_principals where name = @RoleName) = 0\nBEGIN\n    DECLARE @RoleMemberName sysname\n    DECLARE Member_Cursor CURSOR FOR\n    select [name]\n    from sys.server_principals\n    where principal_id in (select member_principal_id from sys.server_role_members where role_principal_id in \n           (select principal_id FROM sys.server_principals where [name] = @RoleName  AND type = 'R' ))\n    OPEN Member_Cursor;\n    FETCH NEXT FROM Member_Cursor into @RoleMemberName\n    DECLARE @SQL NVARCHAR(4000)\n    WHILE @@FETCH_STATUS = 0\n    BEGIN\n        SET @SQL = 'ALTER SERVER ROLE '+ QUOTENAME(@RoleName,'[') +' DROP MEMBER '+ QUOTENAME(@RoleMemberName,'[')\n        EXEC(@SQL)\n        FETCH NEXT FROM Member_Cursor\n        into @RoleMemberName\n    END;\n    CLOSE Member_Cursor;\n    DEALLOCATE Member_Cursor;\nEND\nDROP SERVER ROLE [scom]\nGO<\/pre>\n<p>In this script, i use a cursor, it&#8217;s not the best but it&#8217;s efficient&#8230;<\/p>\n<h3>Step 4: Drop the old scom login<\/h3>\n<p>After these 3 steps, I can now drop the login scom<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\/*Step 4: Drop the scom login*\/\nUSE [master]\nGO\nDROP LOGIN [dbiscom]\nGO\n<\/pre>\n<p>&nbsp;<\/p>\n<h3>Step 5: Set the new scom account<\/h3>\n<p>Now, it&#8217; the time to add the new one.<br \/>\nThe new service account is the System Center Operations Manager Health Service (NT SERVICEHealthService).<br \/>\nAfter Adding the login to the instance, I create the role SCOM_HealthService in each database and add this login as member.<br \/>\nAlso give the server permissions &#8220;VIEW ANY DATABASE&#8221;,&#8221;VIEW SERVER STATE&#8221; and &#8220;VIEW ANY DEFINITION&#8221; and specials permissions in the master and msdb databases.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\/*Step 5: Set the new scom account*\/\nUSE [master];\nSET NOCOUNT ON;\nDECLARE @accountname sysname = 'NT SERVICEHealthService';\n-- Create the server role and grant instance level permissions\nCREATE SERVER ROLE [SCOM_HealthService];\nGRANT VIEW ANY DATABASE TO [SCOM_HealthService];\n--GRANT ALTER ANY DATABASE TO [SCOM_HealthService]; --Required only for SCOMDB tasks\nGRANT VIEW ANY DEFINITION TO [SCOM_HealthService];\nGRANT VIEW SERVER STATE TO [SCOM_HealthService];\nDECLARE @createLoginCommand nvarchar(200);\nSET @createLoginCommand = ' CREATE LOGIN '+ QUOTENAME(@accountname) +' FROM WINDOWS WITH DEFAULT_DATABASE=[master];'\nEXEC(@createLoginCommand);\n-- Add the login to the user defined server role \nEXEC sp_addsrvrolemember @loginame = @accountname, @rolename = 'SCOM_HealthService' \n-- Add the login and database role to each database\nDECLARE @createDatabaseUserAndRole nvarchar(max) SET @createDatabaseUserAndRole = ''; \nSELECT @createDatabaseUserAndRole = @createDatabaseUserAndRole + ' USE ' + QUOTENAME(db.name) + '; CREATE USER ' + QUOTENAME(@accountname) + ' FOR LOGIN ' + QUOTENAME(@accountname) + '; CREATE ROLE [SCOM_HealthService]; EXEC sp_addrolemember @rolename = ''SCOM_HealthService'', @membername = '+ QUOTENAME(@accountname) + '' \n  FROM sys.databases db  \n  LEFT JOIN sys.dm_hadr_availability_replica_states hadrstate ON db.replica_id = hadrstate.replica_id  \n  WHERE db.database_id != 2 AND db.user_access = 0 AND db.state = 0 AND db.is_read_only = 0 AND (hadrstate.role = 1 or hadrstate.role IS NULL); \nEXEC(@createDatabaseUserAndRole) \n-- Add database specific permissions to database role\nUSE [master]; \nGRANT EXECUTE ON sys.xp_readerrorlog TO [SCOM_HealthService]\nGRANT SELECT ON sys.database_mirroring_witnesses TO [SCOM_HealthService];\nUSE [msdb]; \nGRANT SELECT ON [dbo].[sysjobschedules] TO [SCOM_HealthService]; \nGRANT SELECT ON [dbo].[sysschedules] TO [SCOM_HealthService]; \nGRANT SELECT ON [dbo].[sysjobs_view] TO [SCOM_HealthService]; \nGRANT SELECT ON [dbo].[log_shipping_primary_databases] TO [SCOM_HealthService]; \nGRANT SELECT ON [dbo].[log_shipping_secondary_databases] TO [SCOM_HealthService]; \nGRANT SELECT ON [dbo].[log_shipping_monitor_history_detail] TO [SCOM_HealthService]; \nGRANT SELECT ON [dbo].[log_shipping_monitor_secondary] TO [SCOM_HealthService]; \nGRANT SELECT ON [dbo].[log_shipping_monitor_primary] TO [SCOM_HealthService]; \nGRANT EXECUTE ON [dbo].[sp_help_job] TO [SCOM_HealthService]; \nGRANT EXECUTE ON [dbo].[sp_help_jobactivity] TO [SCOM_HealthService]; \nEXEC sp_addrolemember @rolename='SQLAgentReaderRole', @membername='SCOM_HealthService';\nEXEC sp_addrolemember @rolename='PolicyAdministratorRole', @membername='SCOM_HealthService';\n<\/pre>\n<p>&nbsp;<br \/>\n&nbsp;<\/p>\n<h3>Global Script<\/h3>\n<p>To finish my post, I give you also the global script:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\/*Step 1: kill sessions with the old scom login*\/\nDECLARE @LoginToDrop sysname SET @LoginToDrop='dbiscom';\nDECLARE @SessionToKill nvarchar(max) SET @SessionToKill = ''; \n\nSELECT @SessionToKill=@SessionToKill + 'Kill '+ CAST(session_id as nvarchar(10)) +';' \n        FROM sys.dm_exec_sessions\n        WHERE is_user_process = 1 and login_name=@LoginToDrop;\nPRINT (@SessionToKill) \nEXEC(@SessionToKill) \n\n\/*Step 2: drop user scom in all databases sessions with the old scom session *\/\nDECLARE @DropDatabaseUserAndRole nvarchar(max);\nSET @DropDatabaseUserAndRole = ''; \nSELECT @DropDatabaseUserAndRole = @DropDatabaseUserAndRole  + ' USE ' + QUOTENAME(db.name) + '; DROP USER ['+@LoginToDrop+'];' \n  FROM sys.databases db  \n  LEFT JOIN sys.dm_hadr_availability_replica_states hadrstate ON db.replica_id = hadrstate.replica_id  \n  WHERE db.database_id != 2 AND db.user_access = 0 AND db.state = 0 AND db.is_read_only = 0 AND (hadrstate.role = 1 or hadrstate.role IS NULL); \nPRINT (@DropDatabaseUserAndRole ) \nEXEC(@DropDatabaseUserAndRole ) \nGO\n\n\/*Step 3: drop server role scom in the instance*\/\n\nUSE [master]\nGO\n\nDECLARE @RoleName sysname\nset @RoleName = N'scom'\n\nIF @RoleName &lt;&gt; N'public' and (select is_fixed_role from sys.server_principals where name = @RoleName) = 0\nBEGIN\n    DECLARE @RoleMemberName sysname\n    DECLARE Member_Cursor CURSOR FOR\n    select [name]\n    from sys.server_principals\n    where principal_id in ( \n        select member_principal_id \n        from sys.server_role_members \n        where role_principal_id in (\n            select principal_id\n            FROM sys.server_principals where [name] = @RoleName  AND type = 'R' ))\n\n    OPEN Member_Cursor;\n\n    FETCH NEXT FROM Member_Cursor\n    into @RoleMemberName\n\n    DECLARE @SQL NVARCHAR(4000)\n        \n    WHILE @@FETCH_STATUS = 0\n    BEGIN\n        \n        SET @SQL = 'ALTER SERVER ROLE '+ QUOTENAME(@RoleName,'[') +' DROP MEMBER '+ QUOTENAME(@RoleMemberName,'[')\n        EXEC(@SQL)\n        \n        FETCH NEXT FROM Member_Cursor\n        into @RoleMemberName\n    END;\n\n    CLOSE Member_Cursor;\n    DEALLOCATE Member_Cursor;\nEND\nDROP SERVER ROLE [scom]\nGO\n\n\/*Step 4: Drop the scom login*\/\nUSE [master]\nGO\nDROP LOGIN [dbiscom]\nGO\n\n\n\/*Step 5: Set the new scom account*\/\nUSE [master];\nSET NOCOUNT ON;\nDECLARE @accountname sysname = 'NT SERVICEHealthService';\n-- Create the server role and grant instance level permissions\nCREATE SERVER ROLE [SCOM_HealthService];\nGRANT VIEW ANY DATABASE TO [SCOM_HealthService];\n--GRANT ALTER ANY DATABASE TO [SCOM_HealthService]; --Required only for SCOMDB tasks\nGRANT VIEW ANY DEFINITION TO [SCOM_HealthService];\nGRANT VIEW SERVER STATE TO [SCOM_HealthService];\nDECLARE @createLoginCommand nvarchar(200);\nSET @createLoginCommand = ' CREATE LOGIN '+ QUOTENAME(@accountname) +' FROM WINDOWS WITH DEFAULT_DATABASE=[master];'\nEXEC(@createLoginCommand);\n-- Add the login to the user defined server role \nEXEC sp_addsrvrolemember @loginame = @accountname, @rolename = 'SCOM_HealthService' \n-- Add the login and database role to each database\nDECLARE @createDatabaseUserAndRole nvarchar(max) SET @createDatabaseUserAndRole = ''; \nSELECT @createDatabaseUserAndRole = @createDatabaseUserAndRole + ' USE ' + QUOTENAME(db.name) + '; CREATE USER ' + QUOTENAME(@accountname) + ' FOR LOGIN ' + QUOTENAME(@accountname) + '; CREATE ROLE [SCOM_HealthService]; EXEC sp_addrolemember @rolename = ''SCOM_HealthService'', @membername = '+ QUOTENAME(@accountname) + '' \n  FROM sys.databases db  \n  LEFT JOIN sys.dm_hadr_availability_replica_states hadrstate ON db.replica_id = hadrstate.replica_id  \n  WHERE db.database_id != 2 AND db.user_access = 0 AND db.state = 0 AND db.is_read_only = 0 AND (hadrstate.role = 1 or hadrstate.role IS NULL); \nEXEC(@createDatabaseUserAndRole) \n-- Add database specific permissions to database role\nUSE [master]; \nGRANT EXECUTE ON sys.xp_readerrorlog TO [SCOM_HealthService]\nGRANT SELECT ON sys.database_mirroring_witnesses TO [SCOM_HealthService];\nUSE [msdb]; \nGRANT SELECT ON [dbo].[sysjobschedules] TO [SCOM_HealthService]; \nGRANT SELECT ON [dbo].[sysschedules] TO [SCOM_HealthService]; \nGRANT SELECT ON [dbo].[sysjobs_view] TO [SCOM_HealthService]; \nGRANT SELECT ON [dbo].[log_shipping_primary_databases] TO [SCOM_HealthService]; \nGRANT SELECT ON [dbo].[log_shipping_secondary_databases] TO [SCOM_HealthService]; \nGRANT SELECT ON [dbo].[log_shipping_monitor_history_detail] TO [SCOM_HealthService]; \nGRANT SELECT ON [dbo].[log_shipping_monitor_secondary] TO [SCOM_HealthService]; \nGRANT SELECT ON [dbo].[log_shipping_monitor_primary] TO [SCOM_HealthService]; \nGRANT EXECUTE ON [dbo].[sp_help_job] TO [SCOM_HealthService]; \nGRANT EXECUTE ON [dbo].[sp_help_jobactivity] TO [SCOM_HealthService]; \nEXEC sp_addrolemember @rolename='SQLAgentReaderRole', @membername='SCOM_HealthService';\nEXEC sp_addrolemember @rolename='PolicyAdministratorRole', @membername='SCOM_HealthService';\n<\/pre>\n<p>&nbsp;<br \/>\nI hope this script can help you for all migrations of service account present in all databases.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It\u2019s every time hard to replace a login who as role and permissions in every database like the service account for SCOM. In the previous version of Scom, you create a service account (dbiscom) to access the SQL Server and check the health of the databases. Now it&#8217;s possible to use the System Center Operations [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,198,99],"tags":[49,211,25,51],"type_dbi":[],"class_list":["post-16218","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","category-database-management","category-sql-server","tag-microsoft","tag-scom","tag-security","tag-sql-server"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Server: Replace the old SCOM login by the new one - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server: Replace the old SCOM login by the new one\" \/>\n<meta property=\"og:description\" content=\"It\u2019s every time hard to replace a login who as role and permissions in every database like the service account for SCOM. In the previous version of Scom, you create a service account (dbiscom) to access the SQL Server and check the health of the databases. Now it&#8217;s possible to use the System Center Operations [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-22T04:07:55+00:00\" \/>\n<meta name=\"author\" content=\"St\u00e9phane Haby\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"St\u00e9phane Haby\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/\"},\"author\":{\"name\":\"St\u00e9phane Haby\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b\"},\"headline\":\"SQL Server: Replace the old SCOM login by the new one\",\"datePublished\":\"2021-04-22T04:07:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/\"},\"wordCount\":394,\"commentCount\":0,\"keywords\":[\"Microsoft\",\"SCOM\",\"Security\",\"SQL Server\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"Database management\",\"SQL Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/\",\"name\":\"SQL Server: Replace the old SCOM login by the new one - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2021-04-22T04:07:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server: Replace the old SCOM login by the new one\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b\",\"name\":\"St\u00e9phane Haby\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g\",\"caption\":\"St\u00e9phane Haby\"},\"description\":\"St\u00e9phane Haby has more than ten years of experience in Microsoft solutions. He is specialized in SQL Server technologies such as installation, migration, best practices, and performance analysis etc. He is also an expert in Microsoft Business Intelligence solutions such as SharePoint, SQL Server and Office. Futhermore, he has many years of .NET development experience in the banking sector and other industries. In France, he was one of the first people to have worked with Microsoft Team System. He has written several technical articles on this subject. St\u00e9phane Haby is Microsoft Most Valuable Professional (MVP) as well as Microsoft Certified Solutions Associate (MCSA) and\u00a0Microsoft Certified Solutions Expert (MCSE) for SQL Server 2012. He is also Microsoft Certified Technology Specialist (MCTS) and Microsoft Certified IT Professional (MCITP) for SQL Server 2008 as well as ITIL Foundation V3 certified. He holds a Engineer diploma in industrial computing and automation from France. His branch-related experience covers Chemicals &amp; Pharmaceuticals, Banking \/ Financial Services, and many other industries.\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/stephane-haby\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Server: Replace the old SCOM login by the new one - dbi Blog","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:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server: Replace the old SCOM login by the new one","og_description":"It\u2019s every time hard to replace a login who as role and permissions in every database like the service account for SCOM. In the previous version of Scom, you create a service account (dbiscom) to access the SQL Server and check the health of the databases. Now it&#8217;s possible to use the System Center Operations [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/","og_site_name":"dbi Blog","article_published_time":"2021-04-22T04:07:55+00:00","author":"St\u00e9phane Haby","twitter_card":"summary_large_image","twitter_misc":{"Written by":"St\u00e9phane Haby","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/"},"author":{"name":"St\u00e9phane Haby","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b"},"headline":"SQL Server: Replace the old SCOM login by the new one","datePublished":"2021-04-22T04:07:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/"},"wordCount":394,"commentCount":0,"keywords":["Microsoft","SCOM","Security","SQL Server"],"articleSection":["Database Administration &amp; Monitoring","Database management","SQL Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/","url":"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/","name":"SQL Server: Replace the old SCOM login by the new one - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2021-04-22T04:07:55+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-replace-the-old-scom-login-by-the-new-one\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL Server: Replace the old SCOM login by the new one"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b","name":"St\u00e9phane Haby","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g","caption":"St\u00e9phane Haby"},"description":"St\u00e9phane Haby has more than ten years of experience in Microsoft solutions. He is specialized in SQL Server technologies such as installation, migration, best practices, and performance analysis etc. He is also an expert in Microsoft Business Intelligence solutions such as SharePoint, SQL Server and Office. Futhermore, he has many years of .NET development experience in the banking sector and other industries. In France, he was one of the first people to have worked with Microsoft Team System. He has written several technical articles on this subject. St\u00e9phane Haby is Microsoft Most Valuable Professional (MVP) as well as Microsoft Certified Solutions Associate (MCSA) and\u00a0Microsoft Certified Solutions Expert (MCSE) for SQL Server 2012. He is also Microsoft Certified Technology Specialist (MCTS) and Microsoft Certified IT Professional (MCITP) for SQL Server 2008 as well as ITIL Foundation V3 certified. He holds a Engineer diploma in industrial computing and automation from France. His branch-related experience covers Chemicals &amp; Pharmaceuticals, Banking \/ Financial Services, and many other industries.","url":"https:\/\/www.dbi-services.com\/blog\/author\/stephane-haby\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/16218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=16218"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/16218\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=16218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=16218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=16218"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=16218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}