I have recently experienced an issue which had to do with a third-party application that was trying to retrieve some meta information from a specific SQL Server Instance. It was actually trying to retrieve the names of all the databases contained within that instance. However it was returning the following error message (app code excluded): […….] Received the following from the MS SQL server: Could not load file or assembly ‘Microsoft.SqlServer.Smo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91’ or one of its dependencies. The system cannot find the file specified.
SMO stands for Shared Management Objects and it is basically an API that can be used by third-party applications for programmatically managing all aspects of SQL Server.
As the above message was quite explanatory, I directly checked the Global Assembly Cache (GAC) under “c:\windows\assembly” to see if the assembly (DLL) was listed there. Guess what? It was not!
Strengthen your SQL Server Administration Skills – Enroll to our Online Course!
Check our online course on Udemy titled “Essential SQL Server Administration Tips”
(special limited-time discount included in link).Via the course, you will learn essential hands-on SQL Server Administration tips on SQL Server maintenance, security, performance, integration, error handling and more. Many live demonstrations and downloadable resources included!
In such cases you have two options:
1. Run the installer that registers the missing assemblies to the GAC, or
2. Use Gacutil.exe to manually register the assembly after you get the relevant dll.
As I did not have much time, I prefered downloading and running the SMO installer 🙂
From the error description, version 10.0.0.0 of SMO is the SQL Server 2008 version so I just had to download the proper package and install it.
– X86 Package (SharedManagementObjects.msi)
– X64 Package (SharedManagementObjects.msi)
– IA64 Package (SharedManagementObjects.msi)I downloaded and installed the proper package, verified that the assembly was registered in GAC, and tried again! The application worked, successfully listing the names of the databases in the instance!Hope this helps!
Featured Online Courses:
- AI Essentials: A Beginner’s Guide to Artificial Intelligence
- SQL Server 2022: What’s New – New and Enhanced Features
- Working with Python on Windows and SQL Server Databases
- Introduction to Azure Database for MySQL
- Boost SQL Server Database Performance with In-Memory OLTP
- Introduction to Azure SQL Database for Beginners
- Essential SQL Server Administration Tips
- SQL Server Fundamentals – SQL Database for Beginners
- Essential SQL Server Development Tips for SQL Developers
- Introduction to Computer Programming for Beginners
- .NET Programming for Beginners – Windows Forms with C#
- SQL Server 2019: What’s New – New and Enhanced Features
- Entity Framework: Getting Started – Complete Beginners Guide
- Data Management for Beginners – Main Principles
- A Guide on How to Start and Monetize a Successful Blog
Read Also
Feel free to check our other relevant articles on SQL Server troubleshooting:
- How to Resolve: Cannot Connect to WMI Provider (SQL Server Configuration Manager)
- Error converting data type varchar to numeric
- Error converting data type varchar to float
- SQLServerAgent could not be started (reason: Unable to connect to server ‘(local)’; SQLServerAgent cannot start)
- ORDER BY items must appear in the select list if SELECT DISTINCT is specified
- There is no SQL Server Failover Cluster Available to Join
- There is insufficient system memory in resource pool ‘internal’ to run this query.
- … all SQL Server troubleshooting articles
Featured Database Productivity Tools
Snippets Generator: Create and modify T-SQL snippets for use in SQL Management Studio, fast, easy and efficiently.
Dynamic SQL Generator: Convert static T-SQL code to dynamic and vice versa, easily and fast.
Subscribe to our newsletter and stay up to date!
Subscribe to our YouTube channel (SQLNetHub TV)
Easily generate snippets with Snippets Generator!
Secure your databases using DBA Security Advisor!
Generate dynamic T-SQL scripts with Dynamic SQL Generator!
Check our latest software releases!
Check our eBooks!
Rate this article:
Reference: SQLNetHub.com (https://www.sqlnethub.com)
© SQLNetHub
Artemakis Artemiou is a seasoned Senior Database and AI/Automation Architect with over 20 years of expertise in the IT industry. As a Certified Database, Cloud, and AI professional, he has been recognized as a thought leader, earning the prestigious Microsoft Data Platform MVP title for nine consecutive years (2009-2018). Driven by a passion for simplifying complex topics, Artemakis shares his expertise through articles, online courses, and speaking engagements. He empowers professionals around the globe to excel in Databases, Cloud, AI, Automation, and Software Development. Committed to innovation and education, Artemakis strives to make technology accessible and impactful for everyone.
Hi. The download link doesn't work anymore, because Microsoft has moved the link. But here are the working links for the x86 (32bit) and x64 (64 bit) version respectively…
32bit
64bit
Link updated in original article!
Thank you for your comment!
Please note that in your comment, the 32-bit link you posted points to PowerShellTools and the 64-bit link points to the 32-bit of Shared Management Objects. Perhaps a little link copy-paste mistake? 🙂
Cheers,
Artemakis