1

I am trying to downgrade a SQL Server 2014 database to a lower version (SQL Server 2012) by using the task Generating scripts found when right clicked on the database.

After I make the settings in order to generate the script, the server does that but when I'm trying to open the file (the script made) on a lower version instance of SQL Server, I get the following error.

System out of memory exception thrown

Could anyone provide some help? Thanks!

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
cdrrr
  • 147
  • 1
  • 2
  • 10
  • Wich is the size of generated script? How are you opening them? You cannot open huge script via sql server management studio, you must run the script from command line. And, just for curiosity: why do you need this downgrade? – user_0 May 15 '15 at 12:00
  • 1
    @user_0 Size - 2.85 Gb; I need that because I configured some data (which took me a lot of time) to a MSSQL 2014 database and I need that database to a MSSQL 2012 – cdrrr May 15 '15 at 12:07

2 Answers2

1

As suggested by @usr you can run the script from the command line using sqlcmd:

sqlcmd -S myServer\instanceName -i C:\myScript.sql

Alternatively you can download a trial edition of ApexSQL or Redgate SQL Compare (assuming you have not tried them already) and script over the changes using these tools.

Alex
  • 21,273
  • 10
  • 61
  • 73
0

The script is too big for SSMS (a shame!). Run it using SQL Server command line tools.

I find it easier to do this by using Redgate SQL Packager or the two compare tools. They can execute enormous scripts.

usr
  • 168,620
  • 35
  • 240
  • 369