Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: Error message when you run the sp_add_alert stored procedure in SQL Server 2008 on a computer that is running Windows Server 2008 or Windows Vista: "SQLServerAgent Error: WMI error: 0x80041003"


Microsoft distributes Microsoft SQL Server 2008 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release.

↑ Back to the top


Symptoms

Consider the following scenario:
  • You install Microsoft SQL Server 2008 on a computer that is running Windows Vista or Windows Server 2008.
  • You have a Network Service account that is not a member of the sysadmin fixed server role.
  • You use this Network Service account as the startup account for the SQL Server Agent service.
In this scenario, when you run the sp_add_alert stored procedure from the msdb database, you receive the following error message:

Msg 22022, Level 16, State 1, Line 0

SQLServerAgent Error: WMI error: 0x80041003.

Msg 14511, Level 16, State 1, Procedure sp_verify_alert, Line 300

The @wmi_query could not be executed in the @wmi_namespace provided. Verify that an event class selected in the query exists in the namespace and that the query has the correct syntax.

↑ Back to the top


Cause

The SQL Server 2008 setup uses the SQL Server Agent service account in the sysadmin fixed server role. This behavior should give sysadmin permissions to the service account, and this behavior should not compromise security when the Network Service account is the startup account of the SQL Server Agent.

This problem occurs because the access check of the SQL Server WMI provider does not check the permissions of the service account. Therefore, the access check of the SQL Server WMI provider blocks functionalities required by the SQL Server Agent to implement the sp_add_alert stored procedure if the startup account is not in the sysadmin fixed server role.


Note In earlier versions of the Windows operating system that do not have the service security identifier (SID), this problem does not occur. The reason that this problem does not occur in earlier versions is that the SQL Server setup uses the startup account of SQL Server Agent in the sysadmin fixed server role.

↑ Back to the top


Resolution

This hotfix changes the access check of the SQL Server WMI provider to grant access if the SQL Server Agent service account is in the sysadmin fixed server role.


SQL Server 2008

Important You must use this fix if you are running the release version of SQL Server 2008.

The fix for this issue was first released in Cumulative Update 6. For more information about how to obtain this cumulative update package for SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
971490 Cumulative update package 6 for SQL Server 2008
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
956909 The SQL Server 2008 builds that were released after SQL Server 2008 was released

SQL Server 2008 Service Pack 1

Important You must use this fix if you are running SQL Server 2008 Service Pack 1.


The fix for this issue was first released in Cumulative Update 4 for SQL Server 2008 Service Pack 1. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
973602 Cumulative update package 4 for SQL Server 2008 Service Pack 1
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. Microsoft recommends that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
970365 The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 1 was released
Microsoft SQL Server 2008 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2008 Service Pack 1 hotfix to an installation of SQL Server 2008 Service Pack 1. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.

↑ Back to the top


Workaround

To work around this issue, follow these steps:
  • Set the SQL Server Agent startup account to an account that is not the Network Service account, such as a domain account.
  • Add the SQL Server Agent startup account to the sysadmin fixed server role.
  • Rerun the sp_add_alert stored procedure.
Note We do not recommend that you add the Network Service account to the sysadmin fixed server role.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


References

For more information about the Incremental Servicing Model for SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:

935897 An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problems



For more information about the naming schema for SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:

822499 New naming schema for Microsoft SQL Server software update packages


For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

↑ Back to the top


Keywords: kbsurveynew, kbfix, kbqfe, kbexpertiseadvanced, kb

↑ Back to the top

Article Info
Article ID : 973303
Revision : 3
Created on : 4/21/2018
Published on : 4/21/2018
Exists online : False
Views : 113