Or, how I learned to read the assembly name
In which I include dll's
I was trying out this tutorial on Geekpedia and the references were invalid. I removed the two (Microsoft.SqlServer.Smo
and Microsoft.SqlServer.ConnectionInfo
: yes, the dll names are missing the .Management
part from the namespace they contain) and re-added them. Simple enough.
Then there was an issue with the unreferenced Microsoft.SqlServer.Management.Sdk.Sfc
, after running the installers (all just said repairing), I found the dll, but I'm not sure if it was there before. The dll in this case has the same name as the namespace, unlike the previous two dll's which are missing the .Management
portion, so I was looking in the wrong part of the list.
In which I question my sanity
All was relatively sane up to this point, then I started to think I was crazy. The Backup class was missing from the namespace. I checked the documentation forMicrosoft.SqlServer.Management
and sure enough, Backup
was there.
After turning to google for a while and reading all about people finding and GACing the dll, I headed to %systemroot%/assembly
to see what I had. It was at this point that I saw there was a dll Microsoft.SqlServer.SmoExtended
. Inquisitively, I added a reference to this dll.
And, lo! the classes were found.
Looking at the documentation for the Backup
class, I now notice:
The Backup object provides programmatic access to Microsoft SQL Server backup operations.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.SmoExtended (in microsoft.sqlserver.smoextended.dll)
A curious discovery
So, multiple dlls can add classes to the namespace. Who knew? Not me. And, w.r.t.Microsoft.SqlServer.Management.Smo
, their structure must have changed somewhere between the dlls that Andrew Pociu (Geekpedia) was using (I'm assuming 9.x) and the 10.0 dlls.
Post-script: local help is outdated
While writing this post, I thought to check my local help where the documentation is out of date, so perhaps I have a valid excuse.
The Backup object provides programmatic access to Microsoft SQL Server backup operations.fin
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)