Or, how I learned to read the assembly name
In which I include dll'sI was trying out this tutorial on Geekpedia and the references were invalid. I removed the two (
Microsoft.SqlServer.ConnectionInfo: yes, the dll names are missing the
.Managementpart 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
.Managementportion, so I was looking in the wrong part of the list.
In which I question my sanityAll 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 for
Microsoft.SqlServer.Managementand sure enough,
Backupwas there. After turning to google for a while and reading all about people finding and GACing the dll, I headed to
%systemroot%/assemblyto 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
Backupclass, I now notice:
The Backup object provides programmatic access to Microsoft SQL Server backup operations.
Assembly: Microsoft.SqlServer.SmoExtended (in microsoft.sqlserver.smoextended.dll)
A curious discoverySo, 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
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)