首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行大型查询的SQL server 2008 -内存不足

问运行大型查询的SQL server 2008 -内存不足
EN

Stack Overflow用户
提问于 2011-03-19 03:55:26
回答 1查看 9.4K关注 0票数 3

我有一个140mb的SQL查询来将数据导入到一个新的数据库中。我的文件>打开查询,并尝试执行它,但我得到:

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

我有8 8gb的内存,使用<3 8gb,我能做什么?

代码语言:javascript
复制
   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)
代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-03-19 04:28:28

这是Microsoft Connect上报告的已知问题:

http://connect.microsoft.com/SQLServer/feedback/details/269566/sql-server-management-studio-cant-handle-large-files

如果您看一下,就会看到一些变通方法,比如使用SQL CMD在Notepad++中执行和编辑。

然而,看起来他们不会解决这个问题。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5357172

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档