Re: Max query size in osql or management studio?
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Thu, 10 Jan 2008 14:41:42 -0800
Andrew (andrew@xxxxxxx) writes:
Unfortunately the scripts are being developed by another team in the
organisation to be delivered to customers so we have no control over
either the scripts or how people run them. I agree that there are many
better methods to migrate data but this method was selected, rightly or
wrongly, as we support both SQLServer and Oracle.
Management studio stops processing with an Out of memory error after
approx 2-3, 000 insert statements. osql stops with an insuffieient
memory error at about 30,000 insert statements.
We tried putting a 'go' after every 1000 inserts in Management studio
and it lasted a little longer - it went to about 6,000 insert statements
before failing.
Do you have a SET NOCOUNT ON in the top of the script?
If that doesn't help, the next thing to try is SQLCMD, which is a
command-line utility just like OSQL. SQLCMD has a few more features,
although I cannot directly see that any of them are useful to you.
Then again, I have not used SQLCMD that much.
If neither SQLCMD does not cut it, you may have to write your own
small application. The SQL part of it is not that really difficult,
just parse out the "go" and send in reasonbly large batches. The
tricky part is probably to read the file in an efficient way.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- References:
- Max query size in osql or management studio?
- From: Andrew
- Re: Max query size in osql or management studio?
- From: Aaron Bertrand [SQL Server MVP]
- Re: Max query size in osql or management studio?
- From: Andrew
- Max query size in osql or management studio?
- Prev by Date: Re: Dump Huge
- Next by Date: ANN: SQL Inspect 1.1 released
- Previous by thread: Re: Max query size in osql or management studio?
- Next by thread: Re: Max query size in osql or management studio?
- Index(es):
Relevant Pages
|