MSSQL Discovery - Loading SMO Library
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 08:32 AM
Hi All,
I've seen quite a few online and we always receive questions from our clients on MSSQL discovery and the loading of the SMO library. Wanted to provide some insight into this and hopefully this will help you out in the future.
Disclaimer: I'm not a DB person at all, so I'll probably end up using some terminology wrong. Forgive me.
Below are the steps you need to follow to get SMO library loaded to you're not running into any MS SQL server discovery issues.
Pre-requisites:
- Ensure you have local admin access to the server that is running mssql server and that you can validate access into SQL server management studio.
Loading SMO Library:
- Download and install the installer package (.msi) for SMO library and CLR types on the MID server host that will be discovering the SQL Server. You can find this from MSFT's site by searching for the SQL Server Feature Pack and downloading the SQLSysClrTypes.msi and SharedManagementObjects.msi files.
- Once installed you'll can execute the following command in powershell to "load" the SMO library: [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo");
- Once you've executed that command you should see an output specifying the location of the smo.dll file.
- Now to validate that the SMO library is loaded you can execute the following command: [system.appdomain]::CurrentDomain.GetAssemblies() | Select location
- you should now see the smo.dll file listed with all of the other available libraries / assemblies.
Note: if you want to see the before and after, execute the system.appdomain command first to see that the smo.dll is missing and then execute the reflection.assembly command to load the library, then execute the system.appdomain command again to see the list updated with smo.dll.
I hope this helps you guys!
Saadi Tahmid
Sr. Manager / Sr. Infra Architect
Cognizant Technology Solutions
- Labels:
-
Discovery
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 09:48 AM
During Discovery training, we have a group exercise to discover an MSSQL Database. Below is a link to recording I created some time ago with the potential solution. This may also help anyone in discovering MSSQL along with the great info provided by Saadi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 10:30 AM
glennpinto This video is great. Thanks Glenn!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2018 07:21 AM
Great. Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2019 01:54 AM
Hey,
One question If we are installing the SMO library and CLR types then for every version of MSSQL we need to do that or it is a generic one will work for all.