2011-03-18 31 views
3

我有一个140MB SQL查询将数据导入到新数据库。我的文件>打开查询,并尝试执行它,但我得到:运行大型查询的SQL Server 2008 - 内存不足

Exception of type'System.outofmemoryexception' was thrown. (mscorlib)

我有8GB的内存,使用< 3GB所以我能做些什么?

at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity) 
    at System.Text.StringBuilder..ctor(String value, Int32 startIndex, Int32 length, Int32 capacity) 
    at System.Runtime.InteropServices.Marshal.PtrToStringUni(IntPtr ptr) 
    at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextBuffer.GetText(Int32 startPosition, Int32 chars) 
    at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextBuffer.get_Text() 
    at Microsoft.SqlServer.Management.UI.VSIntegration.ShellCodeWindowControl.GetSelectedTextSpan() 
    at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptEditorControl.GetSelectedTextSpan() 
    at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl.OnExecScript(Object sender, EventArgs a) 

 

Microsoft SQL Server Management Studio      10.50.1600.1 
Microsoft Data Access Components (MDAC)      6.1.7600.16385 
Microsoft MSXML      3.0 6.0 
Microsoft Internet Explorer      9.0.8112.16421 
Microsoft .NET Framework      2.0.50727.4952 
Operating System      6.1.7600 
+0

我假设你在Management Studio Express中运行? – 2011-03-18 20:08:53

+0

@Joe,是的,我是:( – 2011-03-18 20:09:47

+0

SQL Management Studio 10.50.1600.1 – 2011-03-18 20:10:07

回答