Support Tip: Running TestDBUpgrade does not complete and logs “Failed to create process of SetupWpf.exe” error

~ Rafid Ali

imageHello Everyone, Rafid Ali here with another Configuration Manager support tip for you. I recently came across a scenario where a TestDbUpgrade was failing due to a custom database table which was created after adding custom hardware inventory classes in Configuration Manager 2012 R2 Service Pack 1. It was failing to execute Upgrade/TestDBupgrade to newer version 1606, and if you happen to run across this problem then hopefully this post will help.

Below are the error messages that were seen in ConfigMgrSetup.log when running the TestDBUpgrade:

12-08-2016 13:57:48.541    Configuration Manager Setup    4308 (0x10d4)    sql object tel_sum_scansourcewufb is not found. It will be created.

ERROR: SQL Server error: [42S22][207][Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name ‘UseWUServer00’. : TEL_SUM_ScanSourceWufB   Configuration Manager Setup

Failed to execute sql command — Name         : TEL_SUM_ScanSourceWufB ~– Version      : 5.0.8412.1313 ~– Definition   : SqlObjs  ~– Scope        : CAS_OR_PRIMARY  ~– Object       : P  ~– Dependencies : <Detect>  ~– Description : SUM telemetry : Information of client Scan sources to know the usage of Windows Update for Business ~ ~ ~CREATE PROCEDURE TEL_SUM_ScanSourceWufB @Input NVARCHAR(MAX) = NULL  ~AS  ~BEGIN  ~ ~SET NOCOUNT ON ~If exists (Select ID from sysobjects where Name=‘WINDOWSUPDATE_DATA’ ) ~SELECT Count(InstanceKey) as MachineCounts ~      ,AUOptions00 ~      ,InstanceKey00 ~      ,NoAutoUpdate00 ~      ,UseWUServer00 ~  FROM WINDOWSUPDATE_DATA with (NOLOCK) ~  GROUP BY UseWUServer00 ,InstanceKey00, AUOptions00, NoAutoUpdate00 ~End             Configuration Manager Setup

ERROR: Failed to execute SQL Server script: Create SQL object tel_sum_scansourcewufb Configuration Manager Setup

Failed to create process of SetupWpf.exe. return value 1                   1/1/1601 12:00:00 AM           1992642571 (0x76C5500B)

There were similar errors for other columns as well for the same table.

Reason for the failure

ConfigMgr 1606 contains the table ‘WindowsUpdate_DATA’ in its database by default, as the Inventory Class ‘Windows Update’ is included as a default inventory class from version 1606 onwards. However, in ConfigMgr 2012 this was not a default inventory class. Because of this, many ConfigMgr 2012 users manually added this class from WMI (Win32Reg_SMSWindowsUpdate or Win32Reg_WindowsUpdate as per the requirement) to get the required data through Hardware Inventory. When this Hardware Inventory Class was added, it created the same table (WindowsUpdate_DATA) with the same columns names, such as ‘AUOptions00’, ‘InstanceKey00’, ‘NoAutoUpdate00’, ‘UseWUServer00’, etc.

Starting with version 1606, Upgrade Task automatically creates all the required objects which are not there by default in the older versions. We can see this by examining the ConfigMgrSetup.log file:

sql object tel_sum_products is not found. It will be created.

Saved hash for SQLText for SQL object tel_sum_products (SHA256:1C87D231C46ECCC0D559F1AA5B83A1A54FA4C445072285D17CBB84B4DA3BCE29)

INFO: SQL Server script: Create object tel_sum_products

sql object tel_sum_scansourcewufb is not found. It will be created.

*** [42S22][207][Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name UseWUServer00. : TEL_SUM_ScanSourceWufB

*** [42S22][207][Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name InstanceKey00. : TEL_SUM_ScanSourceWufB

*** [42S22][207][Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name AUOptions00. : TEL_SUM_ScanSourceWufB

*** [42S22][207][Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name NoAutoUpdate00. : TEL_SUM_ScanSourceWufB

Failed to execute sql command — Name         : TEL_SUM_ScanSourceWufB ~– Version      : 5.0.8412.1313 ~– Definition   : SqlObjs  ~– Scope        : CAS_OR_PRIMARY  ~– Object       : P  ~– Dependencies : <Detect>  ~– Description : SUM telemetry : Information of client Scan sources to know the usage of Windows Update for Business ~ ~ ~CREATE PROCEDURE TEL_SUM_ScanSourceWufB @Input NVARCHAR(MAX) = NULL  ~AS  ~BEGIN  ~ ~SET NOCOUNT ON ~If exists (Select ID from sysobjects where Name=’WINDOWSUPDATE_DATA’ ) ~SELECT Count(InstanceKey) as MachineCounts ~      ,AUOptions00 ~      ,InstanceKey00 ~      ,NoAutoUpdate00 ~      ,UseWUServer00 ~  FROM WINDOWSUPDATE_DATA with (NOLOCK) ~  GROUP BY UseWUServer00 ,InstanceKey00, AUOptions00, NoAutoUpdate00 ~End  ~~

In this case, Upgrade Task was able to create all of the above objects, like Stored Procedures ‘tel_sum_products’ and its corresponding tables and columns, however when it tried to create and execute object ‘tel_sum_scansourcewufb’, it failed because the same column names (‘AUOptions00’, ‘InstanceKey00’, ‘NoAutoUpdate00’, ‘UseWUServer00’, etc) already existed in the same table (WindowsUpdate_DATA).

You can verify this in your ConfigMgr 2012 R2 SP1 database as shown below.

clip_image001

If this table already exists in the ConfigMgr 2012 database, then it’s been created by custom hardware inventory classes as it’s not a part of the default database for ConfigMgr 2012 R2.

Resolution

In the ConfigMgr 2012 R2 SP1 console, go to Administration:

clip_image002

Next, go to Client Settings:

clip_image003

Select the Client Setting that you are using for Hardware Inventory. In my case it was ‘Default Client Settings’:

clip_image004

Click on ‘Set Classes’:

clip_image005

Select the Custom Inventory Class causing issues and delete it, as shown below.

clip_image006

After a short period of time, you will notice that the table corresponding to that class is deleted in the database. Once the table is deleted, make a healthy backup of Configuration Manager and proceed with the TestDBupgrade. At this point it should complete successfully. Once TestDBUpgrade is successful, you can then proceed with Configuration Manager site upgrade.

NOTE This issue is fixed in Configuration Manager version 1610 and up. Any future baseline builds after 1610 will not encounter this problem.

Rafid Ali, Support Engineer

Microsoft Enterprise Cloud Group