sqlserver migrate to high-low version version

Many wonderful things, you do not, have to migrate to sqlserver 2014 2012

At first I thought then restore the backup method you can, who knows the ultimate compatibility problems can not be solved (high-low version is not compatible with versions of files backed up, even if compatibility mode is selected in the high version).

Well, only two ways to achieve:

1. Migrate by way of generating scripts

Open the script generation wizard

Choose to migrate all or individual tables ...

 

Click on "Advanced", modify the script generation settings

Select a script compatible version (choose according to need) and script generation type (schema and data)

 

 

It has been the next point, the next step ... until completion.

Nice to get the generated script file script.sql

 

Copy the following script file to generate good sqlserver on the server you want to import, and then to build an empty database, the name to be the same.

 

Because the file is too large, can not be executed using sql server Management Studio, why? Will get stuck, do not believe you try

Open a command prompt cmd

 

Description: sqlcmd -S server address -U username -P password -d database name -i large file path to the script file 
the sqlcmd -S localhost -U SA -P . Sh2017 + 1 -i Script .sql

And other successful execution just fine.

2. The import and export functions to migrate through the sql server Management Studio

Note! This method requires two servers can access each other

Open the Import Export Wizard, import or export of their own choice, I chose to export

 

Select the database you want to export it already login

 

 

 

Select the target database (that is, where to export), if there is no database on the target server, click on the "new" to create a new one. I'm here to make presentations, guide from the local to the machine

 

 Next, Next, choose to export or import tables and views

 

Next ... Next .... then it has been performed last, be able to see the data being migrated. Wait for it to finish the end!

 

Guess you like

Origin www.cnblogs.com/CK16/p/11590163.html