1

I have an 80MB database script that I am trying to execute in SQL Server Express 2014 and I keep getting

Cannot execute script.

Additional information:

Exception of type 'System.OutOfMemoryException' was thrown.(mscorlib)

When I execute this size of a script on my hosting plan, it works without issue.

I'm running 16 gigs of RAM on my laptop, and when I try executing the script I'm checking the performance in Task Manager and i'm not even going over 6 gigs of usage.

Is this a limitation of SQL Server Express?

6
  • Do you still get the error if you output any results to file, instead of grid/text? Commented Dec 10, 2016 at 22:19
  • @3N1GM4, I am not sure if I understand you correctly...This script is about 40 tables and includes inserting a rough total of over 100,000 records. I create a database on my laptop, open the script in SSMS and direct to use the new database and it errors out. I am not getting any error messages or results other than the one I posted Commented Dec 10, 2016 at 22:23
  • 1
    I asked because if your script generated any significant results or output, it could be exceeding the maximum memory permitted for returning results, as per this MS KB article. SQL Server Express is also limited to 1GB of memory for the DB engine itself (or 4GB if using reporting services - which you're not), but I believe this error indicates that SSMS has run out of memory, not the SQL Server instance itself. Commented Dec 10, 2016 at 22:27
  • 2
    There is also an outstanding Connect ticket here detailing problems with large script files. Have you tried running your script from sqlcmd instead of through SSMS? Are you running in a 32bit or 64bit environment? Commented Dec 10, 2016 at 22:27
  • I haven't tried using sqlcmd yet, thats a good idea. I'm using 64bit Windows 10, 64 bit SQL Server Commented Dec 10, 2016 at 22:34

0

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.