Search code examples
sqlsql-serversql-server-2008limitsquirrel-sql

Size limit of a script for SQL Server on a Squirrel client


I have a SQL script of 300 000 lines to execute. My only access to the distant SQL Server 2008 DB is on Squirrel on my computer. Of course I can't execute such a big script like that.

This SQL script is composed of about 2 500 "Begin End GO" block. Each block is about 150 lines. So my idea is to divide my script in X script composed of Y block.

My question is how big a script can be? I have no idea if 1 000 lines is too much? 5 000? 50 000?

thks for your help


Solution

  • I finally made a try/fail test on my validation environment (1 000 lines, then 2 000, then 5 000, ...)

    It worked until 100 000 lines. Then it failed. I increased the memory of squirrel from 256mb to 512mb. With this configuration, 100 000 lines worked but really slowed the application.

    So i'll divide the script in 4 script of about 75 000 lines that worked fine in about 1-2 minute(s) per script