locked
Cannot install WSUS on brand new installation of 2012 R2 RRS feed

  • Question

  • As title says gents I am unable to install WSUS on this server. Fresh install and updated R2 version of 2012. Post installations tasks fail every time. This is using WID for the database. I have trolled the internet looking for a solution and have found many threads but none of them have given me a solution.

    Don't understand how software out of the box doesn't install as a role? Used to work easily when installed as a third party unit on older versions of Windows Server.

    Here is my log

    2017-03-15 18:46:11  Postinstall started
    2017-03-15 18:46:11  Detected role services: Api, UI, WidDatabase, Services
    2017-03-15 18:46:11  Start: LoadSettingsFromXml
    2017-03-15 18:46:11  Start: GetConfigValue with filename=UpdateServices-Services.xml item=ContentLocal
    2017-03-15 18:46:11  Value is true
    2017-03-15 18:46:11  End: GetConfigValue
    2017-03-15 18:46:11  Start: GetConfigValue with filename=UpdateServices-Services.xml item=ContentDirectory
    2017-03-15 18:46:11  Value is E:\WSUS
    2017-03-15 18:46:11  End: GetConfigValue
    2017-03-15 18:46:11  Content directory is E:\WSUS
    2017-03-15 18:46:11  Database roleservice is not installed
    2017-03-15 18:46:11  End: LoadSettingsFromXml
    Post install is starting
    2017-03-15 18:46:11  Start: Run
    2017-03-15 18:46:11  Fetching WsusAdministratorsSid from registry store
    2017-03-15 18:46:11  Value is S-1-5-21-2813285187-1005631972-928393512-1010
    2017-03-15 18:46:11  Fetching WsusReportersSid from registry store
    2017-03-15 18:46:11  Value is S-1-5-21-2813285187-1005631972-928393512-1011
    2017-03-15 18:46:11  Configuring content directory...
    2017-03-15 18:46:11  Configuring groups...
    2017-03-15 18:46:11  Starting group configuration for WSUS Administrators...
    2017-03-15 18:46:11  Found group in regsitry, attempting to use it...
    2017-03-15 18:46:14  Writing group to registry...
    2017-03-15 18:46:14  Finished group creation
    2017-03-15 18:46:14  Starting group configuration for WSUS Reporters...
    2017-03-15 18:46:14  Found group in regsitry, attempting to use it...
    2017-03-15 18:46:14  Writing group to registry...
    2017-03-15 18:46:14  Finished group creation
    2017-03-15 18:46:14  Configuring permissions...
    2017-03-15 18:46:14  Fetching content directory...
    2017-03-15 18:46:14  Fetching ContentDir from registry store
    2017-03-15 18:46:14  Value is E:\WSUS
    2017-03-15 18:46:14  Fetching group SIDs...
    2017-03-15 18:46:14  Fetching WsusAdministratorsSid from registry store
    2017-03-15 18:46:14  Value is S-1-5-21-2813285187-1005631972-928393512-1010
    2017-03-15 18:46:14  Fetching WsusReportersSid from registry store
    2017-03-15 18:46:14  Value is S-1-5-21-2813285187-1005631972-928393512-1011
    2017-03-15 18:46:14  Creating group principals...
    2017-03-15 18:46:14  Granting directory permissions...
    2017-03-15 18:46:14  Granting permissions on content directory...
    2017-03-15 18:46:14  Granting registry permissions...
    2017-03-15 18:46:14  Granting registry permissions...
    2017-03-15 18:46:14  Granting registry permissions...
    2017-03-15 18:46:14  Configuring shares...
    2017-03-15 18:46:14  Configuring network shares...
    2017-03-15 18:46:14  Fetching content directory...
    2017-03-15 18:46:14  Fetching ContentDir from registry store
    2017-03-15 18:46:14  Value is E:\WSUS
    2017-03-15 18:46:14  Fetching WSUS admin SID...
    2017-03-15 18:46:14  Fetching WsusAdministratorsSid from registry store
    2017-03-15 18:46:14  Value is S-1-5-21-2813285187-1005631972-928393512-1010
    2017-03-15 18:46:14  Content directory is local, creating content shares...
    2017-03-15 18:46:14  Creating share "UpdateServicesPackages" with path "E:\WSUS\UpdateServicesPackages" and description "A network share to be used by client systems for collecting all software packages (usually applications) published on this WSUS system."
    2017-03-15 18:46:14  Deleting existing share...
    2017-03-15 18:46:14  Creating share...
    2017-03-15 18:46:14  Share successfully created
    2017-03-15 18:46:14  Creating share "WsusContent" with path "E:\WSUS\WsusContent" and description "A network share to be used by Local Publishing to place published content on this WSUS system."
    2017-03-15 18:46:14  Deleting existing share...
    2017-03-15 18:46:14  Creating share...
    2017-03-15 18:46:14  Share successfully created
    2017-03-15 18:46:14  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."
    2017-03-15 18:46:14  Deleting existing share...
    2017-03-15 18:46:14  Creating share...
    2017-03-15 18:46:14  Share successfully created
    2017-03-15 18:46:14  Finished creating content shares
    2017-03-15 18:46:14  Stopping service WSUSService
    2017-03-15 18:46:15  Stopping service W3SVC
    2017-03-15 18:46:17  Configuring WID database...
    2017-03-15 18:46:17  Configuring the database...
    2017-03-15 18:46:17  Establishing DB connection...
    2017-03-15 18:46:17  Checking to see if database exists...
    2017-03-15 18:46:17  Database exists
    2017-03-15 18:46:17  Switching database to single user mode...
    2017-03-15 18:46:21  Loading install type query...
    2017-03-15 18:46:22  DECLARE @currentDBVersion       int
    DECLARE @scriptMajorVersion     int = (9600)
    DECLARE @scriptMinorVersion     int = (16384)
    DECLARE @databaseMajorVersion   int
    DECLARE @databaseMinorVersion   int
    DECLARE @databaseBuildNumber    nvarchar(10)
    IF NOT EXISTS(SELECT * FROM sys.databases WHERE name='SUSDB')
    BEGIN
        SELECT 1
    END
    ELSE
    BEGIN
        SET @currentDBVersion = (SELECT SchemaVersion FROM SUSDB.dbo.tbSchemaVersion WHERE ComponentName = 'CoreDB')
        SET @databaseBuildNumber = (SELECT BuildNumber FROM SUSDB.dbo.tbSchemaVersion WHERE ComponentName = 'CoreDB')
        DECLARE @delimiterPosition INT = CHARINDEX('.', @databaseBuildNumber)
        IF (@delimiterPosition = 0)
        BEGIN
            RAISERROR('Invalid schema version number', 16, 1) with nowait
            return
        END
        SET @databaseMajorVersion = SUBSTRING(@databaseBuildNumber, 1, @delimiterPosition - 1)
        SET @databaseMinorVersion = SUBSTRING(@databaseBuildNumber, (@delimiterPosition + 1), (10 - @delimiterPosition))
        IF @currentDBVersion < 926
        BEGIN
            SELECT 3
        END
        ELSE
        BEGIN
            IF (@scriptMajorVersion > @databaseMajorVersion OR
               (@scriptMajorVersion = @databaseMajorVersion AND @scriptMinorVersion > @databaseMinorVersion))
            BEGIN
                SELECT 2
            END
            ELSE IF (@scriptMajorVersion = @databaseMajorVersion AND
                     @scriptMinorVersion = @databaseMinorVersion)
            BEGIN
                SELECT 0
            END
            ELSE
            BEGIN
                SELECT 4
            END
        END
    END

    2017-03-15 18:46:22  Install type is: Reinstall
    2017-03-15 18:46:22  Creating logins...
    2017-03-15 18:46:22  Fetching account info for S-1-5-20
    2017-03-15 18:46:22  Found principal
    2017-03-15 18:46:22  Found account
    2017-03-15 18:46:22  Got binary SID
    2017-03-15 18:46:22  Fetching WsusAdministratorsSid from registry store
    2017-03-15 18:46:22  Value is S-1-5-21-2813285187-1005631972-928393512-1010
    2017-03-15 18:46:22  Fetching account info for S-1-5-21-2813285187-1005631972-928393512-1010
    2017-03-15 18:46:22  Found principal
    2017-03-15 18:46:22  Found account
    2017-03-15 18:46:22  Got binary SID
    2017-03-15 18:46:22  Setting content location...
    2017-03-15 18:46:22  Fetching ContentDir from registry store
    2017-03-15 18:46:22  Value is E:\WSUS
    2017-03-15 18:46:22  Swtching DB to multi-user mode......
    2017-03-15 18:46:25  Finished setting multi-user mode
    2017-03-15 18:46:25  Writing DB settings to registry...
    2017-03-15 18:46:25  Marking PostInstall done for UpdateServices-WidDatabase in the registry...
    2017-03-15 18:46:25  Starting service W3SVC
    2017-03-15 18:46:26  Configuring IIS...
    2017-03-15 18:46:26  Start: ConfigureWebsite
    2017-03-15 18:46:27  Configuring website on port 8530
    2017-03-15 18:47:41  2017-03-15 18:46:44  Info      IISCustomAction    Performing Setup Action, Command /Install
    2017-03-15 18:47:38  Info      IISCustomAction    Command /Install Succeeded

    2017-03-15 18:47:41  End: ConfigureWebsite
    2017-03-15 18:47:41  Configuring performance counters...
    2017-03-15 18:47:41  Configuring Stats.NET perf counter...
    2017-03-15 18:47:41  Configuring reporting perf counter...
    2017-03-15 18:47:41  Configuring client webservice perf counter...
    2017-03-15 18:47:41  Configuring server sync webservice perf counter...
    2017-03-15 18:47:41  Configuring API remoting perf counter...
    2017-03-15 18:47:41  Bringing services online...
    2017-03-15 18:47:41  Checking initialization status...
    2017-03-15 18:47:42  StartServer starting...
    2017-03-15 18:47:42  Generating encryption key to write to the registry...
    2017-03-15 18:47:42  Generating encryption key to write to the database...
    2017-03-15 18:47:42  Generating encryption key succeeded...
    2017-03-15 18:47:42  Setting WSUSService to autostart...
    2017-03-15 18:47:42  WSUSService is set to autostart.
    2017-03-15 18:47:42  Starting WSUSService...
    2017-03-15 18:47:42  WSUSService is now started.
    2017-03-15 18:47:42  Importing default detectoids.
    2017-03-15 18:47:42  Importing CriticalUpdates.xml...
    2017-03-15 18:47:44  ImportDefaultDetectoids failed. Exception: System.Data.SqlClient.SqlException (0x80131904): The INSERT statement conflicted with the FOREIGN KEY constraint "FK__tbDeploym__Targe__38EE7070". The conflict occurred in database "SUSDB", table "dbo.tbTargetGroup", column 'TargetGroupID'.
    Failed to deploy update E6CF1350-C01B-414D-A61F-263D14D133B4\1 to downstream server target group
    Warning: The join order has been enforced because a local join hint is used.
    Warning: The join order has been enforced because a local join hint is used.
    Warning: The join order has been enforced because a local join hint is used.
    Warning: The join order has been enforced because a local join hint is used.
    Warning: The join order has been enforced because a local join hint is used.
    Warning: The join order has been enforced because a local join hint is used.
    Warning: The join order has been enforced because a local join hint is used.
    The statement has been terminated.
       at Microsoft.UpdateServices.DatabaseAccess.DBConnection.DrainObsoleteConnections(SqlException e)
       at Microsoft.UpdateServices.DatabaseAccess.DBConnection.ExecuteCommandNoResult()
       at Microsoft.UpdateServices.Internal.DatabaseAccess.CommonDataAccess.ExecuteSPImportUpdate(Int32 upstreamServerLocalId, String xmlUpdateBlob, Byte[] xmlUpdateBlobCompressed, Int32& localRevisionId)
       at Microsoft.UpdateServices.Internal.DatabaseAccess.CommonDataAccess.ImportUpdate(Int32 ussRevLocalId, String xmlUpdateBlob, Byte[] xmlUpdateBlobCompressed, String xmlSdpBlob, Int32& localRevisionId)
       at Microsoft.UpdateServices.Internal.DatabaseAccess.CommonDataAccess.ImportUpdate(Int32 ussRevLocalId, String xmlUpdateBlob, Byte[] xmlUpdateBlobCompressed)
       at Microsoft.UpdateServices.Setup.StartServer.StartServer.ImportDefaultDetectoids()
    ClientConnectionId:17726c62-10f9-4d99-b852-22382d5499f2
    2017-03-15 18:47:44  StartServer encountered errors. Exception=The INSERT statement conflicted with the FOREIGN KEY constraint "FK__tbDeploym__Targe__38EE7070". The conflict occurred in database "SUSDB", table "dbo.tbTargetGroup", column 'TargetGroupID'.
    Failed to deploy update E6CF1350-C01B-414D-A61F-263D14D133B4\1 to downstream server target group
    Warning: The join order has been enforced because a local join hint is used.
    Warning: The join order has been enforced because a local join hint is used.
    Warning: The join order has been enforced because a local join hint is used.
    Warning: The join order has been enforced because a local join hint is used.
    Warning: The join order has been enforced because a local join hint is used.
    Warning: The join order has been enforced because a local join hint is used.
    Warning: The join order has been enforced because a local join hint is used.
    The statement has been terminated.
    2017-03-15 18:47:44  Microsoft.UpdateServices.Administration.CommandException: Failed to start and configure the WSUS service
       at Microsoft.UpdateServices.Administration.PostInstall.Run()
       at Microsoft.UpdateServices.Administration.PostInstall.Execute(String[] arguments)
    Fatal Error: Failed to start and configure the WSUS service



    • Edited by ETOAV Thursday, March 16, 2017 3:44 PM
    Thursday, March 16, 2017 3:43 PM

All replies

  • Hi  ETOAV,
    >2017-03-15 18:46:17  Checking to see if database exists...
    >2017-03-15 18:46:17  Database exists

    >2017-03-15 18:46:22  Install type is: Reinstall

    >2017-03-15 18:47:44  StartServer encountered errors. Exception=The INSERT statement conflicted with the FOREIGN KEY constraint "FK__tbDeploym__Targe__38EE7070". The conflict occurred in database "SUSDB", table "dbo.tbTargetGroup", column 'TargetGroupID'.
    Failed to deploy update E6CF1350-C01B-414D-A61F-263D14D133B4\1 to downstream server target group

    In this post-installation tmp file, looks like the original SUSDB is not removed, and it is a reinstall. Do you re-install the WSUS role or not the first time try to install WSUS role.

    If yes, please remove WSUS components completely and re-install again:

    1. Remove WSUS role;

    2. Remove WSUS content folder, WSUS site in IIS, SUSDB.mdf and SUSDB_log.ldf (C:\Windows\WID\Data);

    3. After removing the above things, also install SQL server management studio 2012 to ensure the SUSDB is really removed, use \\.\pipe\MICROSOFT##WID\tsql\query to connect to WID.

    4. Then, re-install WSUS role again and check the result.

    Best Regards,

    Anne


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, March 17, 2017 6:01 AM
  • Hi, Thanks for the reply. I have tried many times to install this. The first time it failed also. This server was only built a short time ago and has never had WSUS on it. So making sure the previous failed installation has been removed won't fix it I imagine but I'll go through the motions you listed.
    Friday, March 17, 2017 12:52 PM
  • I followed your instrccutions and as I suspected it failed once again. Here is the log

    2017-03-18 11:09:41  Postinstall started
    2017-03-18 11:09:41  Detected role services: Api, UI, WidDatabase, Services
    2017-03-18 11:09:41  Start: LoadSettingsFromXml
    2017-03-18 11:09:41  Start: GetConfigValue with filename=UpdateServices-Services.xml item=ContentLocal
    2017-03-18 11:09:41  Value is true
    2017-03-18 11:09:41  End: GetConfigValue
    2017-03-18 11:09:41  Start: GetConfigValue with filename=UpdateServices-Services.xml item=ContentDirectory
    2017-03-18 11:09:41  Value is E:\WSUS
    2017-03-18 11:09:41  End: GetConfigValue
    2017-03-18 11:09:41  Content directory is E:\WSUS
    2017-03-18 11:09:41  Database roleservice is not installed
    2017-03-18 11:09:41  End: LoadSettingsFromXml
    Post install is starting
    2017-03-18 11:09:41  Start: Run
    2017-03-18 11:09:41  Fetching WsusAdministratorsSid from registry store
    2017-03-18 11:09:41  Value is S-1-5-21-2813285187-1005631972-928393512-1010
    2017-03-18 11:09:41  Fetching WsusReportersSid from registry store
    2017-03-18 11:09:41  Value is S-1-5-21-2813285187-1005631972-928393512-1011
    2017-03-18 11:09:52  Configuring content directory...
    2017-03-18 11:09:52  Configuring groups...
    2017-03-18 11:09:52  Starting group configuration for WSUS Administrators...
    2017-03-18 11:09:52  Found group in regsitry, attempting to use it...
    2017-03-18 11:09:55  Writing group to registry...
    2017-03-18 11:09:55  Finished group creation
    2017-03-18 11:09:55  Starting group configuration for WSUS Reporters...
    2017-03-18 11:09:55  Found group in regsitry, attempting to use it...
    2017-03-18 11:09:55  Writing group to registry...
    2017-03-18 11:09:55  Finished group creation
    2017-03-18 11:09:55  Configuring permissions...
    2017-03-18 11:09:55  Fetching content directory...
    2017-03-18 11:09:55  Fetching ContentDir from registry store
    2017-03-18 11:09:55  Value is E:\WSUS
    2017-03-18 11:09:55  Fetching group SIDs...
    2017-03-18 11:09:55  Fetching WsusAdministratorsSid from registry store
    2017-03-18 11:09:55  Value is S-1-5-21-2813285187-1005631972-928393512-1010
    2017-03-18 11:09:55  Fetching WsusReportersSid from registry store
    2017-03-18 11:09:55  Value is S-1-5-21-2813285187-1005631972-928393512-1011
    2017-03-18 11:09:55  Creating group principals...
    2017-03-18 11:09:55  Granting directory permissions...
    2017-03-18 11:09:55  Granting permissions on content directory...
    2017-03-18 11:09:55  Granting registry permissions...
    2017-03-18 11:09:55  Granting registry permissions...
    2017-03-18 11:09:55  Granting registry permissions...
    2017-03-18 11:09:55  Configuring shares...
    2017-03-18 11:09:55  Configuring network shares...
    2017-03-18 11:09:55  Fetching content directory...
    2017-03-18 11:09:55  Fetching ContentDir from registry store
    2017-03-18 11:09:55  Value is E:\WSUS
    2017-03-18 11:09:55  Fetching WSUS admin SID...
    2017-03-18 11:09:55  Fetching WsusAdministratorsSid from registry store
    2017-03-18 11:09:55  Value is S-1-5-21-2813285187-1005631972-928393512-1010
    2017-03-18 11:09:55  Content directory is local, creating content shares...
    2017-03-18 11:09:55  Creating share "UpdateServicesPackages" with path "E:\WSUS\UpdateServicesPackages" and description "A network share to be used by client systems for collecting all software packages (usually applications) published on this WSUS system."
    2017-03-18 11:09:55  Creating share...
    2017-03-18 11:09:55  Share successfully created
    2017-03-18 11:09:55  Creating share "WsusContent" with path "E:\WSUS\WsusContent" and description "A network share to be used by Local Publishing to place published content on this WSUS system."
    2017-03-18 11:09:55  Creating share...
    2017-03-18 11:09:55  Share successfully created
    2017-03-18 11:09:55  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."
    2017-03-18 11:09:55  Deleting existing share...
    2017-03-18 11:09:55  Creating share...
    2017-03-18 11:09:55  Share successfully created
    2017-03-18 11:09:55  Finished creating content shares
    2017-03-18 11:09:55  Stopping service WSUSService
    2017-03-18 11:09:55  Stopping service W3SVC
    2017-03-18 11:09:55  Configuring WID database...
    2017-03-18 11:09:55  Configuring the database...
    2017-03-18 11:09:56  Establishing DB connection...
    2017-03-18 11:09:56  Checking to see if database exists...
    2017-03-18 11:09:56  Database exists
    2017-03-18 11:09:56  Switching database to single user mode...
    2017-03-18 11:09:56  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.)".
    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.
    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.ConfigureDB.Run(String instanceName, Action`1 logWriter, Boolean contentLocal)
       at Microsoft.UpdateServices.Administration.PostInstall.Run()
       at Microsoft.UpdateServices.Administration.PostInstall.Execute(String[] arguments)
    ClientConnectionId:b01e3be8-28e7-4fe2-bda1-dcbebfd7d2e1
    Error Number:5120,State:101,Class:16
    Fatal Error: Unable to open the physical file "C:\Windows\WID\Data\SUSDB.mdf". Operating system error 2: "2(The system cannot 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 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.
    File activation failure. The physical file name "C:\Windows\WID\Data\SUSDB_log.ldf" may be incorrect.


    Saturday, March 18, 2017 8:48 PM
  • looks like SUSDB is still configured (attached) within WID but the actual underlying files are missing or damaged or incomplete.

    open SSMS (run as admin) and properly detach the SUSDB.

    then, re-run WSUS postinstall to re-create+attach SUSDB


    Don [doesn't work for MSFT, and they're probably glad about that ;]

    Sunday, March 19, 2017 12:34 AM
  • Hi ETOAV,

    Please provide a screenshot of the SQL server studio management 2012 with connecting to the WID.

    Best Regards,

    Anne


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, March 20, 2017 5:54 AM
  • I've never used SQL server before so I don't know if this is correct. But this is the error I get.

    Just to repeat, the WSUS never installed correctly after a clean install of Windows 2012 server r2 on a new VNWare server. There is nothing left over from a previous WSUS server, only maybe remnants of a failed installation.

    I'm currently unable to upload images but here is the text. I assume this means nothing is installed?

    TITLE: Connect to Database Engine
    ------------------------------

    Cannot connect to \\.\pipe\MICROSOFT##WID\tsql\query.

    ------------------------------
    ADDITIONAL INFORMATION:

    Login failed for user 'AVIVA\admin'. (Microsoft SQL Server, Error: 18456)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476

    ------------------------------
    BUTTONS:

    OK
    ------------------------------

    Tuesday, March 21, 2017 12:52 PM
  • your attempt to connect to WID with SSMS failed.

    when you execute SSMS, you need to run-as-admin (elevate). This is required if you are using a different account from when WID was installed. I just elevate SSMS anyway, that way I don't have to remember which account was used to install WID.

    Or, you don't have Windows Auth enabled for the SQL instance (which would be strange if you are using WID)

    https://msdn.microsoft.com/en-us/library/cc645917.aspx

    http://stackoverflow.com/questions/20923015/login-to-microsoft-sql-server-error-18456


    Don [doesn't work for MSFT, and they're probably glad about that ;]

    Tuesday, March 21, 2017 8:24 PM
  • I appreciate all of the help, but I feel like we are chasing our tails. The first time I installed Server 2012. I ran updates and then attempted to install WSUS. First time it failed. So all of this stuff that is still configured is from the first failed installation. It would seem there is an issue out of the box with Server 2012 and WSUS.

    I've installed it on other servers in the past in different companies without these errors.

    Wednesday, March 22, 2017 2:29 PM
  • OK I ran the Management Studio. I could see the SUSDB in databases but was unable to open it. When I right clicked and selected delete I got this message. I assume this is because I deleted it from the original folder.

    TITLE: Microsoft SQL Server Management Studio
    ------------------------------

    Drop failed for Database 'SUSDB'.  (Microsoft.SqlServer.Smo)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=13.0.16106.4+((SSMS_Rel_16_5).170125-2137)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+Database&LinkId=20476

    ------------------------------
    ADDITIONAL INFORMATION:

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

    ------------------------------

    Unable to open the physical file "C:\Windows\WID\Data\SUSDB.mdf". Operating system error 2: "2(The system cannot find the file specified.)".
    File activation failure. The physical file name "C:\Windows\WID\Data\SUSDB_log.ldf" may be incorrect. (Microsoft SQL Server, Error: 5120)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.2100&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476

    ------------------------------
    BUTTONS:

    OK
    ------------------------------

    Wednesday, March 22, 2017 2:38 PM
  • OK I ran the Management Studio. I could see the SUSDB in databases but was unable to open it. When I right clicked and selected delete I got this message. I assume this is because I deleted it from the original folder.

    TITLE: Microsoft SQL Server Management Studio
    ------------------------------

    Drop failed for Database 'SUSDB'.  (Microsoft.SqlServer.Smo)
    ------------------------------

    Unable to open the physical file "C:\Windows\WID\Data\SUSDB.mdf". Operating system error 2: "2(The system cannot find the file specified.)".
    File activation failure. The physical file name "C:\Windows\WID\Data\SUSDB_log.ldf" may be incorrect. (Microsoft SQL Server, Error: 5120)

    Yes, I agree. This goop from SSMS is basically saying exactly that.
    The SUSDB is still 'defined/referenced' within SQL (in the master db) but the actual files for SUSDB are deleted. So there's basically an invalid 'pointer' which needs to be cleaned up.

    That's what I meant, when I earlier said 'you need to detach the db' (which is the DROP command)(you should be able to use SSMS GUI/menu to detach/drop, but the below is the T-SQL equivalent)

    USE master
    GO
    DROP DATABASE SUSDB
    GO

    That should succeed. Then you can quite SSMS and now go execute wsusutil /postinstall again and that should re-create+attach the freshly created SUSDB for you, and implant all the stored_procs and everything else (populate the SUSDB)


    Don [doesn't work for MSFT, and they're probably glad about that ;]


    Wednesday, March 22, 2017 8:23 PM
  • Hi ETOAV,

    I would agree with DonPick.

    Best Regards,

    Anne


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, March 23, 2017 9:21 AM
  • I'll try that. However do you have any idea why it failed the first time? Having cleared all this out I'll be back to where I was when I built this server, so it's probably going to fail again no?

    Is there an existent issue with WSUS on this platform? I have never had this trouble before.

    Thursday, March 23, 2017 2:47 PM
  • OK I have removed that database snapshot. I would imagine if I am ready to try again the same result will occur as I am now back to fresh installation status.

    Is there anything else left to do before I try to start the install again?

    Thursday, March 23, 2017 3:42 PM
  • OK I have removed that database snapshot. I would imagine if I am ready to try again the same result will occur as I am now back to fresh installation status.

    Is there anything else left to do before I try to start the install again?

    from your log, when you opened this thread, it seems that something had already gone wrong, but we don't have any information about that. (of course, if nothing had gone wrong, you wouldn't be here anyway... ;)

    2017-03-15 18:46:17  Checking to see if database exists...
    2017-03-15 18:46:17  Database exists
    2017-03-15 18:46:17  Switching database to single user mode...

    2017-03-15 18:46:22  Install type is: Reinstall
    2017-03-15 18:46:22  Creating logins...
    2017-03-15 18:46:22  Setting content location...
    2017-03-15 18:46:22  Fetching ContentDir from registry store
    2017-03-15 18:46:22  Value is E:\WSUS
    2017-03-15 18:46:22  Swtching DB to multi-user mode......
    2017-03-15 18:46:25  Finished setting multi-user mode
    2017-03-15 18:46:25  Writing DB settings to registry...
    2017-03-15 18:46:25  Marking PostInstall done for UpdateServices-WidDatabase in the registry...


    2017-03-15 18:47:42  Starting WSUSService...
    2017-03-15 18:47:42  WSUSService is now started.
    2017-03-15 18:47:42  Importing default detectoids.
    2017-03-15 18:47:42  Importing CriticalUpdates.xml...
    2017-03-15 18:47:44  ImportDefaultDetectoids failed. Exception:

    So it's hard to say if you will or won't have further troubles.
    It might have been some glitch during original windows setup, or when adding the role/feature, or some conflict with some other process running at the time (eg any other product/software installation running concurrently, or some security product interfering??)


    Don [doesn't work for MSFT, and they're probably glad about that ;]

    Thursday, March 23, 2017 9:01 PM
  • OK I have removed that database snapshot. I would imagine if I am ready to try again the same result will occur as I am now back to fresh installation status.

    Is there anything else left to do before I try to start the install again?

    Just try the reinstallation.

    Best Regards,

    Anne


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, March 24, 2017 9:15 AM
  • Hi, that wasn't the first time I had tried that's why. I had tried 3-4 times before I came here. The first time I tried was days after I built the server. First time it failed. I have found other threads online with people experiencing the same issues with this failing but their fixes did not help me.


    In fact I tried it on two servers that I had just added to my domain. The second was earmarked to be a DC. It failed on both right out of the box.
    • Edited by ETOAV Friday, March 24, 2017 12:16 PM
    Friday, March 24, 2017 12:14 PM
  • OK ladies and Gents, my WSUS has finally installed. My goodness what a drama. Not sure why it failed the first time as I did the exact same installation procedure that time as I just did today.

    Anyway thank you for all your help, although I can't pinpoint what exactly was different so I'm not sure of the resolution if anyone else is reading this looking for a fix for the same issue.

    Friday, March 24, 2017 6:08 PM
  • Hi ETOAV,

    Really glad to hear you have figured it out finally. Then you may mark useful information in this post as answer, so that this post can be closed. Cheers!

    Best Regards,

    Anne


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, March 28, 2017 8:54 AM