Upgrade database from sql server 2008 to sql server 2016 - sql-server

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

Related

Upgrade sql server in place on your team foundation server

Is it possible to do an in place upgrade of you SQL server edition, (for example upgrade 2012 Express to Standard), when it is running and used by a team foundation server 2015 instance? Will this need extra configuration or will we need to detach/attach the team project collections first?
I can't find any information about how to do this. It is only stated how to upgrade the team foundation server itself, or that it is no problem to do edition upgrades of sql server, but not the combination of the two.
Yes
You can:
Use the TFSServiceControl quiesce command to turn off your servers services.
Upgrade SQL Server in place following SQL Servers Instructions
Use the TFSServiceControl unquiesce command to turn on your servers services.
https://www.visualstudio.com/en-us/docs/setup-admin/tfs/command-line/tfsservicecontrol-cmd
As far as I can remember:
No.
You will need to detach your collection.
Make sure the SQL Server version is supported by your TFS Version

Is there a difference between SQL Server Express (2012) and LocalDB?

In his excellent and popular comparision chart, ErikEJ draws a distinction between SQL Server Express 2012, and SQL Server 2012 LocalDB. However, I can't find such a distinction anywhere else in the MSDN documentation ("LocalDB" isn't even mentioned in the official MS SS12 book or on the MSDN SQL Edition comparison page.) This leads me to suspect that Express and LocalDB aren't really two separate products as ErikEJ suggests, but rather just two different terms for the same thing (which would explain why, on this MSDN page, it is called "SQL Server 2012 Express LocalDB").
If there really is a difference between the products, can anyone point me to some official documentation comparing them?
OK, I think I have found the answer to my own question. (It was buried under the tabs on the SS Express product page.)
Here is a summary of the distinctives of LocalDB I found on that page:
LocalDB is a lightweight deployment option for SQL Server Express Edition with fewer prerequisites and quicker installation.
LocalDB has all of the same programmability features as SQL Express, but runs in "user mode"* with applications and not as a service.
LocalDB is not intended for multi-user scenarios or to be used as a server. (If you need to accept remote connections or administer remotely, you need SQL Server Express.)
"Express with Tools" (which includes SS Management Studio Express, Azure, etc) can be used with LocalDB or without. (The same goes for "Express with Advanced Services".)
UPDATE: I just found this useful description in Windows IT Pro (Jul '12, p.23):
LocalDB isn’t SQL Server Express, nor is it SQL Server Compact.
LocalDB uses the same sqlservr.exe engine as the other editions of
SQL Server, but it runs in user mode—not as a service. LocalDB is
used for offline development by tools such as SSDT to ensure that the
code you develop is 100-percent compatible with your production
SQL Server database.
If I am reading this correctly, LocalDB seems to be more like a configuration option of Express than an entirely separate product. So apparently if I download Express (or Express w/ Tools), I will have the option to install the LocalDB version, which is supposedly easier ("zero-configuration") than the full Express. (Update: with VS2012, LocalDB comes installed by default.)
One other important distinction, according to this post, is that "currently Visual Studio 2010 doesn't really work with LocalDB." (We have to use SS Management Studio instead, at least for now.)
*(The concept of "User Mode" or "User Instances" is a key distinctive of LocalDB. In fact, according to this post, "LocalDB can be seen as an upgrade of the User Instances feature of SQL Server Express." For more about User Instances, refer to the MSDN blogpost "What is a RANU?")
UPDATE - Feb 2021
LocalDB is SQL Server Express edition
From official documentation
Express edition is the entry-level, free database and is ideal for
learning and building desktop and small server data-driven
applications. It is the best choice for independent software vendors,
developers, and hobbyists building client applications. If you need
more advanced database features, SQL Server Express can be seamlessly
upgraded to other higher end versions of SQL Server. SQL Server
Express LocalDB is a lightweight version of Express that has all of
its programmability features, runs in user mode and has a fast,
zero-configuration installation and a short list of prerequisites.
The docs provides a very detailed comparison of features between editions.
I use a table from ErikEJ, which shows: the features and differences between SQL CE 3.5, SQL CE 4, Local DB and SQL Server 2012. According to this table the differences between Local DB and SQL Server 2012 are:
Installation size:
SQL Server 2012: 120 MB download size; 300 MB expanded on disk
Local DB: 32 MB download size; 160 MB on disk
Runs as Service
SQL Server 2012: Yes
Local DB: No (runs as process started by app)
FILESTREAM support
SQL Server 2012: Yes
Local DB: No
Subscriber for merge replication
SQL Server 2012: Yes
Local DB: No
Number of concurrent connections
SQL Server 2012: Unlimited
Local DB: Unlimited (but only local)
NB: Sorry this isn't "official documentation", but hope it's useful to the next bod as it answers the underlying query about the differences.
The major difference are Server Express run as a service while LocalDB doesn't need any server or intensive processing to run.

Move Sharepoint 2010 to point to a different database?

Has anyone here moved the database underlying a SP 2010 install from one database instance to another (same data, just hosted in another instance)?
For example. we just want to move the database to a diffrerent machine.
In addition, has anyone moved SP 2010 from using SQL Express to a higher version of SQL Server? I would like to run some proof of concept tests with SQL Express, and if all goes well, then move to SQL Standard or Enterprise.
Cheers,
Daniel
Check out the following article:
http://technet.microsoft.com/en-us/library/cc512725.aspx
I don't think you'll run into any problems, just make sure you aren't going backwards in versions between databases. Backing up a database in SQL Server 2008 and restoring in 2005 isn't easy.
I've never done this with SharePoint, but I believe it lets you specify the location of the configuration database. Then you just need to match the user permissions.
The TechNet article "Move All Databases (SharePoint 2010)" is your main guide.
Note that this article contains the following warning:
The new database server must be running the same version of Windows
Server and Microsoft SQL Server as the existing database server.
This in NOT true!
Both from my own experience in migrating SharePoint databases and talks I've had with Microsoft Primary Field Engineering, I can say this method also works when SQL Server versions differ. But only if you upgrade to higher SQL Server versions (i.e. SQL Server 2005 to SQL Server 2008 R2). I was told this scenario is also fully supported by Microsoft.
Also, don't forget to update the database compatibility level for the migrated databases. This should future-proof your databases and enable advanced SQL Server optimization.

Any benefits to SQL Management Studio 2008 when only connecting to SQL Server 2005 databases?

We run SQL Server 2005 exclusively for databases that we use (I'm trying to push to get them upgraded, but alas!). On the client side with Management Studio, are there any benefits to upgrading to SSMS2008 when only connecting to SQL Server 2005 databases? I've seen that Intellisense won't work, so I'm curious if it's worth the hassle.
Yes, there's quite a few improvements intellisense is definitely a big one for developers (Intellisense only works against SQL Server 2008 databases, unfortunately), but there are also other things like T-SQL Debugger, Activity Monitor, the Object Explorer Details
Also, multi-server queries, and the ability to color the connections (get a visual clue whether you're on dev, test or prod system) and a lot more.
See some good background info here at Simple-Talk.
It is up to you. My favorite is search feature. See link for details.
Having worked with SQL 2005 since it came out, upgraded my client tools to 2008 when it came out, and still not upgraded our server, I don't think it is worth upgrading, especially if you aren't moving to SQL 2008 on your server anytime soon. There is no real harm in upgrading, but you need to get familiar with a slightly different tool that IMO is neither worse nor better.
There are a lot of things to like about SQL2008 SSMS, even if you are connecting to SQL 2005 servers:
Customize the columns in the object views, including some very useful ones like DB size
When viewing a query execution plan, it will list any indexes that it recommends
Color-code server connections
Execute SQL statements against multiple servers
In our environment, we have a mix of SQL 2000, 2005, and 2008 servers, so I still use SQL 2005 SSMS to connect to all three (The new "Activity Monitor" in SQL2008 SSMS doesn't work for SQL 2000 servers.)
I don't want to sound like taking sides, but Toad 4.6 rulez! :-)

How do I fix a Cross language installation problem in SQL Server 2008?

I'm trying to do a SQL Server 2008 setup and I've been given a Cross Language Installation failure. More specifically:
Rule "cross language installation: failed.
the Setup language is different than the language of existing SQL Server features. To continue, use SQL Server Setup installation media of the same language as the installed SQL Server features.
I do not have SQL Server Express installed and I browsed through "Add or Remove Programs" and was unable to find anything that looked like it was a previous version of SQL.
Any tips?
I restarted the setup after facing the same problem, and I realized that man should not close the installation center till the setup process is completed. If you leave it open it will work.
Ensure that you have uninstalled all of your old SQL Server versions. Also you must restart the installer if you have not done that when you began installation.
All I had to do was exit the installer and start the process again. For some reason it worked the second time around.
I had the same problem today when installing SQL Server 2008 Express on a computer that has never had an instance of SQL Server installed.
I found that "Microsoft SQL Server 2005 Backward compatibility" was installed. I removed this via Add/Remove Programs and was able to successfully install SQL Server 2008 Express afterwards.
Change the Current Windows Language interface for the needed language you want to install.
That will make it possible for the Installer to launch the Localized version.
If you've previously installed SQL on the machine (or apparently some RedGate tools) have you checked for any SQL detritus in the registry?
If not then the MS forums have details of some reg keys to look out for, and some of the links are worth following for advice on what to delete from the registry.
On my installation of Sql Server 2008 Express, this was caused by having Sql Server 2005 Express Tools installed while trying to install 2008. Uninstalling 2005 Tools fixed the problem. I was able to keep Sql Server 2005 Express, including Sql Server 2005 Backward compatability; only had to nuke tools.

Resources