2

I am trying to migrate from SQL SERVER 2012 to 2014 and found out I cannot use .bak files because of different versions. I know how to create a .sql back up file using the SSMS but I can't find a solution using a script or sqlcmd.

Md. Suman Kabir
  • 5,243
  • 5
  • 25
  • 43
Dekso
  • 541
  • 4
  • 23
  • 1
    It is allowed to restore database from .bak file from loewer version to higher version of sql server. Did you try it, what was the error you get ? – Md. Suman Kabir Feb 22 '18 at 08:46

3 Answers3

1

turns out I could use .bak files to restore databases. The problem was I'm trying to restore the file from a directory that SSMS is not authorized. Was a silly mistake. Sorry.

Dekso
  • 541
  • 4
  • 23
0

If you require to get the data in .sql files then the SQL Server's Generate Scripts wizard is the best option otherwise you can create .bak of your database and restore it on higher version.

enter image description here

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Jason Clark
  • 1,307
  • 6
  • 26
  • 51
-3

Why can't you use SSMS?

Exporting to .sql file has been discussed in How to backup Sql Server to sql file?

Did you consider Linked Servers? You can use 3 and 4 part names to access data from one server to another, for details see How can I connect to an external database from a sql statement or a stored procedure?. Another alternative to access data is trough OPENROWSET, that is also discussed above.

Pio
  • 4,044
  • 11
  • 46
  • 81