Troubleshooting "Function Sequence Error" in Configuration Manager's Smsdbmon.log

Table of Contents

The Configuration Manager (ConfigMgr) environment relies heavily on its site database for storing critical information about clients, deployments, inventory, and site operations. The Site Database Notification Monitor component, logged in the Smsdbmon.log file, plays a crucial role in watching for changes in the site database and triggering actions based on those changes. This monitoring is essential for the dynamic operation of the ConfigMgr hierarchy, ensuring that components react promptly to updates in the database. The Smsdbmon.log is therefore one of the primary logs administrators check when troubleshooting issues related to site operations, replication, or component status.

Errors appearing repeatedly in Smsdbmon.log can be a cause for concern, potentially indicating problems with database connectivity, performance, or internal component logic. Understanding the nature of these errors is vital for maintaining a healthy ConfigMgr site. While many errors might require investigation and corrective action, others may be transient or even benign in specific circumstances, as is the case with the particular issue discussed here concerning a “Function sequence error” observed in a specific ConfigMgr version.

Understanding the Symptoms in Version 1902

Following the installation or an update to Configuration Manager current branch version 1902, administrators monitoring their site server logs may notice a recurring error signature within the Smsdbmon.log file. This specific pattern indicates an issue occurring when the SMS_DATABASE_NOTIFICATION_MONITOR component attempts to interact with the site database. The logs capture the component executing a stored procedure and then immediately reporting an error from the database driver.

The problematic log entries appear consistently, often showing the component attempting to run a specific database procedure followed by the error message. The typical entries observed in the Smsdbmon.log are:

SMS_DATABASE_NOTIFICATION_MONITOR    *** exec dbo.spGetChangeNotifications
SMS_DATABASE_NOTIFICATION_MONITOR    *** [HY010][0][Microsoft][ODBC Driver Manager] Function sequence error

This sequence suggests that the SMS_DATABASE_NOTIFICATION_MONITOR component is attempting to execute the stored procedure dbo.spGetChangeNotifications. Immediately following this attempt, the log records a Function sequence error originating from the Microsoft ODBC Driver Manager. The [HY010] state code is a standard ODBC error code indicating a “Function sequence error.” This typically means that functions were called in an invalid order relative to the state of the connection or the driver.

Deciphering the “Function Sequence Error” and spGetChangeNotifications

A “Function sequence error” in the context of database connectivity via ODBC usually implies that an ODBC function was called when the driver was not in an appropriate state for that function call. This could be due to various reasons, such as attempting to fetch results before executing a query, calling a function after the connection has been closed or become invalid, or other state-related mismatches in the interaction between the application (ConfigMgr’s Smsdbmon) and the database driver. In the case of SQL Server and ODBC, this error specifically points to an issue at the driver management level during the execution of a database command.

The stored procedure dbo.spGetChangeNotifications is an internal ConfigMgr database procedure. Its name suggests that its purpose is to retrieve notifications about changes that have occurred within the ConfigMgr database. The SMS_DATABASE_NOTIFICATION_MONITOR component would execute this procedure to discover these changes and then trigger subsequent actions based on the notifications received. For example, if a new collection is created or a deployment status updates, spGetChangeNotifications would likely be involved in signaling this change to the appropriate ConfigMgr components for processing.

The fact that the “Function sequence error” occurs immediately after attempting to execute spGetChangeNotifications suggests a potential timing or state issue in how the ConfigMgr 1902 version’s SMS_DATABASE_NOTIFICATION_MONITOR component interacts with the ODBC driver when calling this specific procedure. It might involve how parameters are handled, how results are expected, or a minor flaw in the driver or the component’s state management during this specific operation.

The Official Resolution

For Configuration Manager current branch version 1902 experiencing this particular “Function sequence error” related to dbo.spGetChangeNotifications in the Smsdbmon.log, the resolution provided by Microsoft is straightforward. The issue was identified and addressed in a subsequent release of Configuration Manager.

To resolve this specific error, the recommended action is to update your Configuration Manager environment to Configuration Manager current branch version 1906 or later. Updates to Configuration Manager typically include fixes for various issues, including those found in earlier versions’ component interactions with the database or operating system. Version 1906 incorporated changes that corrected the underlying cause of this specific error signature, preventing it from being logged repeatedly.

Updating to version 1906 not only resolves this particular log error but also brings numerous other improvements, fixes, and new features, enhancing the overall stability and functionality of the ConfigMgr environment. It is generally recommended to stay updated to supported ConfigMgr versions to benefit from these ongoing improvements and ensure the best performance and reliability of the site.

Troubleshooting Function Sequence Error

Why This Specific Error Could Be Ignored (in 1902)

The original information provided by Microsoft also notes that for environments running Configuration Manager current branch version 1902, this specific “Function sequence error” related to dbo.spGetChangeNotifications recorded in the Smsdbmon.log could be safely ignored. This is a crucial piece of information for administrators who might encounter the error but are not immediately able to update to version 1906.

The reason it can be safely ignored suggests that despite the error being logged, it does not critically impact the core functionality of the SMS_DATABASE_NOTIFICATION_MONITOR component or the ConfigMgr site operations in version 1902. It’s likely that the underlying database notification process managed by spGetChangeNotifications might still function correctly, or that the error represents a non-fatal flaw in the interaction that doesn’t prevent the necessary database changes from being detected and processed eventually. Perhaps the operation is retried successfully, or the error occurs in a specific edge case that doesn’t disrupt the overall flow of notifications.

However, relying on ignoring errors is generally not best practice. While this specific instance in version 1902 is deemed ignorable by the product team, it is still a log entry indicating an unexpected event. The preferred course of action remains updating to a version where the error is no longer present, as this ensures the component is operating as intended without generating spurious error messages that could potentially mask other, more serious issues. Clearing out known, ignorable errors makes log monitoring more efficient and effective, allowing administrators to focus on entries that genuinely require attention.

Expanding on Smsdbmon.log Monitoring

The Smsdbmon.log file is a vital diagnostic tool for Configuration Manager administrators. It records the activities of the SMS_DATABASE_NOTIFICATION_MONITOR thread, which monitors the Configuration Manager database for changes to key objects and triggers component actions based on these changes. Understanding what this log records is fundamental for troubleshooting various site issues.

Here’s a simplified look at the types of activities and entries you might find in Smsdbmon.log, beyond just error messages:

Log Entry Type Description Example Entry
Initialization Component starting up and connecting to the database. SMS_DATABASE_NOTIFICATION_MONITOR Started.
Database Connection Establishing or verifying the connection to the site database. SMS_DATABASE_NOTIFICATION_MONITOR Successfully connected to database.
Schema Monitoring Monitoring specific tables or schema elements for changes. SMS_DATABASE_NOTIFICATION_MONITOR Monitoring table: Client.CIM_DataFile
Stored Procedure Exec Executing internal database procedures to get notifications or perform tasks. SMS_DATABASE_NOTIFICATION_MONITOR *** exec dbo.spProcessChanges
Notification Received Detection of a change in a monitored database object. SMS_DATABASE_NOTIFICATION_MONITOR Received notification for collection update.
Triggering Component Notifying other ConfigMgr components about detected changes. SMS_DATABASE_NOTIFICATION_MONITOR Triggering component: SMS_COLLECTION_EVALUATOR
Errors Reporting issues encountered during database interaction or processing. SMS_DATABASE_NOTIFICATION_MONITOR *** ERROR: Some database error message
Shutdown Component stopping gracefully. SMS_DATABASE_NOTIFICATION_MONITOR Stopped.

Monitoring Smsdbmon.log allows administrators to verify that the database notification process is functioning correctly. If this component is not working, changes made in the console (like creating a new collection or deployment) might not be processed by other components (like collection evaluator or distribution manager), leading to delays or failures in policy distribution and content deployment. Repeated errors, even if deemed ignorable, can sometimes obscure other critical messages, making comprehensive log analysis challenging.

General Troubleshooting for Database Interaction Errors

While the specific “Function sequence error” in ConfigMgr 1902 is resolved by updating, encountering database interaction errors in Smsdbmon.log or other ConfigMgr logs in different contexts requires a general troubleshooting approach. If you see other database or ODBC errors, consider the following:

  1. Database Connectivity: Ensure the ConfigMgr site server can communicate reliably with the SQL Server hosting the site database. Check network connectivity, firewalls, and name resolution.
  2. SQL Server Health and Performance: Verify that the SQL Server instance is healthy, responsive, and not under excessive load. Performance issues on the SQL Server can lead to timeouts or state issues perceived as sequence errors by the client application (ConfigMgr).
  3. SQL Server Configuration: Check SQL Server configuration settings, including memory allocation, database compatibility level, and SQL Server collation, ensuring they meet ConfigMgr requirements.
  4. ODBC Driver: While less common to troubleshoot directly for standard ConfigMgr operations, ensure the ODBC driver used by ConfigMgr is correctly installed and configured. This specific error originates from the ODBC Driver Manager.
  5. Site Database Health: Run SQL Server maintenance tasks like indexing, statistics updates, and database consistency checks (DBCC). Corruption or performance bottlenecks within the database itself can manifest as application-level errors.
  6. ConfigMgr Service Account Permissions: Ensure the site server computer account and the SQL Server service account have the necessary permissions on the database and the SQL Server instance.
  7. ConfigMgr Component Status: Use the ConfigMgr console to check the status of the SMS_DATABASE_NOTIFICATION_MONITOR component and related components (like SMS_SQL_MONITOR). Component errors or warnings in the console often provide more context than raw log entries.
  8. Windows Event Logs: Check the Application and System event logs on both the ConfigMgr site server and the SQL Server for related errors or warnings that might indicate underlying issues with the operating system, hardware, or fundamental services.

Systematically checking these areas helps pinpoint the root cause of database interaction problems, whether they stem from network issues, SQL Server configuration, permissions, or the ConfigMgr application itself.

Conclusion: Staying Current is Key

The “Function sequence error” in Smsdbmon.log observed in Configuration Manager current branch version 1902 serves as a specific example of how internal component logic or interaction with underlying system drivers (like ODBC) can sometimes lead to seemingly concerning error messages. While this particular error was deemed ignorable and specifically fixed in version 1906, it highlights the importance of monitoring logs like Smsdbmon.log for any anomalies.

For administrators running version 1902, knowing this error is ignorable provides peace of mind, but the best practice is always to move to a supported and later version like 1906 (or preferably the latest current branch version). Updating resolves known issues, improves stability, and introduces new features, making the administration of the ConfigMgr environment smoother and more efficient. Regular updates are a cornerstone of maintaining a healthy and secure ConfigMgr infrastructure. Always plan updates carefully, testing in a lab environment if possible, to ensure a smooth transition.

Have you encountered this “Function sequence error” or other persistent errors in your ConfigMgr logs? How did you troubleshoot them, or what solutions did you find most effective? Share your experiences and tips in the comments below!

Post a Comment