{"id":13198,"date":"2020-01-21T08:21:05","date_gmt":"2020-01-21T07:21:05","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/"},"modified":"2020-01-21T08:21:05","modified_gmt":"2020-01-21T07:21:05","slug":"sql-server-tips-orphan-database-user-but-not-so-orphan","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/","title":{"rendered":"SQL Server Tips: Orphan database user but not so orphan&#8230;"},"content":{"rendered":"<p>Beginning of this year, it is good to clean up orphan users in SQL Server databases.<br \/>\nEven if this practice must be done regularly throughout the year of course. \ud83d\ude09<\/p>\n<p>During my cleaning day, a new case appears that I never had before and enjoy to share it with you.<br \/>\nTo find orphan database-users, I use this query:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">SELECT *FROM sys.database_principals a\nLEFT OUTER JOIN sys.server_principals b ON a.sid = b.sid\nWHERE b.sid IS NULL\nAND a.type In ('U', 'G')\nAND a.principal_id &gt; 4<\/pre>\n<p>This query for orphan users is focussed on Windows Logins or Groups and not SQL Logins.<\/p>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user_drop00.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-36732 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user_drop00.png\" alt=\"\" width=\"300\" height=\"60\" \/><\/a><br \/>\nAfter running the query, I find one user (that I renamed dbi_user to anonymize my blog).<br \/>\nI try to drop the user\u2026.<\/p>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user_drop01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-36733 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user_drop01.png\" alt=\"\" width=\"300\" height=\"39\" \/><\/a><br \/>\nI\u2019m not lucky! As you can see in the screenshot above, I have an error message:<br \/>\n<em><strong>Msg 15136, Level 16, State 1, Line 4<\/strong><\/em><br \/>\n<em><strong>The database principal is set as the execution context of one or more procedures, functions, or event notifications and cannot be dropped<\/strong><\/em><\/p>\n<p>What does this message means?<br \/>\nIn my database, this user is used as execution context (EXECUTE AS) in stored procedures, functions or event notifications.<br \/>\nI need to find now, where this user is used.<br \/>\nFor that, I will use the DMV sys.sql_modules combined with sys.database_principals:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">Select sqlm.object_id, sqlm.definition, dp.principal_id,dp.name from sys.sql_modules sqlm join sys.database_principals dp on sqlm.execute_as_principal_id=dp.principal_id<\/pre>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user_drop02.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-36734 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user_drop02.png\" alt=\"\" width=\"300\" height=\"119\" \/><\/a><\/p>\n<p>In my case, I find one stored procedure linked to my user.<br \/>\nTo have a good answer for my query, I add a clause where to eliminate these cases:<\/p>\n<ul>\n<li>execute_as_principal_id= NULL &#8211;&gt; EXECUTE AS CALLER<\/li>\n<li>execute_as_principal_id=-2 &#8211;&gt; execute as owner<\/li>\n<li>execute_as_principal_id=1 &#8211;&gt; execute as dbo<\/li>\n<li>execute_as_principal_id=8 &#8211;&gt; execute as AllSchemaOwner in SSISDB if needed<\/li>\n<\/ul>\n<p>My new query will be this one:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">Select sqlm.object_id, sqlm.definition, dp.principal_id,dp.name from sys.sql_modules sqlm join sys.database_principals dp on sqlm.execute_as_principal_id=dp.principal_id where sqlm.execute_as_principal_id is not null and sqlm.execute_as_principal_id!=-2 and sqlm.execute_as_principal_id!=1<\/pre>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user_drop03.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-36735 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user_drop03.png\" alt=\"\" width=\"300\" height=\"63\" \/><\/a><br \/>\nAnd now, I have only the stored procedure with the execution context of my user dbi_user.<br \/>\nAfter that, I copy the value of the definition column to see the code<\/p>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user_drop04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-36736 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user_drop04.png\" alt=\"\" width=\"300\" height=\"148\" \/><\/a><br \/>\nAs you can see my user dbi_user is not explicitly specified in the Execute as.<br \/>\nThe stored procedure uses execute as self and if I search the user name in the definition column like this query below, I will never find the user:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">Select sqlm.object_id, sqlm.definition, dp.principal_id,dp.name from sys.sql_modules sqlm join sys.database_principals dp\non sqlm.execute_as_principal_id=dp.principal_id where sqlm.definition like '%dbi_user%'<\/pre>\n<p>You can also use the store procedure sp_MSforeachdb to find all \u201cspecial users\u201d used in modules:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">exec sp_MSforeachdb N'select ''?'',sqlm.object_id, sqlm.definition, dp.principal_id,dp.name from [?].sys.sql_modules sqlm join [?].sys.database_principals dp on sqlm.execute_as_principal_id=dp.principal_id where execute_as_principal_id is not null and execute_as_principal_id!=-2 and execute_as_principal_id!=1'<\/pre>\n<p>What can I do now?<br \/>\nThe only thing to do is to contact the owner of this SP and see with him what to do.<br \/>\nIn the <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/t-sql\/statements\/execute-as-transact-sql?view=sql-server-ver15\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft documentation about Execute AS<\/a>, you can read:<br \/>\n<em>&#8220;If the user is orphaned (the associated login no longer exists), and the user was not created with WITHOUT LOGIN, EXECUTE AS will fail for the user.&#8221;<\/em><\/p>\n<p>This means that this Stored Procedure will fail if it is used\u2026<\/p>\n<p>I hope this blog can help you \ud83d\ude0e<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Beginning of this year, it is good to clean up orphan users in SQL Server databases. Even if this practice must be done regularly throughout the year of course. \ud83d\ude09 During my cleaning day, a new case appears that I never had before and enjoy to share it with you. To find orphan database-users, I [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":13204,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,198],"tags":[25,51,52,566,44],"type_dbi":[],"class_list":["post-13198","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-administration-monitoring","category-database-management","tag-security","tag-sql-server","tag-sql-server-2014","tag-sql-server-2016","tag-troubleshooting"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Server Tips: Orphan database user but not so orphan... - 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-tips-orphan-database-user-but-not-so-orphan\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server Tips: Orphan database user but not so orphan...\" \/>\n<meta property=\"og:description\" content=\"Beginning of this year, it is good to clean up orphan users in SQL Server databases. Even if this practice must be done regularly throughout the year of course. \ud83d\ude09 During my cleaning day, a new case appears that I never had before and enjoy to share it with you. To find orphan database-users, I [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-21T07:21:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user-drop00.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1192\" \/>\n\t<meta property=\"og:image:height\" content=\"238\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\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=\"3 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-tips-orphan-database-user-but-not-so-orphan\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-tips-orphan-database-user-but-not-so-orphan\\\/\"},\"author\":{\"name\":\"St\u00e9phane Haby\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0bfb7484ae81c8980fc2b11334f803b\"},\"headline\":\"SQL Server Tips: Orphan database user but not so orphan&#8230;\",\"datePublished\":\"2020-01-21T07:21:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-tips-orphan-database-user-but-not-so-orphan\\\/\"},\"wordCount\":452,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-tips-orphan-database-user-but-not-so-orphan\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/orphan_user-drop00.png\",\"keywords\":[\"Security\",\"SQL Server\",\"SQL Server 2014\",\"SQL Server 2016\",\"Troubleshooting\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"Database management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-tips-orphan-database-user-but-not-so-orphan\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-tips-orphan-database-user-but-not-so-orphan\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-tips-orphan-database-user-but-not-so-orphan\\\/\",\"name\":\"SQL Server Tips: Orphan database user but not so orphan... - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-tips-orphan-database-user-but-not-so-orphan\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-tips-orphan-database-user-but-not-so-orphan\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/orphan_user-drop00.png\",\"datePublished\":\"2020-01-21T07:21:05+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0bfb7484ae81c8980fc2b11334f803b\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-tips-orphan-database-user-but-not-so-orphan\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-tips-orphan-database-user-but-not-so-orphan\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-tips-orphan-database-user-but-not-so-orphan\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/orphan_user-drop00.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/orphan_user-drop00.png\",\"width\":1192,\"height\":238},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-tips-orphan-database-user-but-not-so-orphan\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server Tips: Orphan database user but not so orphan&#8230;\"}]},{\"@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 Tips: Orphan database user but not so orphan... - 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-tips-orphan-database-user-but-not-so-orphan\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server Tips: Orphan database user but not so orphan...","og_description":"Beginning of this year, it is good to clean up orphan users in SQL Server databases. Even if this practice must be done regularly throughout the year of course. \ud83d\ude09 During my cleaning day, a new case appears that I never had before and enjoy to share it with you. To find orphan database-users, I [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/","og_site_name":"dbi Blog","article_published_time":"2020-01-21T07:21:05+00:00","og_image":[{"width":1192,"height":238,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user-drop00.png","type":"image\/png"}],"author":"St\u00e9phane Haby","twitter_card":"summary_large_image","twitter_misc":{"Written by":"St\u00e9phane Haby","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/"},"author":{"name":"St\u00e9phane Haby","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b"},"headline":"SQL Server Tips: Orphan database user but not so orphan&#8230;","datePublished":"2020-01-21T07:21:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/"},"wordCount":452,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user-drop00.png","keywords":["Security","SQL Server","SQL Server 2014","SQL Server 2016","Troubleshooting"],"articleSection":["Database Administration &amp; Monitoring","Database management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/","url":"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/","name":"SQL Server Tips: Orphan database user but not so orphan... - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user-drop00.png","datePublished":"2020-01-21T07:21:05+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user-drop00.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/orphan_user-drop00.png","width":1192,"height":238},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-tips-orphan-database-user-but-not-so-orphan\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL Server Tips: Orphan database user but not so orphan&#8230;"}]},{"@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\/13198","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=13198"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/13198\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/13204"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=13198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=13198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=13198"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=13198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}