SQL Server 2008 R2 Upgrade / Server Move to SQL Server 2014 - sql-server

I have a new server and want to install SQL Server 2014 Standard and migrate my database across from my old server which runs SQL Server 2008 R2 (10.50.1600.1).
I have upgraded locally, but having to move servers on my production environment complicates matters, so I thought I'd ask about the best way to progress giving my situation. I can think of different options to do the upgrade, but I am not sure which is the best choice:
Would it be best to upgrade my current SQL Server 2008 R2 box with service pack 2 before thinking about the upgrade, or will this not make a difference if I'm upgrading? If I do, which is the best option below?
1) Install SQL Server 2008 R2 service pack 2 on the current server, upgrade in-situ with SQL Server 2014, perform backup. Restore SQL Server 2014 backup on new server.
2) Install SQL Server 2008 R2 service pack 2 on the current server, perform backup. Restore SQL Server 2008 R2 backup on new server on SQL Server 2014.
I understand that SQL Server 2014 includes new full text search features that are not available in 2008 which you are prompted for as part of the installation process, so I'm thinking that if I just restore a 2008 backup on 2014 I will not be 'upgrading' in full. Would it therefore be better to take option 1 (above) over option 2?

I did not find answer given by Aashish promising because he said
Restoring backup will not upgrade your database
This looks confusing. If you restore backup taken on 2008 r2 database to 2014 it would be upgraded automatically to 2014. After restoration change compatibility level to 120 and you are good to go.
Regarding upgrade from 2008 r2 to 2014 there are two methods
Inplace upgrade
Side by side upgrade
In place upgrade can be use when your environment is less complex. You need to make sure you first upgrade SQl Server 2008 R2 to SP2/Sp3( I would recommend SP3) and then run Upgrade advisor. Only when upgrade advisor does not finds any issue you can go ahead and do inplace upgrade.
Side by side upgrade is much safer but is time consuming and has rollback plan. The old instance is not touched. In this method you have to install new instance of SQL Server 2014 then migrate database using backup and restore method.
Then migrate logins using this Support article
Then migrate job using script out method of you can us SSIS transfer job task to migrate jobs.
Migrate linked server and other server objects using script out method.
Migrate SSIS packages if any.
After this you are good to go. Make sure after migration you rebuild indexes and update statistics using Ola Hallengen Index rebuild and update Statistics solution
Do let me know if any further information is required

-> Restoring backup will not upgrade your database.
So,
1)Microsoft SQL Server 2014 installation setup provide options to upgrade your database either from 2008 R2 or from 2012.
This will preform all the process and provide information if your database is upgrade able or you required to make some changes to your old database. After that you can proceed to upgrade database from 2008 R2 to 2014.
eg. Click Start, point to All Programs, point to Microsoft SQL Server 2014 , and then click SQL Server 2014 Upgrade Advisor.
For further details http://msdn.microsoft.com/en-us/library/ms144256.aspx
My recommendation would be to install SQL Server 2014 instance and then backup and migrate database from SQL Server 2008 R2 to SQL Server 2014
2) There are other third party tools that will preform all the necessary processes and messaging before upgrade.

Related

Can we restore database to SQL Server 2017 taken from SQL Server 2012?

Can we restore a database which is created and have some data in SQL Server 2012. But, now i want to migrate from SQL Server 2012 to SQL Server 2017. Is it possible to take backup in SQL Server 2012 and restore it to SQL Server 2017. I need some other solutions if not possible to restore it. Because, it's almost 30GB of data, i can't get it back if not possible to restore.
Yes, SQL Server is backward compatible. You can restore a database from any previous version of SQL Server that was supported at the time of the release. For SQL Server 2017, you can therefore restore databases from SQL Server 2008 to 2017.
SQL Server, however, is not forward compatible. Once a database is restored on a more recent version of SQL Server you cannot create a back up of that database and restore it to an older version; even if the database had the correct compatibility setting. The upgrade process is one way.
"Once a database is restored on a more recent version of SQL Server you cannot create a back up of that database and restore it to an older version", But as a work around you can script database and execute it in an older version.

back up DB to an older version

I have two SQL Servers of different versions: 2014 and 2012. I cannot upgrade the oldest to the newest one. Can I back up a DB on 2014 so that I can restore it on 2012? I would like to restore both schema and data. I would also prefer to do it through backing up, not through scripting out. Right now I am getting an error saying something like "the versions are incompatible, and you cannot restore the DB". I appreciate your help.
You can't back up & restore the database from a higher (2014) to lower (2012) version.
You can generate a script from SQL Server 2014 (DB creation and data creation script) and you can run on SQL server 2012. Only scripting is an option in this scenario to create a database/restore a database from SQL server 2014 to 2012.
You can certainly take a back from SQL server 2012 and restore in the SQL server 2014.

Using the same database on different versions of SQL Server

We have several SQL Server databases at work and we plan to keep all of them in a Database Server. However, while we use SQL Server 2014 in some of the databases, there is also a database (let's say ABC) with the version of SQL Server 2008 R2.
The problem is that; ABC is a database originated from another company and sometimes it is updated by them using scripts, etc. So, this means that we have to go together with the version they use. As far as I know, it is possible to restore a database of version 2008 R2 in the version of 2014 but the reverse operation is not possible (to restore a database of version 2014 in the version of 2008 R2).
So, in that case what is the best way to solve this problem by using the single database (SQL Server 2014) on the same server?
You can generate database from the 2014, 2008 compatible. You can dig into the advanced option and you will find creating scripts for triggers, indexes and all dependent objects.
Generate Scripts
Choose Compatibility
Specify Data generating scripts
The server could be 2014.
You just need get SQL Server Management Studio (SSMS) version 2008 and generate backup using it.
You could have lots of SSMS versions.

Does my sql code go unavailable when I upgrade my SQL Server from 2008 to 2014?

I have a server running SQL Server 2008 Enterprise version which has a lot of SQL Codes and I want to upgrade it into SQL Server 2014 Enterprise version. But I don't know what will happen after I upgrade the SQL Server. Will there any SQL Code go unavailable/error? Will it run correctly after upgrading?
SQL Server 2008/2014 is a tool. It has got nothing to do with data/procedures/views etc. Data for SQL Server is stored in the form of .mdf files. So, no, your data or procedurers wont be touched. But yes lot of features are going to be deprecated in SQL Server 2014 when compared to SQL Server 2008. Full list is here. You should go through the list and find a suitable replacement for every deprecated item before migrating.

Transaction log shipping in different edition of sql server 2014

We are considering to upgrade our Database from SQL Server 2008 R2 to SQL Server 2014. However, The new licensing with Core based seem to be very expensive.
We have one primary database and one secondary database. If we have SQL Server 2014 Enterprise Edition for the Primary database and SQL Server 2014 Standard Edition for the Secondary Database.
Question 1)
Is it possible to run transaction log shipping in different edition as above?
Question 2)
Could it be possible to run it from SQL Server 2014 to SQL Server 2008 R2?
Is it possible to run transaction log shipping in different edition as above?
Going for possibility yes it is possible to configure log shipping between SQL Server 2012 Enterprise and standard edition. But Just think of scenario where you are using enterprise features in Enterprise edition and failover happens now SQL server is on standrad edition and enterprise features will not work and you might face issue with application, some functionality crashing. I dont think you want this.
Plus again if you are using enterprise features and to configure loghshipping you take backup of enterprise edition and try to restore it on standard it would fail saying the backup has enterprise features and DB cannot be brought online because current database does not supports it
Could it be possible to run it from SQL Server 2014 to SQL Server 2008 R2?
No because you cannot restore database backup taken on SQL Server 2014 on SQL Server 2008 R2. If you like to make SQL Server 2008 R2 as primary and 2014 as secondary then you may succeed in configuring logshipping using T-SQL scripts( you cannot do it using GUI) but consider scenario where failover occurs and 2014 is new primary you cannot fail it back to 2008 r2 as Higher to lower version is not allowed.
Hope this is clear

Resources