I hope I can get assistance with this. I had a corrupt version of WSUS 3.0 on a VM Win Server 2012 R2 that was only running IIS and WSUS. I walked through the uninstall process completely from a post from https://ittherapist.net/2013/12/17/how-to-fix-windows-server-2012-and-2012-r2-wsus-post-install-fails-immediately/. I also followed the install process using PowerShell to install WSUS again. Everything worked fine until the post installation taks happened, from which I used Power Shell again.
PS C:\Users\administrator> & 'C:\Program Files\Update Services\Tools\WsusUtil.exe' postinstall contentdir=C:\WSUS
Log file is located at C:\Users\administrator\AppData\Local\Temp\2\tmp94DF.tmp
Post install is starting
Fatal Error: Unable to open the physical file "C:\Windows\WID\Data\SUSDB.mdf". Operating system error 2: "2(The system c
annot find the file specified.)".
Unable to open the physical file "C:\Windows\WID\Data\SUSDB.mdf". Operating system error 2: "2(The system cannot find th
e file specified.)".
Could not restart database "SUSDB". Reverting to the previous status.
ALTER DATABASE statement failed.
File activation failure. The physical file name "C:\Windows\WID\Data\SUSDB_log.ldf" may be incorrect.
File activation failure. The physical file name "C:\Windows\WID\Data\SUSDB_log.ldf" may be incorrect.
PS C:\Users\administrator> & 'C:\Program Files\Update Services\Tools\WsusUtil.exe' postinstall contentdir=C:\WSUS
Log file is located at C:\Users\administrator\AppData\Local\Temp\2\tmp225F.tmp
Post install is starting
Fatal Error: Unable to open the physical file "C:\Windows\WID\Data\SUSDB.mdf". Operating system error 2: "2(The system c
annot find the file specified.)".
Could not restart database "SUSDB". Reverting to the previous status.
ALTER DATABASE statement failed.
File activation failure. The physical file name "C:\Windows\WID\Data\SUSDB_log.ldf" may be incorrect.
PS C:\Users\administrator>
When I go into the directory holding the SUSDBs, they are not there. However, the XML states it found the DBs and they exist. How can that be? I am stuck in the water now trying to get our WSUS working properly with a fresh install again. I do not have the deleted SUSDB files because this is a VM and we only backup MetaData, not disk Images for VM not holding company files. I need to find a way for WSUS to fully create new SUSDBs and log files for this work. Any guidance would
be appreciated.
2016-04-14 09:13:24 Postinstall started
2016-04-14 09:13:24 Detected role services: UI, WidDatabase, Services
2016-04-14 09:13:24 Start: LoadSettingsFromParameters
2016-04-14 09:13:24 Content local is: False
2016-04-14 09:13:24 SQL instname is:
2016-04-14 09:13:24 End: LoadSettingsFromParameters
2016-04-14 09:13:24 Start: Run
2016-04-14 09:13:24 Configuring content directory...
2016-04-14 09:13:24 Configuring groups...
2016-04-14 09:13:24 Starting group configuration for WSUS Administrators...
2016-04-14 09:13:24 Found group in regsitry, attempting to use it...
2016-04-14 09:13:26 Writing group to registry...
2016-04-14 09:13:26 Finished group creation
2016-04-14 09:13:26 Starting group configuration for WSUS Reporters...
2016-04-14 09:13:26 Found group in regsitry, attempting to use it...
2016-04-14 09:13:26 Writing group to registry...
2016-04-14 09:13:26 Finished group creation
2016-04-14 09:13:26 Configuring permissions...
2016-04-14 09:13:27 Fetching content directory...
2016-04-14 09:13:27 Fetching ContentDir from registry store
2016-04-14 09:13:27 Value is C:\Program Files\Update Services
2016-04-14 09:13:27 Fetching group SIDs...
2016-04-14 09:13:27 Fetching WsusAdministratorsSid from registry store
2016-04-14 09:13:27 Value is S-1-5-21-1885657281-318972376-3258134598-1006
2016-04-14 09:13:27 Fetching WsusReportersSid from registry store
2016-04-14 09:13:27 Value is S-1-5-21-1885657281-318972376-3258134598-1007
2016-04-14 09:13:27 Creating group principals...
2016-04-14 09:13:27 Granting directory permissions...
2016-04-14 09:13:27 Granting permissions on content directory...
2016-04-14 09:13:27 Granting registry permissions...
2016-04-14 09:13:27 Granting registry permissions...
2016-04-14 09:13:27 Granting registry permissions...
2016-04-14 09:13:27 Configuring shares...
2016-04-14 09:13:27 Configuring network shares...
2016-04-14 09:13:27 Fetching content directory...
2016-04-14 09:13:27 Fetching ContentDir from registry store
2016-04-14 09:13:27 Value is C:\Program Files\Update Services
2016-04-14 09:13:27 Fetching WSUS admin SID...
2016-04-14 09:13:27 Fetching WsusAdministratorsSid from registry store
2016-04-14 09:13:27 Value is S-1-5-21-1885657281-318972376-3258134598-1006
2016-04-14 09:13:27 Content directory is local, creating content shares...
2016-04-14 09:13:27 Creating share "UpdateServicesPackages" with path "C:\Program Files\Update Services\UpdateServicesPackages" and description "A network share to be used by client systems for collecting all software packages
(usually applications) published on this WSUS system."
2016-04-14 09:13:27 Deleting existing share...
2016-04-14 09:13:27 Creating share...
2016-04-14 09:13:27 Share successfully created
2016-04-14 09:13:27 Creating share "WsusContent" with path "C:\Program Files\Update Services\WsusContent" and description "A network share to be used by Local Publishing to place published content on this WSUS system."
2016-04-14 09:13:27 Deleting existing share...
2016-04-14 09:13:27 Creating share...
2016-04-14 09:13:27 Share successfully created
2016-04-14 09:13:27 Creating share "WSUSTemp" with path "C:\Program Files\Update Services\LogFiles\WSUSTemp" and description "A network share used by Local Publishing from a Remote WSUS Console Instance."
2016-04-14 09:13:27 Deleting existing share...
2016-04-14 09:13:27 Creating share...
2016-04-14 09:13:27 Share successfully created
2016-04-14 09:13:27 Finished creating content shares
2016-04-14 09:13:27 Configuring WID database...
2016-04-14 09:13:27 Configuring the database...
2016-04-14 09:13:27 Establishing DB connection...
2016-04-14 09:13:27 Checking to see if database exists...
2016-04-14 09:13:28 Database exists
2016-04-14 09:13:28 Switching database to single user mode...
2016-04-14 09:13:28 System.Data.SqlClient.SqlException (0x80131904): Unable to open the physical file "C:\Windows\WID\Data\SUSDB.mdf". Operating system error 2: "2(The system cannot find the file specified.)".
Could not restart database "SUSDB". Reverting to the previous status.
ALTER DATABASE statement failed.
File activation failure. The physical file name "C:\Windows\WID\Data\SUSDB_log.ldf" may be incorrect.
at Microsoft.UpdateServices.DatabaseAccess.DBConnection.DrainObsoleteConnections(SqlException e)
at Microsoft.UpdateServices.DatabaseAccess.DBConnection.ExecuteCommandNoResult()
at Microsoft.UpdateServices.Administration.ConfigureDB.ConnectToDB()
at Microsoft.UpdateServices.Administration.ConfigureDB.Configure()
at Microsoft.UpdateServices.Administration.PostInstall.Run()
at Microsoft.UpdateServices.Administration.PostInstall.Execute(String[] arguments)
ClientConnectionId:863e187a-8e23-4875-a6d7-207959d0ff4b
Error Number:5120,State:101,Class:16