Can't Open Database, Wrong Version - database

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.

Related

Problem with installing AdventureWorks on SQL Server 2016

I have encountered a problem with importing a backup of AdventureWorksDW2017. I tried to install the backup of it, following this guide: https://learn.microsoft.com/en-us/sql/samples/adventureworks-install-configure?view=sql-server-ver15, however most of the options listed in there, like Tasks, Restore Database, etc. seem to be missing in my installation.
Currently, I am using SQL Server 2016 and SQL Server Management Studio 18. I tried reinstalling it, hoping that the reason could be a corrupted installation, but it didn't help.
Thanks in advance

SQL Server - Cannot Attach Database (869) or need Import .sbf|.dbf (visual fox pro)

Long time reader first time poster!
I have a bit of a unique problem which is intensified by my lack of SQL server knowledge. I have SQL Query writing ability but my server side admin is very weak.
Background:
I am currently working at a very small charity that had a "home-made" Superbase CRM solution which died. The tables which make up this CRM are .sbf files which I wasn't able to open with any other software.
Luckily I had exported the necessary tables to .dbf files before the Superbase died. Sadly these files do not operate as you would expect, so can't be opened in Access/Excel etc.
After lots of searching and testing, I found a work-a-round which came in the form of a visual fox pro driver which when installed became an option on the SQL import and export tool. This allowed me to import all the tables to my local SQL database.
For the last 12+ months I have been using the SQL Server studio as tool for data mining and analysis.
Last week we had a consultant IT guy come in and migrate our PC's to O365 (Azure?). I was on holiday at the time but beforehand I had made him aware of my server and the location of the databases. I made it clear that these items were absolutely crucial to the charity.
He did the migration and ensured that the databases were retained but didn't install a local SQL server but did install SQL Server studio 2012.
The Problem:
I cannot attach the databases.
Attach database failed for Server 'DESKTOP-PDTHLCL\SQLSERVER'. (Microsoft.SqlServer.Smo)
The database 'FINANCE' cannot be opened because it is version 869. This server supports version 782 and earlier. A downgrade path is not
supported. Could not open new database 'FINANCE'. CREATE DATABASE is
aborted. (Microsoft SQL Server, Error: 948)
I have done lots and lots of reading in an attempt to solve this issue, at first thinking that I just need a later install of Local SQL DB but I exhausted that. - I have basically uninstalled and installed every version I could find :-)
From my investigation I have found out that the 869 error is a permissions issue not a version issue (unconfirmed).
In an ideal world I would love to be able to attach my databases to the new server. (Please help)
If this just isn't possible, then my only other solution would be to re-import the .sbf(.dbf) files to the new server.
The problem I have is I cannot remember how I got the visual fox pro drivers to display in the import export software. I have them installed but they don't show.
I would really appreciate any help you can give me, I have spoken to the IT guy and he admitted that this is beyond the realms of his expertise.
Visual Fox Pro Driver installed
.
Visual Fox Pro Driver installed2
.Current Server version
Please forgive me if the answers of these questions are already on the forum, sometimes I find the solutions are too technical or not close enough to my specific problem to be helpful.
Thanks
Darren
This error:
The database 'FINANCE' cannot be opened because it is version 869.
This server supports version 782 and earlier. A downgrade path is not
supported. Could not open new database 'FINANCE'. CREATE DATABASE is
aborted. (Microsoft SQL Server, Error: 948)
Means that the database files are from a SQL Server 2017 instance and you're attempting to attach (or restore) them on an earlier version of SQL Server (SQL Server 2014).
To resolve, just install the correct version of SQL Server, or upgrade the instance to SQL Server 2017 or SQL Server 2019.

Script Task Corrupt - SSISDB execution error after upgrading from SQL Server 2016 to SQL Server 2016 SP2

We recently updated our production SQL Server 2016 Enterprise instance from SP1 to SP2. We are currently on version 13.0.5026. Prior to the upgrade, a user with connect rights to SSISDB and proper rights on the Integration Services Catalog folder could deploy an ISPAC file successfully.
After the upgrade, the same users can still deploy to the SSISDB, but when you execute the .DTSX, the script task inside fails validation. If I deploy the exact same ISPAC as a sysadmin, there's no issue. The usual solution I've seen is to confirm that SSDT Configuration Properties are set to SQL Server 2016. We have verified this is set correctly prior to building the ISPAC.
I saw a similar issue when migrating from SQL Server 2014 to 2016 a couple years back, but the solution at that time was to give the Proxy account that runs the package modify rights to the C:\Windows\Temp folder so it can generate temp files. This new issue is hard to pin down, and I don't want to give out sysadmin just so others can do the simple deployment steps.
Any thoughts or suggestions are appreciated.
*******Update/edit************:
The server has a SQL Server 2016 deployment tool located under SQL Server/130/DTS/Binn - ISDeploymentWizard.exe. This deployment tool works. There is another identical wizard under the 140/DTS/Binn location, same name but 1 KB larger (assuming this is because SSMS is a separate install now, and I installed latest and greatest on server). This one fails deployment. I'm banging my head against the wall as to why one works but the other doesn't. Locally we all use SSMS 2017, and with that we get the 140/DTS/Binn ISDeployment file, not the 130 (since that's SQL Server 2016 and we're using SSMS 2017, which I thought was backwards compatible). Either way, this problem just started occurring and we've been on the same version of SSMS for a few months.
Image of the Execution information report from SSMS
Had resolved a similar issue with C# scripts recently. In short: don't use 140 version of ISDeploymentWizard.exe with MS SQL 2016. It apparently mangles something in C# code, or components' properties, and 2016 runtime stops recognising them.
In my case, a package with C# script source has started to throw the following error during the validation phase:
Error: Microsoft.SqlServer.Dts.Pipeline.ComponentVersionMismatchException:
The version of C# source component name is not compatible with this
version of the DataFlow. [[The version or pipeline version or both for
the specified component is higher than the current version. This
package was probably created on a new version of DTS or the component
than is installed on the current PC.]]
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostCheckAndPerformUpgrade(IDTSManagedComponentWrapper100
wrapper, Int32 lPipelineVersion)
The first comment here has helped me to ultimately identify the cause.

VS2013 schema compare: "Source is unavailable" when running against SQL Server 2016 Express

I'm trying to run a schema comparison using Visual Studio 2013.5 with SQL Server Data Tools 12.0.50730.0 against a SQL Server 2016 (13.0.300) Express database.
I can configure the source connection OK, and when I hit 'Test Connection' in the connection properties dialog it says "Test connection succeeded."
However, when I hit 'Compare' in the schema comparison window it says "Initializing Comparison..." for a few seconds, then "Source is unavailable: "
This only happens if I use a SQL Server 2016 as the source, other servers work fine.
Is this a bug?
EDIT: I have also tried using SSDT 14.0.50730.0 in VS2015 and I get the same error.
In Visual Studio 2017 I had the same issue and the only solution that worked for me was:
Close Visual Studio, open it and try again :) It seems to be a caching issue. Another option is to rename the DB but that's not a nice way of workarounding this issue.
SQL Server Data Tools support for SQL Server 2016 is now GA and the latest update through Extensions and Updates in VS2013 and VS2015 will resolve this issue for you. You can also download directly from this page for VS2015, and this page for VS2013.
I had this error. Once I changed the server name from "pcname" to its IP "192.168.1.xxx" it worked.
The tools for SQL Server 2016, like the database engine itself, are still in preview. The July RTM release of SSDT doesn't include support for SQL Server 2016. You'll need to download and install the "SSDT June Preview" release from here: https://msdn.microsoft.com/library/mt204009.aspx
I have found that using username#servername as the username for connecting will fix the issue when it happens against Azure databases. Not sure if this works for non-Azure. I've had connections that have historically worked without doing this suddenly stop and then this has fixed it for me.
For instance, when using a login of mylogin and connecting to myserver.database.windows.net, if I instead use mylogin#myserver.database.windows.net as the username I won't get the "Source is unavailable" issue.
I was having the same problem connecting to AWS RDS instance. The only changes that I can tell caused the problem were upgrading to VS2015 and SSDT 14.0.61021.0
I added the following to the connection string and some combination of them fixed the problem:
;Connect Timeout=60;Encrypt=False;TrustServerCertificate=True;Persist Security Info=True
I figured this out by recreating the comparison then comparing the two .scmp files
When I had this error message, the solution was to use a login that had the sysadmin server role.
It seems to be a cache issue. I get it resolved by
Connect to some other Database on the same server
Compare schema against target project
Remove history of your main database from the connections
Restart Visual Studio
Create connection with your main database and compare schema again
Hope it works for you!

sql server 2008 express setup problem

I previously had sql server 2005 express and uninstalled it.. I also uninstalled any vs related programs and installed visual web developer 2008 express edition with SP1. now that I am trying to install sql server 2008, I am seing error messages like no other and leave that alone without any suggestions..
the latest one which I could not come to a proper solution on the internet is;
consistency validation for sql server registry keys error which suggests
"The SQL Server registry keys from a prior installation cannot be modified. To continue, see SQL Server Setup documentation about how to fix registry keys.
as you might have guessed nothing so informative in the documentation... Also, when I try to delete any sql server related registry key, it does not let me. (yes I stopped all the related services..)
anybody here that can be of any assistance?
You can try with this procedure :
Stop all SQL Server Services
Remove all SQL Server Services with sc delete servicename
Control Panel - Add/Remove Programs - Select and Remove all Microsoft
SQL Server programs
Open regedit and remove all SQL Server folders in this registry key: HKEY_LOCAL_MACHINE/ SOFTWARE/MICROSOFT
Remove SQL Server folders from Program Files directory
Reboot
This procedure should resolve the issue, i've resolved with this procedure ...
i found this to happen if you had an add-in for SSMS installed which hasn't been uninstalled before ssms was uninstalled.
You may need to change the permissions on the relevant registry keys using regedt32 first so that you can then delete the keys via normal regedit
Well actually, I believe, one should not go through such mess in order to accomplish a simple task like this. In the end, I ended up formatting my PC and re-installing SQL Server.
I know this is an old question and you already said in comments that you reformatted the machine. However, I just ran into this exact message and wanted to share my solution because it was so easy, but the error message didn't help at all!
I was using the wrong installation package. I had a 64-bit Intel Windows 7 computer and I was trying to use the x86 version of SQL Server 2008. Once I found the correct version (x64) I did not get this error and the install proceeded normally.
I had a similar problem because I still had some remnants of SQL Server 2005 left - not the services, it was some parts of the IDE. Anyway, to resolve it I used the option to upgrade (sorry, I can't remember the exact option just now). After running the upgrade portion, which took a few minutes, I could then run the full install with no problems.

Resources