|
|

 Rank: Guest Groups: Guest
Joined: 9/17/2007 Posts: 11,670 Points: -1,200
|
Date parsed: 19/10/2007 01:52:59 Date: Fri, 19 Oct 2007 06:52:59 -0500
How many rows are you inserting? Consider BCP instead of inserts if you have a lot of data. Alternatively, break the script into multiple batches and perhaps use transactions as well.
-- Hope this helps.
Dan Guzman SQL Server MVP
"Mark Allison" <home@markallison.nospam.co.uk> wrote in message news:74C63577-F944-4130-A53C-69B6E8E450A3@microsoft.com... > Hi guys > > I am trying to run a set of INSERT statements through sqlcmd.exe against a > SQL Server 2005 SP2 box which has 3.5GB RAM with min. memory set to 512MB > and max. memory set to 3.0GB. > > The command I'm running is: > sqlcmd.exe -S %1 -E -i MyInsertScript.sql -d %2 > > MyInsertScript.sql just contains lots of INSERT statements (not wrapped in > a transaction) - it was actually generated using Red Gate's SQL Packager > 5.4. > > I get an error part way through: > Msg 701, Level 17, State 123, Server: SERVER1, Line 25719 > There is insufficient system memory to run this query. > > Any ideas? > > Mark.
|
|

 Rank: Guest Groups: Guest
Joined: 9/17/2007 Posts: 11,670 Points: -1,200
|
Date parsed: 19/10/2007 13:17:04 Date: Fri, 19 Oct 2007 12:17:04 +0100
Hi guys
I am trying to run a set of INSERT statements through sqlcmd.exe against a SQL Server 2005 SP2 box which has 3.5GB RAM with min. memory set to 512MB and max. memory set to 3.0GB.
The command I'm running is: sqlcmd.exe -S %1 -E -i MyInsertScript.sql -d %2
MyInsertScript.sql just contains lots of INSERT statements (not wrapped in a transaction) - it was actually generated using Red Gate's SQL Packager 5.4.
I get an error part way through: Msg 701, Level 17, State 123, Server: SERVER1, Line 25719 There is insufficient system memory to run this query.
Any ideas?
Mark.
|
|

 Rank: Guest Groups: Guest
Joined: 9/17/2007 Posts: 11,670 Points: -1,200
|
Date parsed: 19/10/2007 15:40:29 Date: Fri, 19 Oct 2007 14:40:29 +0100
Thanks Dan, I did the larger inserts using bcp.
"Dan Guzman" <guzmanda@nospam-online.sbcglobal.net> wrote in message news:3D08C3C2-B57F-4454-9E82-47D7E47FC1B3@microsoft.com... > How many rows are you inserting? Consider BCP instead of inserts if you > have a lot of data. Alternatively, break the script into multiple batches > and perhaps use transactions as well. > > -- > Hope this helps. > > Dan Guzman > SQL Server MVP > > "Mark Allison" <home@markallison.nospam.co.uk> wrote in message > news:74C63577-F944-4130-A53C-69B6E8E450A3@microsoft.com... >> Hi guys >> >> I am trying to run a set of INSERT statements through sqlcmd.exe against >> a SQL Server 2005 SP2 box which has 3.5GB RAM with min. memory set to >> 512MB and max. memory set to 3.0GB. >> >> The command I'm running is: >> sqlcmd.exe -S %1 -E -i MyInsertScript.sql -d %2 >> >> MyInsertScript.sql just contains lots of INSERT statements (not wrapped >> in a transaction) - it was actually generated using Red Gate's SQL >> Packager 5.4. >> >> I get an error part way through: >> Msg 701, Level 17, State 123, Server: SERVER1, Line 25719 >> There is insufficient system memory to run this query. >> >> Any ideas? >> >> Mark. >
|
|
|
Guest |