2

Opening large sql script generated by SQL Server publisher cant be open in management studio, returning error about not enough available storage to open it.

Is there some other way to import db from large script ? (command line maybe)

2
  • What does the script do as if it imports data then you should be able to use some ETL tool within your database (I.E., SSIS for SQL Server 2005/2008) Commented Dec 10, 2009 at 13:30
  • Please post the actual error message you get. Commented Dec 10, 2009 at 13:35

2 Answers 2

2

Is this something you have to edit? If so, you may want to open it in Notepad++ or TextPad or Editplus.

Here are some options I can think of:

  • Use the batch separator GO between sets of commands. The reason for this is that without the GO, SSMS is trying to execute the entire script as a single command. This puts a heavier load on memory requirements than multiple batches would.

  • To run the script, you can use SQLCMD from the command line.

  • Also, for large scripts that load data, you may want to ensure that you have COMMIT commands in the script (where appropriate).

  • Consider splitting your script into multiple scripts.

  • If you split into multiple files and build the SQLCMD command line syntax, you can run all scripts from a single batch file fairly quickly.

Sign up to request clarification or add additional context in comments.

2 Comments

lol my link had a reference to the future removal of osql. +1
This time I've mage Backup of target db and Restore on my machine/server with replace option and it went well. I'll take I look at what you proposed also.
0

Have you tried using the OSql tool?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.