Search

System.OutOfMeoryException was thrown by RobMus

Closed

4
0
Sign in
to vote
Type: Bug
ID: 765985
Opened: 10/3/2012 2:33:43 PM
Access Restriction: Public
0
Workaround(s)
3
User(s) can reproduce this bug
Got the message

===================================

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

------------------------------
Program Location:

at System.Text.StringBuilder.ToString()
at Microsoft.SqlServer.Management.UI.Grid.GridControl.GetClipboardTextForCells(Int64 nStartRow, Int64 nEndRow, Int32 nStartCol, Int32 nEndCol)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.GetClipboardTextForSelectionBlock(Int32 nBlockNum)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.GetDataObjectInternal(Boolean bOnlyCurrentSelBlock)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.GetDataObject(Boolean bOnlyCurrentSelBlock)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.GridResultsTabPageBase.OnCopyWithHeaders(Object sender, EventArgs a)
Details (expand)

Product Language

English

Version

SQL Server 2012 - Developer Edition

Category

SQL Engine

Operating System

Windows 7 Ultimate (SP1)

Operating System Language

English

Steps to Reproduce

Do a query of a large database that returns about 300K rows and 20 columns
Select All
Copy with headers.

The message appears

Actual Results

Exception message

===================================

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

------------------------------
Program Location:

at System.Text.StringBuilder.ToString()
at Microsoft.SqlServer.Management.UI.Grid.GridControl.GetClipboardTextForCells(Int64 nStartRow, Int64 nEndRow, Int32 nStartCol, Int32 nEndCol)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.GetClipboardTextForSelectionBlock(Int32 nBlockNum)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.GetDataObjectInternal(Boolean bOnlyCurrentSelBlock)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.GetDataObject(Boolean bOnlyCurrentSelBlock)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.GridResultsTabPageBase.OnCopyWithHeaders(Object sender, EventArgs a)

Expected Results

Copied to clipboard

Platform

X64

Virtualization

 
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 4/18/2013 at 10:16 AM
Hello RobMus. Thanks for the feedback. We triaged this issue and at this time do not plan to address this in a future version of SQL Server. -Walter A Jokiel, Program Manager, SQL Server (wajokiel@microsoft.com)
Posted by Microsoft on 3/29/2013 at 9:45 AM
Hello RobMus. We plan to continue our investigation of this issue, but in the meantime you should be able to work around this by saving as a CSV. Please let us know if this doesn't work for you. -Walter A Jokiel, Program Manager, SQL Server (wajokiel@microsoft.com)
Posted by nomensnescio on 11/6/2012 at 10:54 PM
Exception of type 'System.OutOfMemoryException' was thrown when I made a select statement on a database containing a large number of tables and sending the output to the grid. Sending the output to the window as text did improve the situation, but did not solve the problem. Sending the output to a text file has solved the problem.

However, I would prefer to see the result in the datagrid or at least within SSMS.

I am running Windows 7 Enterprise (64bit) and SQL Server 2012 Developer Edition.
Sign in to post a workaround.