Copying Databases between Different Versions of SQL Server

In summary, you can move databases between different versions of SQL Server, but it is not possible to move them between different versions of SQL Server and different versions of SQL Server Developer.
  • #1
WWGD
Science Advisor
Gold Member
7,003
10,423
Hi All,
I am trying to move databases ( together with associated data objects) between an instance in SQL Server
Express (2016) and an instance living in SQL Server Developer 2017. I know that, between instances of the same version I can : 1) Copy the script in one instance and run it in the instance I want to move the database to 2) Backup in one instance and restore in the destination distance 3) Detach a database and resore it in a new instance.
Now: ** Will any of these methods work when moving to a new version? Is there anything else that would work?
Thanks.
 
Computer science news on Phys.org
  • #2
I've not used any of these solutions and can't say whether they'll work for sure. In any event, I thought they may lead to a solution for your issue.

There are answers to similar questions here:

https://technet.microsoft.com/en-us/library/ms186390(v=sql.105).aspx

and here's another view of how to do it:

https://solutioncenter.apexsql.com/restore-sql-server-backup-to-a-newer-version-of-sql-server/

Usually the backup tool makes a database copy that can be restored on different versions and even different vendors.

Here's a vendor based solution:

https://docs.microsoft.com/en-us/sql/ssma/db2/migrating-db2-databases-to-sql-server-db2tosql
 
  • Like
Likes WWGD
  • #3
You should be able to migrate from 2016 to 2017.
From 2017 to 2017 is likely not possible when using backups.

I know for a fact that this is the case for 2016 -> 2014 and 2014 -> 2012.

If it's for use by third parties I'd go for something like 2014.
If it's for personal (or internal use in a company) you can use the version you like.
 
  • Like
Likes WWGD
  • #4
JorisL said:
You should be able to migrate from 2016 to 2017.
From 2017 to 2017 is likely not possible when using backups.

I know for a fact that this is the case for 2016 -> 2014 and 2014 -> 2012.

If it's for use by third parties I'd go for something like 2014.
If it's for personal (or internal use in a company) you can use the version you like.
Thanks, but it is not just a difference in years, it is also a different in version: 2016 is Explorer, while 2017 is the Developer version.
 
  • #5
A lengthy but reliable method is copy the original database into the form of pure text records (ASCII).
Then read those text files into the new system.
This should work even if the original DB system is completely unrelated to the new one.
It has an advantage too that you are automatically getting a full backup of the data.
 
  • Like
Likes WWGD
  • #6
Normally what I do is mysqldump, followed by an import. It doesn't take very long and you can even pipe them together if you're familiar with the command line.
 
  • Like
Likes WWGD
  • #7
newjerseyrunner said:
Normally what I do is mysqldump, followed by an import. It doesn't take very long and you can even pipe them together if you're familiar with the command line.
Thanks, but I have SQL Server ( Explorer, Developer ) at the two ends. Would that still work?
 
  • #8
Sorry, I forgot to ask whether migrating databases will also transfer objects: indexes, triggers, logins, etc. into new database.
 
  • #9
Everything existing in the original database should be able to be dumped in some form that the new database can use.
Usually you don't bother with indexes as those are automatically rebuilt when the data is imported to the new system.
If there are significant methodology differences between the two systems, it might be necessary to translate some data components so that the new system can make sense of it.
If that's the case (generally unlikely), you'll need to have a program written which does the job of translating those difficult bits.
 
  • Like
Likes WWGD

What is the process for copying a database between different versions of SQL Server?

The process for copying a database between different versions of SQL Server involves creating a backup of the database from the source server, transferring the backup file to the target server, and then restoring the database on the target server. This process can be done manually using SQL Server Management Studio or through automated scripts.

Can a database be copied between any versions of SQL Server?

No, a database can only be copied between compatible versions of SQL Server. This means that the source and target servers must be running the same major version (e.g. SQL Server 2017) and the same edition (e.g. Standard, Enterprise, etc.). Additionally, the compatibility level of the database may need to be adjusted before the copy can be successful.

What are the potential issues that can arise when copying a database between different versions of SQL Server?

Some potential issues that can arise when copying a database between different versions of SQL Server include compatibility issues with certain features or data types that may not be supported in the target version, differences in database engine settings or configurations, and potential data loss if the target version has a lower storage capacity.

Are there any tools or utilities that can assist in the process of copying a database between different versions of SQL Server?

Yes, there are third-party tools and utilities available that can assist in the process of copying a database between different versions of SQL Server. These tools can help with compatibility checks, data conversion, and automating the backup and restore process.

Is it possible to copy a database between different versions of SQL Server without any downtime?

Yes, it is possible to copy a database between different versions of SQL Server without any downtime by using database mirroring, log shipping, or transactional replication. These methods allow for continuous data synchronization between the source and target servers, minimizing downtime during the copy process.

Similar threads

Replies
11
Views
1K
  • Computing and Technology
Replies
1
Views
1K
  • Computing and Technology
Replies
8
Views
2K
Replies
6
Views
1K
  • Computing and Technology
Replies
1
Views
2K
  • Computing and Technology
Replies
9
Views
3K
  • Programming and Computer Science
2
Replies
50
Views
4K
  • Programming and Computer Science
Replies
5
Views
2K
  • Programming and Computer Science
Replies
17
Views
1K
  • Programming and Computer Science
Replies
5
Views
2K
Back
Top