locked
WSUS log error 'The schema version of DB is from a newer ver. Win Server 16 DataCenter, Sql '12, SCCM '12 RRS feed

  • Question

  • Hi All,

    Thanks in advance for your help.

    First thing ill note is, everything is freshly installed.  Here's my setup and add'l info below:

    -Using VMware Fusion 14 pro to host  Win '16 server datacenter VM

    -SCCM '12 SP2 (console ver# 5.00.8239.1000)

    -SQL '12 standad ver# 11.0.3128.0 (Not clustered, no HADR)

    -OS has all the latest updates, no updates pending. (manually installed Cumulative update 1809 for win '16)

    When I initially and successfully installed the WSUS role (Note: Not installing WID but SQL connectivity, and I connected to my separate SQL database instance successfully) and ran the post-installation tasks, it failed.  The log error was 'The schema version of the database is from a newer version of WSUS than currently installed. You must either patch your WSUS  server to at least that version or drop the database.' 

    Here's how I attempted to troubleshoot after multiple uninstall and re-installation of WSUS after uninstalling my SUP:  

    -Uninstalled WSUS

    -Deleted SUSDB from SQL database

    -Reinstalled WSUS, post install tasks still unsuccessful with same error

    -Installed all OS updates

    -Installed WSUS again, ran post install tasks with same error.

    -Attempted to install WSUS updates [KB4091664, KB4457131, and various SP updates] to no avail.

    Below is the log:

    <rc-c2d-number data-rc-number="2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  Postinstall started
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  Detected role services: Api, Database, UI, Services
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  Start: LoadSettingsFromXml
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  Start: GetConfigValue with filename=UpdateServices-Services.xml item=ContentLocal
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  Value is false
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  End: GetConfigValue
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  Hosting content on MU
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  Start: GetConfigValue with filename=UpdateServices-DB.xml item=InstanceName
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  Value is EXAMPLE\TF_WSUS
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  End: GetConfigValue
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  SQL instance name is SCCM2012\TF_WSUS
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  End: LoadSettingsFromXml
    Post install is starting
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  Start: Run
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  Fetching WsusAdministratorsSid from registry store
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  Value is S-1-5<rc-c2d-number data-rc-number="-21-2522978924">-21-2522978924</rc-c2d-number><rc-c2d-number data-rc-number="-2782523748">-2782523748</rc-c2d-number><rc-c2d-number data-rc-number="-485567411">-485567411</rc-c2d-number>-1003
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  Fetching WsusReportersSid from registry store
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:06:48  Value is S-1-5<rc-c2d-number data-rc-number="-21-2522978924">-21-2522978924</rc-c2d-number><rc-c2d-number data-rc-number="-2782523748">-2782523748</rc-c2d-number><rc-c2d-number data-rc-number="-485567411">-485567411</rc-c2d-number>-1004
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:48  Configuring content directory...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:48  Configuring groups...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:48  Starting group configuration for WSUS Administrators...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:48  Found group in regsitry, attempting to use it...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Writing group to registry...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Finished group creation
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Starting group configuration for WSUS Reporters...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Found group in regsitry, attempting to use it...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Writing group to registry...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Finished group creation
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Configuring permissions...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Fetching content directory...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Fetching ContentDir from registry store
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Value is C:\Program Files\Update Services
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Fetching group SIDs...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Fetching WsusAdministratorsSid from registry store
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Value is S-1-5<rc-c2d-number data-rc-number="-21-2522978924">-21-2522978924</rc-c2d-number><rc-c2d-number data-rc-number="-2782523748">-2782523748</rc-c2d-number><rc-c2d-number data-rc-number="-485567411">-485567411</rc-c2d-number>-1003
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Fetching WsusReportersSid from registry store
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Value is S-1-5<rc-c2d-number data-rc-number="-21-2522978924">-21-2522978924</rc-c2d-number><rc-c2d-number data-rc-number="-2782523748">-2782523748</rc-c2d-number><rc-c2d-number data-rc-number="-485567411">-485567411</rc-c2d-number>-1004
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Creating group principals...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:50  Granting directory permissions...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:51  Granting permissions on content directory...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:52  Granting registry permissions...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:52  Granting registry permissions...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:52  Granting registry permissions...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:52  Configuring shares...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:52  Configuring network shares...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:52  Fetching content directory...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:52  Fetching ContentDir from registry store
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:52  Value is C:\Program Files\Update Services
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:52  Fetching WSUS admin SID...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:52  Fetching WsusAdministratorsSid from registry store
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:52  Value is S-1-5<rc-c2d-number data-rc-number="-21-2522978924">-21-2522978924</rc-c2d-number><rc-c2d-number data-rc-number="-2782523748">-2782523748</rc-c2d-number><rc-c2d-number data-rc-number="-485567411">-485567411</rc-c2d-number>-1003
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:52  Content directory is local, creating content shares...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:53  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."
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:53  Deleting existing share...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:53  Creating share...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:53  Share successfully created
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:53  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."
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:53  Deleting existing share...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:53  Creating share...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Share successfully created
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  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."
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Deleting existing share...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Creating share...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Share successfully created
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Finished creating content shares
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Stopping service WSUSService
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Stopping service W3SVC
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Configuring database...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Configuring the database...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Establishing DB connection...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Checking to see if database exists...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Database exists
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Switching database to single user mode...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Loading install type query...
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  DECLARE @currentDBVersion       int
    DECLARE @scriptMajorVersion     int = (14393)
    DECLARE @scriptMinorVersion     int = (0)
    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 <rc-c2d-number data-rc-number="+ 1)">+ 1)</rc-c2d-number>, (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

    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Install type is: UnsupportedFuture
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  DB is a higher version than the config scripts
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Swtching DB to multi-user mode......
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Finished setting multi-user mode
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Disposing Connection
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Clearing Connection Pools
    <rc-c2d-number data-rc-number=" 2018-09-19 16">2018-09-19 16</rc-c2d-number>:07:54  Microsoft.UpdateServices.Administration.CommandException: The schema version of the database is from a newer version of WSUS 
    than currently installed.  You must either patch your WSUS server to at least 
    that version or drop the database.
       at Microsoft.UpdateServices.Administration.ConfigureDB.CheckForUnsupportedVersion(DBInstallType installType, Boolean dbExists)
       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)
    Fatal Error: The schema version of the database is from a newer version of WSUS 
    than currently installed.  You must either patch your WSUS server to at least 
    that version or drop the database.

    Any thoughts?


    Friday, September 21, 2018 5:05 PM

Answers

  • Does the installing user account have the sysadmin role on the SQL Server? It needs at least db_creator to create the database.

    Also confirm that the SUSDB database is NOT existing on the server before you run the postinstall steps.


    Adam Marshall, MCSE: Security
    https://www.ajtek.ca
    Microsoft MVP - Windows and Devices for IT

    • Marked as answer by Hit_the_deck Monday, September 24, 2018 3:22 PM
    Saturday, September 22, 2018 1:21 AM
  • So i deleted the database and the IIS wsus website.  I ran the post install tasks again and got the fatal error 'failed to start and configure the WSUS service.'  Ran the wsusutil.exe app and that fixed the issue!  The post install tasks completed without error.
    • Marked as answer by Hit_the_deck Monday, September 24, 2018 3:21 PM
    Monday, September 24, 2018 3:21 PM

All replies

  • Does the installing user account have the sysadmin role on the SQL Server? It needs at least db_creator to create the database.

    Also confirm that the SUSDB database is NOT existing on the server before you run the postinstall steps.


    Adam Marshall, MCSE: Security
    https://www.ajtek.ca
    Microsoft MVP - Windows and Devices for IT

    • Marked as answer by Hit_the_deck Monday, September 24, 2018 3:22 PM
    Saturday, September 22, 2018 1:21 AM
  • Thanks AJTEK.ca,

    Yes, the installing account has the sysadmin role and the SUSDB folder under 'databases' has been deleted.  

    Monday, September 24, 2018 1:09 PM
  • My apologies. I deleted the SUSDB in my SCCM database, not my separate instance for WSUS.  I'll delete it in the WSUS sql instance and see if that works.  
    Monday, September 24, 2018 2:29 PM
  • So i deleted the database and the IIS wsus website.  I ran the post install tasks again and got the fatal error 'failed to start and configure the WSUS service.'  Ran the wsusutil.exe app and that fixed the issue!  The post install tasks completed without error.
    • Marked as answer by Hit_the_deck Monday, September 24, 2018 3:21 PM
    Monday, September 24, 2018 3:21 PM