{"id":5161,"date":"2018-01-21T22:48:52","date_gmt":"2018-01-21T21:48:52","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=5161"},"modified":"2018-01-22T12:27:45","modified_gmt":"2018-01-22T11:27:45","slug":"windows-reset-wsus-and-recreate-susdb","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/windows-reset-wsus-and-recreate-susdb\/","title":{"rendered":"Windows: Reset WSUS and recreate SUSDB"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_5161 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_5161')){$('.twoclick_social_bookmarks_post_5161').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Windows%3A%20Reset%20WSUS%20and%20recreate%20SUSDB\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Ahere%20are%20the%20steps%20if%20you%20have%20installed%20WSUS%20on%20Server%202012R2%20on%20the%20Windows%20Internal%20Database%20to%20reset%20the%20Database%20and%20WSUS%20itself.%0D%0A%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/windows-reset-wsus-and-recreate-susdb\\\/\",\"post_id\":5161,\"post_title_referrer_track\":\"Windows%3A+Reset+WSUS+and+recreate+SUSDB\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>here are the steps if you have installed WSUS on Server 2012R2 on the Windows Internal Database to reset the Database and WSUS itself.<br \/>\n<!--https:\/\/blogs.technet.microsoft.com\/sus\/2016\/10\/18\/recreating-the-susdb-and-wsus-content-folder-for-a-windows-server-2012-based-wsus-computer\/--><br \/>\n<!--more--><br \/>\nInstall the Microsoft SQL 2012 Management Studio.<br \/>\n<figure id=\"attachment_5173\" aria-describedby=\"caption-attachment-5173\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2018\/01\/WSUS-SQL-ManagementStudio.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2018\/01\/WSUS-SQL-ManagementStudio-300x250.png\" alt=\"Install SQL-Management Studio\" width=\"300\" height=\"250\" class=\"size-medium wp-image-5173\" srcset=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2018\/01\/WSUS-SQL-ManagementStudio-300x250.png 300w, https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2018\/01\/WSUS-SQL-ManagementStudio.png 529w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-5173\" class=\"wp-caption-text\">Install SQL-Management Studio<\/figcaption><\/figure><br \/>\nDetermine the SQL Server String, Database name and the WSUS Content Directory <\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nc:\\&gt; reg query &quot;HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Update Services\\Server\\Setup&quot; \/v SqlServerName\r\n    SqlServerName    REG_EXPAND_SZ    MICROSOFT##WID\r\nc:\\&gt; reg query &quot;HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Update Services\\Server\\Setup&quot; \/v SqlDatabaseName\r\n    SqlDatabaseName    REG_SZ    SUSDB\r\nc:\\&gt; reg query &quot;HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Update Services\\Server\\Setup&quot; \/v ContentDir\r\n    ContentDir    REG_EXPAND_SZ    D:\\WSUS\r\n<\/pre>\n<p>Stop all WSUS related services (World Wide Web Publishing Service, WSUS Certificate Server and WSUS Service)<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nc:\\&gt; net stop W3SVC\r\nc:\\&gt; net stop WsusService\r\nc:\\&gt; net stop WSusCertServer\r\n<\/pre>\n<p>Start SQL Management Studio as Administrator (right click) and<br \/>\nConnect to the  Windows internal Database through the named pipe \\\\.\\pipe\\Microsoft##WID\\tsql\\query<br \/>\n<figure id=\"attachment_5174\" aria-describedby=\"caption-attachment-5174\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2018\/01\/WSUS-SQL-ManagementStudio-Connect.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2018\/01\/WSUS-SQL-ManagementStudio-Connect-300x128.png\" alt=\"Connect to Windows internal Database  by SQL-Management Studio\" width=\"300\" height=\"128\" class=\"size-medium wp-image-5174\" srcset=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2018\/01\/WSUS-SQL-ManagementStudio-Connect-300x128.png 300w, https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2018\/01\/WSUS-SQL-ManagementStudio-Connect.png 421w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-5174\" class=\"wp-caption-text\">Connect to Windows internal Database  by SQL-Management Studio<\/figcaption><\/figure><br \/>\nAnd delete the SUSDB<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nALTER DATABASE SUSDB\r\nSET OFFLINE WITH ROLLBACK IMMEDIATE;\r\nDROP DATABASE SUSDB;\r\n<\/pre>\n<p>Delete the Database files<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nc:\\&gt; del \/Q C:\\Windows\\WID\\Data\\SUSDB.*\r\nc:\\&gt; del \/Q C:\\Windows\\WID\\Data\\SUSDB_*.*\r\n<\/pre>\n<p>Remove the existing Content Dirctory<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nc:\\&gt; rmdir \/Q \/S D:\\WSUS\r\n<\/pre>\n<p>Reconfigure WSUS, Create SUSDB and a new content Directory<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nc:\\&gt; &quot;C:\\Program Files\\Update Services\\Tools\\wsusutil.exe&quot; postinstall CONTENT_DIR=&quot;D:\\WSUS&quot;\r\n<\/pre>\n<p>If the error &#8220;Fatal Error: Failed to start and configure the WSUS service&#8221; occured try to start the WSUS Service manually<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nc:\\&gt; net start WsusService\r\nc:\\&gt; net start WSusCertServer\r\n<\/pre>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, here are the steps if you have installed WSUS on Server 2012R2 on the Windows Internal Database to reset the Database and WSUS itself.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[174,684,20,1139,532],"class_list":["post-5161","post","type-post","status-publish","format-standard","hentry","category-windowsknowhow","tag-reset","tag-susdb","tag-windows-2","tag-windows-update-service","tag-wsus"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=5161"}],"version-history":[{"count":13,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5161\/revisions"}],"predecessor-version":[{"id":5177,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5161\/revisions\/5177"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=5161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=5161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=5161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}