Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Any limitation on sqlcmd?

Author  Topic 

chiangfj
Starting Member

2 Posts

Posted - 2011-10-20 : 11:13:04
Hi all,
I used
sqlcmd -U dbName -P password -S hostName -y 0 -u -d dbSchema -i C:\MyLargeScriptFile.sql

Is there a limit for the file size for MyLargeScriptFile.sql?

The reason is that when I try out a 22MB size for MyLargeScriptFile.sql (containing a list of insert statements), it seems to load and hang forever.

Thanks


nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-10-21 : 06:12:34
Have you tried splitting into multiple files and running them - that will tell you whether it's a problem with something in the file.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-10-21 : 07:51:52
The script is larger than the database file size?



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2011-10-22 : 13:48:10
quote:
Originally posted by chiangfj

Hi all,
I used
sqlcmd -U dbName -P password -S hostName -y 0 -u -d dbSchema -i C:\MyLargeScriptFile.sql

Is there a limit for the file size for MyLargeScriptFile.sql?

The reason is that when I try out a 22MB size for MyLargeScriptFile.sql (containing a list of insert statements), it seems to load and hang forever.

Thanks






For how many tables there are those Insert scripts ? If for a few then export the data from those tables through BCP and import them using Bulk Insert.

PBUH

Go to Top of Page
   

- Advertisement -