I cannot figure out how to remedy this error when I select the SQL server object explorer.
Could not load file or assembly
'Microsoft.Data.Tools.Schema.Utilities.Sql.11 Version=11.1.0.0
Culture=neutral, PublicKeyToken=**** or one of its dependencies. The system cannot find the file specified.
I have asked on the microsoft forums but I figured people who actually work with this daily may have a better response. I am a new user with VS so my knowledge is limited. I have updated VS and I have SQL server 2012 installed on this machine.
Thank you in advance for helping me make sense of this error.
Getting the same with VS 2013, maybe the same root problem:
Could not load file or assembly
'Microsoft.Data.Tools.Schema.Utilities.Sql.12 Version=12.0.0
I was able to resolve this by getting the most recent version of Microsoft SQL Server Data Tools. This is under the tools menu:
Tools >> Extensions and Updates >> Updates
Related
I'm trying to connect my Visual Studio project to a Microsoft Access database locally on my machine, I'm able to open the database correctly in Microsoft Access and I even tried making it empty of records and as simple as possible, when I'm adding it in Visual Studio and when I test the connection it says Test connection succeeded, and it's showing me the database, it can find the table name with all the fields, but when I hit finish I get an error message saying :
Could not retrieve schema information for table or view [database table name]
I'v searched a lot and I'v seen this post on StackOverflow but it did't help. I'm still getting that error, and this is a short clip on what's happening.
Can someone please help me here!
I finally figured it out, I opened the Visual Studio Installer and I downloaded and installed the SQL Server Package and then tried and it worked just fine.
Knowing that I tried installing the SQL Server 2017 using a stand-alone installation but it didn't work, so you need to install it form the same Visual Studio Installer.
Here is an image of that :
I really find it fascinating when the things that supposed to be harder than other things like problems using MySQL with PHP to control an online Databases is easier to solve than using a local databases and Microsoft Access.
Hope this solves someone that has the same problem :)
I'm working on a project for my Internship with a collague.
but when he sent me hisasdf(Visual Studio 2015 Enterprise) and I tried to Open his Database, I got the Following Error:
The database cannot be opened because it is version 852. This server supports version 782 and earlier. A downgrade path is not supported.
Could not open new database. CREATE DATABASE is aborted.
An attempt to attach an auto-named database for file {Filename} failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I updated my Sql Server Data Tools to version 14.0.61021.0 and tried again. Unfortunately this didn't work either. (yes I tried turning it off and on again)
So I was wondering if any of you guys could help me out,
Thanks in Advance!
With kind regards,
Yours Truely
The error is saying that you are trying to attach to a database that is from a newer version of SQL Server than you are using on your machine.
I am thinking that your colleague is using SQL Server 2016 and you are using SQL Server 2014. See the versions here in the "internal version" column.
Regarding solutions, I would start by ensuring that you and you're colleague have the same versions installed. You can also try downloading SQL Server 2016 express edition and opening the database there. You can also try this answer as it is a very similar issue.
If you have any questions about this, provide more details on the steps you've taken and I'll be happy to help.
Someone has installed sql server on my machine, however i'm not sure what is the version currently installed. I tried running : Sql server installation center --> Installed Sql server features discovery report and the result was as follows:
I tried looking in the "Programs and features" section and I found this:
I also tried opening Sql server Services but its empty. Here's a screenshot:
The currently running the services are :
Currently I'm not sure what version is installed, I tried connecting to "." on Sql Management Studio but i got connection error and no instance was found.
Since you can't connect, probably the best thing to do is hunt it down on your file system. Go to your installation, it's probably located somewhere like this:
C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQSERVER\MSSQL\Binn
and find the sqlserver.exe file. Right-click and select Properties on the file. The Details tab of the properties window will show a product version. The product version isn't going to be a name you're super familiar with, but you can look up on the web what version numbers correspond to what product names. Here's one place that has a nice chart. SqlServerBuilds at Blogspot
If you do get management studio to connect, you can get the version quite quickly, either from the connection properties in the Object Explorer, or with the ad hoc query
Select # #Version
I uninstalled 2008 and 2014 version and now the discovery report shows Sql Server 2012 installation correctly
The existing answer is OK, but here is a simpler tip:
Search the entire drive C: for sqlservr.exe. Use the properties dialog in Explorer to determine the file version and Google it.
You can find out what's running with Process Explorer. It can show you the path and version.
I recently installed Visual Studio 2010 and SQL Server 2012 on a Windows Server 2008 R2 machine - (including all updates/Service Packs).
When attempting to work on a SQL Server database from within Visual Studio, VS throws the following error:
This server version is not supported. Only servers up to Microsoft SQL
Server 2008 are supported
I recall getting this same error a while back (on a different computer) when I updated a SQL Server 2008 instance to SQL Server 2008 R2. The fix, back then, was to install (or reinstall) Visual Studio 2010 SP1.
Now that I'm receiving this error again (on a new computer), I thought it reasonable to reinstall VS SP1 just like I did a while back. However, doing so did not fix the problem.
It appears as though Visual Studio may need another update to support SQL Server 2012 instances.
For clarity, here are the steps that I did to produce the error: (using VS 2010sp1 and SQL2012)
Using VS, create a Windows Forms application
Right-click the project and choose, Add > New Item
Select "Service-based Database"
Cancel out of the "Data Source Configuration Wizard"
A Database will appear under your Project in Solution Explorer. Double-click the new database
The Database will be added to Server Explorer's list of Data Connections
In Server Explorer, open the database, right-click the Tables directory, then select "Add New Table"
The error "This server version is not supported...." is thrown
Screenshots for whatever its worth..
My question is, is there a fix for this? If so, what is it?
Maybe get SQL Server Data Tools, which work with SQL Server 2012? I believe there are some good tutorials and other materials in the Developer Training Kit. I don't think there are any tricks yet to make an older version of Visual Studio / Data Dude compatible with SQL Server 2012.
Following MSDN blog link discusses about the issue that you are facing with local SQL Server database instance in Visual Studio 2010.
Using LocalDB in Visual Studio 2010
My problem was that I couldn't get VS2012 to work right with SQL Server 2012. I installed the latter product first, but after installing VS2012 and attempting to open an existing project, my existing data file just would not work. I know the software is supposed to automatically take you through a wizard to update your database in the project, but that didn't happen, and I couldn't find a way to make it happen. I'm on the point now of getting rid of SQL Server 2012 and going back to 2008. I'd rather use the most current releases, but I can't spend any more time on configuration issues.
I tried reinstalling the SSDT as well, but kept getting the same error you mentioned Jed, this seemed to let me get around the error message:
http://forums.asp.net/t/1721552.aspx/1?Working+with+Denali+SQLEXPRESS+in+VS+11+Database+issue
This error could also occur if you use the wrong provider. A recently came across the "This server version is not supported...." error and after changing the provider from sqlClient Data Provider to SQL Server Native Client 11.0 in the connection string for the Data Source configuration the problem was solved.
For me, the error arises whenever I try creating a new database. So after unsuccessfully attempting all methods advised, I bypassed the error by clicking on "Add connection" and putting my server name in the dialog box. After adding the non-existent database name, it notifies that it can't find such database and asks whether to create it. Voila! Database created (even though server version is supposedly unsupported).
Ok, I've scoured the web, BOL, various forums and I'm no closer to an answer...hopefully you fine folks can lend a hand...
We've got a dozen or so SQL Servers (some 2k, some 2005) on a network. I'm using SMO objects in a .NET application to get some standard information. My problem appears to boil down to a missing DLL - Microsoft.SqlServer.BatchParser.dll. However, this DLL did not come with the other SQL DLLs (Microsoft.SqlServer.ConnectionInfo.dll, Microsoft.SqlServer.Smo.dll, Microsoft.SqlServer.SmoEnum.dll, Microsoft.SqlServer.SqlEnum.dll, etc...). I also downloaded the SS2005 feature pack from Microsoft's site that includes the SMO objects, but still no luck.
The following code works, unless I uncomment the line that is currently commented, in which case I get the error below:
protected void btnArchive_Click(object sender, EventArgs e)
{
ServerConnection conn = new ServerConnection("my_server");
conn.LoginSecure = false;
conn.Login = "my_login";
conn.Password = "my_password";
Server s = new Server(conn);
Database d = s.Databases["my_database"];
//Table tbl = d.Tables["my_table"];
Response.Write(s.Name + " " + s.Information.RootDirectory + " " + d.CreateDate.ToShortDateString());
conn.Disconnect();
}
Error:
Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
Note, I've also tried this from SSIS using VB.NET, same behavior.
Any thoughts would be appreciated.
Thanks.
I was able to successfully run your code using the 10.* versions of the assemblies "Microsoft.SqlServer.ConnectionInfo", "Microsoft.SqlServer.Management.Sdk.Sfc" and "Microsoft.SqlServer.Smo". Try downloading the 2008 version of the SMO components, maybe it was a bug that they've now fixed.
Are you running a x64 OS on your box? There appear to be problems with BatchParser.dll in 64-bit environments - usually it is recommended to download the SMO x64 Package (SQLServer2005_XMO_x64.msi) from Microsoft.
See information about this here.
I know I'm very late to the party here, but this is still the first result when you google "smo batchparser".
When installing SMO 2014 (12.0.x) some DLLs are only installed to the GAC. To make your app work without having to manually install SMO in the target server, you must copy these DLLs with your app. Here are the paths where I got them from.
C:\Program Files\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.SqlServer.ConnectionInfo.dll
C:\Program Files\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.SqlServer.Management.Sdk.Sfc.dll
C:\Program Files\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.SqlServer.Smo.dll
C:\Program Files\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.SqlServer.SmoExtended.dll
C:\Program Files\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.SqlServer.SqlEnum.dll
C:\Windows\assembly\GAC_64\Microsoft.SqlServer.BatchParser\12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.BatchParser.dll
C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.BatchParserClient\12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.BatchParserClient.dll
C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.SqlClrProvider\12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.SqlClrProvider.dll
To access the GAC files you will need to disable the windows built-in viewer using the instructions provided by this article.
An excerpt of the article for convenience:
Open the registry editor and add/set the HKLM\Software\Microsoft\Fusion\DisableCacheViewer DWORD value: 1
You need to install following package to solve the problem , I have solved this problem twice with this package hope it may work for everyone too...
Microsoft SQL Server 2005 Management Objects Collection The Management Objects Collection package includes several key elements of the SQL Server 2005 management API, including Analysis Management Objects (AMO), Replication Management Objects (RMO), and SQL Server Management Objects (SMO). Developers and DBAs can use these components to programmatically manage SQL Server 2005.
You can get from Feature Pack for Microsoft SQL Server 2005 - December 2008 from Microsoft site
http://www.microsoft.com/en-us/download/details.aspx?id=11988
But the link location of download page changes every-time if you don't find resource you can download it from my blog too.
I have also provided some tips and resources about this in my blog if you want http://rndp-android.blogspot.com/p/missing-microsoftsqlservermanagementsdk.html
Just so we understand the issue properly, the Microsoft.SqlServer.BatchParser.dll is not installed in the Global Assembly Cache on your development machine? If so, you might want to start with re-installing the .NET Framework (the version of the Framework that you are targeting) to see if that resolves the issue.
You can also try using the .NET Framework Configuration tool to see if the assembly is indeed present in the Global Assembly Cache (GAC). This MSDN Article describes how to use this tool.
(A search of my hard drive did not return the Microsoft.SqlServer.BatchParser.dll assembly even though I can see it using the .NET Framework Configuration tool).
it comes as part of the 2005 or 2008 upgrade advisor.