Moving database from SQL Server 2008 to SQL Server 2005 - sql-server

I want to move my my database of a SQL Server 2008 to a SQL Server 2005 Express on another machine. Is this possible? How should I do this?

There is no "built-in" way to move a database from a newer SQL Server version to an older version.
The only way that I know if is to use SQL Server 2008's "Generate Script" wizard to script your whole database (tables and data) and execute these scripts on the SQL Server 2005 to insert the data there.
(Moving a database from a older SQL Server version to an newer version would be easier - just take a backup and restore, SQL Server automatically converts it to the new version)

Related

Restore database in SQL Server from .bkp file [duplicate]

The database was backed up on a server running version 8.00.2039. That version is incompatible with this server, which is running version 11.00.2100. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.SmoExtended)
I am trying to restore and I get this message.. is there anyway to restore this backup without having to install SQL Server 2005?
SQL Server 2012 (v11.0) doesn't support direct upgrade from SQL Server 2000 (v8.0).
You'll have to use a "in-between" step restoring your SQL Server 2000 database to a SQL Server 2005 or 2008 instance, and then do a backup from there, in order to get your .bak file into the latest database server.
There's no trick or workaround for this - that's just the way it is, and you'll have to deal with it.
There are tons of blog posts on this topic, e.g.
Migration SQL Server 2000 to SQL Server 2012

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.

Export SQL Server 2014 database (2008 compatible) in a backup file compatible with 2012

I'm a bit stuck with this scenario. My dev VM has SQL Server 2014 on it, and I've been working on a SQL Server 2008 database. The 2008 database is listed as '2008 compatible'. I now need to put this on a demo server which has an older edition of SQL Server (2012), and I find that 2008 compatible DBs don't create 2008 compatible backups (which I would have thought would be a given).
I'm actually trying to backup from SQL 2014 and recover into SQL Server 2012. How do I get a SQL Server 2008 or SQL Server 2012 compatible backup file from my 2008 compatible database?
Thanks.
You have to script the SQL database creation, in SQL Server Management Studio :
right click on the DB -> Task -> Generate script
From there a series off dialog to choose what to generate with the SQL command creation and where, in clipboard or file (recommanded for big DB), with optionally the data as some Insert Into SQL command. To find the data option click on the "Advanced" button and search for "Type of data to script"

Is SQL Server 2005 database compatible with 2008?

I don't know if the title is correct but well what I'd like to ask: is it possible to import my database from SQL Server 2005 to 2008 or is the database in SQL Server 2005 compatible with 2008? I'm still a newbie.
Thanks
You can restore an SQL Server 2005 database on SQL Server 2008.
You can not restore an SQL Server 2008 database on SQL Server 2005.
Generally speaking, at the time of writing,
you can restore any database starting from SQL Server 2005 on a newer version of SQL Server (up to 2016), and
you can not restore any database on an earlier version.
You might want to increase the compatibility level of your DB after restoring it on a newer SQL Server version.
Yes. They are compatible. You can use a backup to transfer all the data.

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.

Resources