我有一个140mb的SQL查询来将数据导入到一个新的数据库中。我的文件>打开查询,并尝试执行它,但我得到:
Exception of type'System.outofmemoryexception' was thrown. (mscorlib)
我有8 8gb的内存,使用<3 8gb,我能做什么?
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发布于 2011-03-19 04:28:28
这是Microsoft Connect上报告的已知问题:
如果您看一下,就会看到一些变通方法,比如使用SQL CMD在Notepad++中执行和编辑。
然而,看起来他们不会解决这个问题。
https://stackoverflow.com/questions/5357172
复制相似问题