Last post Feb 02, 2017 07:40 PM by march11
Jan 24, 2017 07:34 AM|Chait|LINK
In a web application, am taking backup of data base and loading fresh data throw application. Am using below dll's Microsoft.SqlServer.ConnectionInfo, Microsoft.SqlServer.Management.Sdk.Sfc, Microsoft.SqlServer.Smo, Microsoft.SqlServer.SqlEnum.
When I run the application in a machine(web and DB server installed same machine) where SQL server installed application runs fine( because it refers the above dll's in the specified path).
When I run the application in machine(only web server) where SQL server 2014 is not installed, separate server is used as DB server then it fails.
While publishing I put all the above dll's of SQL version-12 in a folder and from there I referred and also I marked it Copy local as TRUE. But sill am getting error as,
"Could not load file or assembly 'Microsoft.SqlServer.SqlClrProvider, Version=188.8.131.52, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies.
The system cannot find the file specified."
Jan 25, 2017 09:50 PM|march11|LINK
It sounds like you are having issues deploying your web app to a production server. You need to have a licensed copy of the database (appears to be SQL) available to the production server, different from the version that you are developing with.
If you production computer does not have SQL installed, you will need to look into that issue first.
Jan 26, 2017 06:41 PM|PatriceSc|LINK
Try perhaps https://msdn.microsoft.com/en-us/library/ms162189.aspx ("Installing SMO") if everything else fails. I'm not sure SMO can be installed by just including few managed DLLs.
My personal preference would to avoid SMO if it can be done using simple Transact SQL statements (my understanding is that at sme point you are doing a BACKUP/RESTORE operation throught your app ?)
Feb 02, 2017 08:03 AM|Chait|LINK
Thanks for the reply.
Yes am doing backup of Database.
Feb 02, 2017 07:40 PM|march11|LINK
Ok, upgrade your Sql Server 2012 to 2014. This is the version chart according to Microsoft (from
A database created by a more recent version of Microsoft SQL Server cannot be attached or restored to an earlier version. This restriction is there because an older version cannot know about file format changes that were introduced in the newer release.
If you attempt to attach a database to an earlier version, you will get SQL Server error
with the internal version numbers listed in the error message text.
The internal database versions for SQL Server aren't clearly documented in the Microsoft documentation.