I do not want to automatically change the database version - sql-server

version of my database is 661.
when i attach my database in new version of sqlserver, version of my database changed to 665
Automatically.
I don't want to change version of my database.
how can i do that?

You can't prevent automatically database version upgrade when you're attaching/restoring database from lower to higher version of SQL Server.
Source: A lot of years of experience.
BUT, you can do a manual migration of higher version database into lower version by doing THIS

Well, I think you are using SQL Server 2008 R2 database which are 661 version. Hopefully you are trying to attach 2008 R2 to an SQL server 2008 instance but once the database has been upgraded to an 2008(665 version), it cannot be downgraded to SQL Server 2008 R2(661).
You need to uninstall SQL Express and reinstall the latest version to fix the problem.

You can't stop it changing the version, when an older version database is attached to a newer version of SQL server, it must perform these upgrade steps so before the database can be brought online on the new version. These upgrades are internal to SQL server and include things like file format changes etc, they themselves should not affect behaviour of your user code (although the changes in the new version of the SQL engine might).
The only significant result of these upgrade steps is that the database can no longer be attached or restored to an older version of SQL server.

Related

SQL Server SSRS ReportServer Database Version Error

This is probably a trendy question, But I promise you my problem is different.
Lately my server windows crashed and I was forced to install new windows.
I took a backup of the database "ReportServer" and "ReportServerTempDB".
Until then I didn't remember the SQL Server version was installed before the windows crashed.
Now when I try to attach these databases and run the report server, it tells me the following message
"The version of the report server database is either in a format that is not valid, or it cannot be read. The found version is '163'. The expected version is '162'. (rsInvalidReportServerDatabase)"
I've made some research, and understood that my current installed SQL Server version is higher than the database, I tried installing some cumulative updates but when I run the updates it seems not to be recognizing the SQL Server version installed.
Current installed version: Microsoft SQL Server Enterprise: Core-based Licensing (64-bit) 2014 v12.0.2000.8
Previously installed version: Microsoft SQL Server 2012 Enterprise Not sure though.
My problem is that I can't open the ReportServer database because it's version is older and I can't install the right cumulative update to fix this issue. Can anyone point me to the right direction?
Much appreciated Thanksss!!.

When installing SSAS, should you install the version that corresponds to the version of SQL Server installed, or go with the newest version of SSAS?

I am currently running SQL Server 2014 and need to install SSAS. Is it best to match the version of SSAS to the version of SQL Server installed or is it recommended that the newest version of SSAS be installed?
I figure the SQL Server environment is set up one of two ways:
1) You should usually match versions of SQL Server and SSAS for compatibility reasons (they were in theory designed for each other).
2) You should usually install the newest version of SSAS because this is the current version that the SQL Server team is focusing their most time on and thus has more bug fixes, security fixes, features, etc. than older versions.
Thanks!
Great question, and in this case the answer is 2:
You should install the newest version of SSAS because this is the current version that the SQL Server team is focusing their most time on and thus has more bug fixes, security fixes, features, etc. than older versions ..unless you have a version installed prior or equal to SQL 2008.
In your case of SQL 2014, install the latest version. There is no need to install the version that was released at the same time as your version of SQL Server.
See The Installing SQL Server Analysis Services Page for more information.
The SSAS and SSMS teams work independantly of each other as is the case with many teams within Microsoft.
In order to offer a recommendation I need to know whether you value stability or features more?
Since SSAS is a separate instance from SQL Server it does not need to be the exact same version as SQL Server. Check out this article from Microsoft on SSAS version compatibility. Based on this article I would recommend you install either SSAS 2014 or SSAS 2016.
At the end of the day, the safest thing to do is install the same version of SSAS. So if you value stability and don't want to deal with unforeseen problems down the road, I would recommend 2014.
If you want a specific feature in 2016, or just like installing the latest and greatest, then you could install 2016.
Note that I have never installed different versions of SSAS and SQL Server.
Just install the latest man, go with the flow, and accept one the answers.
People take time to answer your question.
You can install different versions of SSAS and the SQL Server Data Engine on the same host, yes. Should you? That completely depends on your needs. If it's a requirement that you have SSAS 2016, because it has a feature that 2014 does not, but requirement to use 2014, because 2016 breaks something else, or isn't supported, then you can do that.
There weren't a huge amount of breaking changes in SQL Server 2016 though: Breaking changes in SQL Server 2016; so I'm surprised you want to go to route.
If you have SSAS 2016 and SQL Server Data Engine 2014, that's 2 sets of licences; you'll need one set for 2014 and one for 2016. If, however, you're using just one version (let's say 2016), then that's one set of licences; as your licences gives you access to all the tools that comes with that version of SQL Server (so you also get SSIS, and SSRS). That doesn't seem cost effective.
I realise that this is a question in an answer but I have to ask; Why do you want 2 different versions installed?

Upgrade database from sql server 2008 to sql server 2016

I have database created on SQL SERVER 2008. I want to upgrade it to SQL SERVER 2016. what is the best way to upgrade the whole database?
Thanks in advance.
Migration can be done many ways from 2008 to 2016. In-house upgrade, backup restore, etc. Different approaches are explained here:
https://learn.microsoft.com/en-us/sql/database-engine/install-windows/upgrade-database-engine
But simple backup/restore approach is the always better in my practical understanding. Also It has links for SSIS/SSAS/SSRS if required plan for those. Each has different approaches...
Major things to consider are how to remove deprecated features and how to make use of new features:
Deprecated features:
2012:
https://technet.microsoft.com/en-us/library/ms143729(v=sql.110).aspx
2014:
https://msdn.microsoft.com/en-us/library/ms144262(v=sql.120)
2016:
https://learn.microsoft.com/en-us/sql/database-engine/discontinued-database-engine-functionality-in-sql-server-2016
You can use new AMR tool to identify what tables you can use for in-memory also you can do analysis of columnstore indexes etc using below:
https://blogs.technet.microsoft.com/dataplatforminsider/2013/09/17/new-amr-tool-simplifying-the-migration-to-in-memory-oltp/
I had big problems upgrading from 2008 to 20014 as it complained about 2008 SP2 missing, but there where additional messages about missing instance ID's or nothing needed to be installed.
The upgrade from 2008 to 2012 was a better move as the 2012 is probaly better designed to deal with a previous release.
Once 2012 was installed I moved to 2014 with no problem and did not have to care about attached databases. It just upgraded.
I had to use the "SQL Server Configuration Manager" to enable Named Pipes or TCP/IP connection in the "SQL Server Network Configuration" section, and enable the new SQL service .exe in the windows firewall.
To add it to the firewall the service exe "sqlsrvr.exe" was identified using the Windows task manager and using "properties" optaning the path to the .exe.
The installation makes you nervous but once installed you know SQL Server is one of the few Microsft products that does not bother you. It just works.
Instead of downloading missing servicepacks manually it was easier to run Windows update and have it suggest SQL server sevicepacks. Winows update actually helped before migrating to the next version.
Here is a nice chart of sql server editions with links to downloads:
Microsoft SQL Server Version List

TFS2017 compatibility with SQL2016 after upgrade

We were working on TFS2015 and SQL2014. Our plan of this month is upgrading to TFS2017update1 and SQL2016.
I have created a test environment on personal VM. My process :
Back up TFS database in SQL, upgrade SQL2014 to SQL2016
Upgrade TFS2015 to TFS2017update1
Restore the database.
Everything works well except step #3. I was not able to restore the database back to TFS2017. Any suggestions?
The error info:
TF30046: The instance information does not match. Team Foundation
expected 368f7830-1c67-4c4c-8bc4-ba3d5b5a5543 which was not found.
Please contact your Team Foundation Server administrator.
First, suggest you to go through the event log on your machine to see if there are some useful info for troubleshooting.
If you're using SQL Server 2016, we require a Visual C++ runtime
update to be installed.
Double check your environment, make sure you have installed a Visual C++ runtime.
Besides, since you are going to update TFS 2017 Update 1, which the support SQL2016 version minimum is SP1.
TFS version Support SQL Server version
TFS 2017 Update 1 SQL Server 2016 (minimum SP1)
SQL Server 2014
More details please refer TFS Requirements and compatibility.
You could also follow Pero P.'s suggestion,select the Pre-Production upgrade, ignore the restore.

How does ProviderManifestToken affect the database if the versions don't match?

We have a simple console app that uses EF 4 to process data; read from one, do some stuff, insert into another database. In the EDMX file, ProviderManifestToken for the destination db is set to "2005".
Yesterday, our app blew up. To make a long story short, our consultant says the db, which should be SQL Server 2000, was upgraded to 2005. That upgrade, according to them, was the reason for the app implosion. No one can explain how the upgrade occurred.
Can the value of ProviderManifestToken cause an upgrade to the db? For example, if a db is currently 2000 and this app runs with "ProviderManifestToken = 2005", can that force an upgrade on the db? What happens, if anything at all, if the versions do not match?
Do you think that Entity framework contains installation DVD to upgrade your SQL Server 2000 to SQL Server 2005? No it doesn't. Provider manifest token only describes dialect (EF generates queries based on the dialect). It doesn't trigger any changes on the database. Somebody had to upgrade your database (upgrade to a new version is not free - you must have licence for that, it is not something downloaded through windows update).
Btw. SQL Server 2000 is not supported by EFv4 anyway. If you had your dialect set to 2005 and your solution worked with your database then it was 2005 all the time because linq-to-entities queries using First, Single, Take, Skip, etc. generated for 2005 dialect don't work on SQL Server 2000.

Resources