How to fix the ‘Class not registered (pfutil)’ error in SQL Profiler

Yesterday, on a whim I launched SQL Profiler on my laptop. I had not launched the Profiler client for a long time, especially given its deprecated status. All the more, with the recent introduction of XE Profiler within SSMS 17.3, there is even lesser motivation to use the old standalone Profiler. But still… I launched Profiler yesterday and when I tried to connect to my SQL Server 2017 instance, this is what I got:

Class not registered (pfutil)When you look at the detailed exception information provided this is what we get:

Class not registered
 (pfutil)

------------------------------
 Program Location:

at CProfilerSqlDbConnection.Open()
 at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectorThread()

While Profiler is deprecated, it should certainly not throw errors like this. So I decided to take a closer look. With some debugging I figured that somehow Profiler is not able to create a OLEDB connection using the SQLNCLI11 provider. This triggered some ‘connections’ in my mind, because I remembered that I had recently had to uninstall and reinstall the same for usage with the RML Utilities for SQL Server. I figured that somehow those steps might have caused some COM registration issues with SQLNCLI11.DLL. So I executed the following command from an administrative command prompt:

regsvr32 C:\WINDOWS\system32\sqlncli11.dll

Voila! That fixed the issue. So in the rare event that you are still using Profiler and happen to run into this even more rare error, I hope the simple step to register SQLNCLI11 will help you recover quickly!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.