1

How do you determine when it is safe to uninstall the 'SQL Server Native Client'? I believe that simply checking whether there is an SQL Server instance installed is naive.

I've tried researching and testing the behavior of the following keys, among others, but they don't seem to give me what I need:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Native Client\MSIRefCount
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SNAC\MSIRefCount
...

I'm using Win32/Windows API via C++.

Rob Kennedy
  • 161,384
  • 21
  • 275
  • 467
jasnmoore
  • 13
  • 1
  • 4

1 Answers1

1

It's not safe. Anything could be using it, either via a defined ODBC DSN or a connection string, and it doesn't require SQL server itself to be installed on the same machine for use.

Deanna
  • 23,876
  • 7
  • 71
  • 156
  • That's what I suspected but, due to my ignorance, I was optimistic that maybe 'MSIRefCount' would be of help. So, the 'SQL Server Native Client', like the 'VC++ Redistributable', is essentially install and forget? – jasnmoore Dec 20 '11 at 15:43
  • Pretty much, anything that can be used by any other application unless very strictly reference counted. (See the SharedDLLs key in the registry for an attempt to do this per file.) – Deanna Dec 20 '11 at 15:57