SQLCMD large script – part 2

I’m in my finale stage in my cleanup project of the 26GB database for a customer. Today, I planned for working late from home. My problem was that my data script had a “use <db name> – included by a mistake. The script files were too large to edit with available tool on the database servere and my broadband connection isn’t good enough to transfer the files between the server and my laptop that has the proper tools.

The solution was a quick look at the SQLCMD command line options. After some frustrating minutes, I spotted the -d <db name> option. I tried it on my local machine and it work perfectly.

As a result, i could load my large script (8gb for largest table) and override the use statement in the script file.


sqlcmd -d <database> -i <script file>



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s