0

I have created a database in SQL Server Management Studio 2018. Now I want to restore it on another server in SQL Server Management Studio 2012.

I have tried it by creating a .bak file and .sql file but the file size is approx. 2 GB which cannot be restored in the SQL Server Management Studio of that server.

It is showing an "Out of Memory Exception".

I have also tried by importing the records into EXCEL file but all the records cannot be exported to excel file as it contains more than 1,600,000 rows.

How to restore that database to another server which has lower version of SSMS.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 2
    first of all version of SSMS is not directly related to the SQL Server's version. Please provide the output of SELECT @@VERSION from both servers. – Sergey Aug 22 '22 at 10:23
  • 2
    *"It is showing the "Out of Memory Exception"."* This is application error, not a SQL Server error. Restoring a 2GB `bak` file in SQL Server is a trivial for it; 2GB is tiny. Trying to *open* a 2GB `.sql` file in SSMS is non-sensical; if you want to run a file that large use a command line tool (like `invoke-sqlcmd`/`sqlcmd`) or use SQLCMD mode within SSMS. – Thom A Aug 22 '22 at 10:27
  • *"sql server management studio 2018"* There is no such thing, SSMS 2018 doesn't exist. Do you mean SSMS *18* (which was released in 2019)? – Thom A Aug 22 '22 at 10:28
  • Does this answer your question? [SQL Server database backup restore on lower version](https://stackoverflow.com/questions/6183139/sql-server-database-backup-restore-on-lower-version) – Thom A Aug 22 '22 at 10:33
  • fyi... SQL Server backups from newer server versions cannot be restored on to older server versions due to the differing feature sets that they support. You may need to investigate other options such as bcp and linked servers. – AlwaysLearning Aug 22 '22 at 12:08

0 Answers0