SQL Server 2014 backup to 2012 - sql-server

Are there any tools to convert SQL Server 2014 database to 2012?
I tried Generate Script but the generated script with data is too large and SQL Server Management Studio did not execute it, I need to have both schema and data.

To my knowledge, there are basically three two options for migrating a database to a lower version of SQL Server, without using 3rd party tools:
Generate Scripts (not really suitable for large amounts of data)
Custom Scripting and BCP or Import/Export Wizard
SQL Server Integration Services (Transfer Database Task)
First option is not suitable in your case, as noted.
Second option is to simply script the structure of the database, and then use the Import/Export Wizard to copy the data, one table at a time. Note, that if you have foreign key constraints in your database, you might want to disable the constraints until after you have populated all your tables with data. This blog post explains in details how this can be done.
Third option uses the SISS Transfer Database Task which basically uses SMO to create the objects on the destination server and then transfers the data. This is the recommended way of migrating a database between SQL Server instances of different versions. SSIS requires that you have installed SQL Server Data Tools - Business Intelligence (SSDT-BI) for Visual Studio. Before SQL Server 2012, this was called Business Intelligence Development Studio (BIDS). You can download these here:
Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2013
Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2012
If you don't have Visual Studio, SSDT-BI / BIDS is included in the SQL Server installation.

Use the script, but instead of executing it trough Management Studio, use the lightweight sqlcmd utility.
http://msdn.microsoft.com/es-es/library/ms162773.aspx

Oh well, Dan's second option does not work: after installing SSDT-BI for VS2013 and configuring the Database Transfer Task it says that the version of the source database instance has to be lower or equal to the version of the destination database instance: so, a migration from 2014 to 2012 (or in my case 2008R2) is not possible.

Related

"Create new table" is not visible on SSMS 2016 for SQL Server 2008

I have a shared hosting. I was happy with it. I was creating new databases on its panel and then I was managing my databases with SQL Server Management Studio. I could add new table by right clicking the database with designer.
Database is: SQL Server 10.0.2531 (SQL Server 2008 SP1 I think)
My SSMS details
Microsoft SQL Server Management Studio 13.0.15500.91
Microsoft Analysis Services Client Tools 13.0.1605.86
Microsoft Data Access Components (MDAC) 10.0.10586.0
Microsoft MSXML 3.0 6.0
Microsoft Internet Explorer 9.11.10586.0
Microsoft .NET Framework 4.0.30319.42000
Operating System 6.3.10586
I have updated my SSMS to 2016. But now, when I right click on my database, there is no "New -> Table menu". The right-click menu is only "Filter, Start Powershell, Report and Refresh"
Now I can create new table by New Query menu (by writing query), but where is my "New -> Table menu"? Is this a security issue ?
There is a bug reported for this issue
connect.microsoft.com
social.msdn
In SSMS you can use a SQL script to create a new table because that processing is done on the server. However, SSMS provides the capability to add a table, here the User interface has to be developed to provide the necessary features for each version of SQL Server, this obviously has an overhead. So gradually older versions get dropped.
SSMS for SQL 2012 did not provide support for SQL Server 2005.
Now as Damien_The_Unbeliever points out SSMS for SQL Server 2016 supports all supported versions of SQL Server. But this is for "Mainstream Support End Date", so alas, SQL Server 2012 is the last version that has full UI support.
Still you can have mulitple versions of SSMS installed, just like you may need to keep BIDS as well as Data Tools installed to maintain older verions of SSIS

Unable to create new table in SQL Server 2016 Mgmt Studio [duplicate]

I have a shared hosting. I was happy with it. I was creating new databases on its panel and then I was managing my databases with SQL Server Management Studio. I could add new table by right clicking the database with designer.
Database is: SQL Server 10.0.2531 (SQL Server 2008 SP1 I think)
My SSMS details
Microsoft SQL Server Management Studio 13.0.15500.91
Microsoft Analysis Services Client Tools 13.0.1605.86
Microsoft Data Access Components (MDAC) 10.0.10586.0
Microsoft MSXML 3.0 6.0
Microsoft Internet Explorer 9.11.10586.0
Microsoft .NET Framework 4.0.30319.42000
Operating System 6.3.10586
I have updated my SSMS to 2016. But now, when I right click on my database, there is no "New -> Table menu". The right-click menu is only "Filter, Start Powershell, Report and Refresh"
Now I can create new table by New Query menu (by writing query), but where is my "New -> Table menu"? Is this a security issue ?
There is a bug reported for this issue
connect.microsoft.com
social.msdn
In SSMS you can use a SQL script to create a new table because that processing is done on the server. However, SSMS provides the capability to add a table, here the User interface has to be developed to provide the necessary features for each version of SQL Server, this obviously has an overhead. So gradually older versions get dropped.
SSMS for SQL 2012 did not provide support for SQL Server 2005.
Now as Damien_The_Unbeliever points out SSMS for SQL Server 2016 supports all supported versions of SQL Server. But this is for "Mainstream Support End Date", so alas, SQL Server 2012 is the last version that has full UI support.
Still you can have mulitple versions of SSMS installed, just like you may need to keep BIDS as well as Data Tools installed to maintain older verions of SSIS

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.

How to Migrate TFS SQL Server 2014 DB to 2012

We are using TFS 2013 and SQL Server 2014. A client of ours is requesting the TFS project and also uses TFS 2013 but with SQL Server 2012. How can we go about migrating? Will a simple backup and restore work when downgrading from 2014 to 2012?
You CANNOT do this - you cannot attach/detach or backup/restore a database from a newer version (like 2014) of SQL Server down to an older version (SQL Server 2012) - the internal file structures are just too different to support backwards compatibility.
And no - setting the compatibility level to 110 (for SQL Server 2012) in SQL Server 2014 also doesn't help ; it will prevent your T-SQL code from using new SQL Server 2014 T-SQL features, but it does not change the internals of the database file in any way, shape or form.
You can either get around this problem by:
using the same version of SQL Server on all your machines - then you can easily backup/restore databases between instances
otherwise you can create the database scripts for both structure (tables, view, stored procedures etc.) and for contents (the actual data contained in the tables) either in SQL Server Management Studio (Tasks > Generate Scripts) or using a third-party tool
or you can use a third-party tool like Red-Gate's SQL Compare and SQL Data Compare to do "diffing" between your source and target, generate update scripts from those differences, and then execute those scripts on the target platform; this works across different SQL Server versions.
Update by #MrHinsh:
WARNING: While these options may work for your own database projects it will NOT work for TFS. Changing the Database schema, moving data, or editing the tables will BREAK TFS and will invalidate your support agreement with MSFT
Backup / restore isn't a viable approach here - no version of SQL Server knows what was changed in the database files' formats for the next version.
So copy database schema and data from 2014 to 2012 and pray it will work - chances are, it wouldn't. There should be an Import / Export wizard in SSMS, at least it was there before.

No selection to install SSIS, SSRS and SSAS

Goal:
Install Developer SQL Server 2012+ Business intelligence and its SSIS, SSRS and SSAS in my computer.
Problem:
Can't find the settings or something similar in the install selection to install SSIS, SSRS and SSAS in my computer.
Before doing the installation, a screen was displayed with selection of feature. Look at the picture.
It is in the Developer Ed of VS 2012. You just have to look for it now because they separated it out into a different place. Look for SQL Server Data Tools 2012 in your start menus and launch it; however, if it does not come up, then navigate to find your VS 2010 and start it up and load up your Integration Services project in there. This is what I had to do.
What you are looking for is Sql Server Data Tools. Bear in mind that there are 2 versions of the Data Tools - someone called them data tools - db and data tools - BI for lack of a better term.
Data Tools - BI are the compact version of Visual Studio 2010 with all the required project types for ssrs ssis and ssas.
Data Tools - db that you can get here provide connectivity to sql server via the Data Tools - (BIDS in sql server 2008).
The selection is disabled as Aaron said due to the fact that Intergration Services (SSIS), Analysis Services(SSAS) and reporting Services (SSRS) are already installed.
You want 2012, since others provided that information here is instead for you and OTHERS to get 2014 Data Tools and 2008 BIDS :
SQL Server Data Tools (SSDT) for SQL Server 2014
http://msdn.microsoft.com/en-US/jj650015
OLD 2008 for some of you still wanting it / using sql server 2008....
For getting BIDS With SQL Server 2008 Developer Edition, you simply want to search for
"SQL Server Business Intelligence Development Studio"
This will open the Visual Studio 2008 Shell of which you then click on Create - Project
Now you have all your options. This is right next to Microsoft SQL Server (SSMS)

Resources