<p>One of my DBs have grown closer to permitted size.</p>

<p>Inorder to find out the table containing the max data, i used the following query:</p>

<pre><code>exec sp_MSforeachtable @command1="print '?' exec sp_spaceused '?'"
</code></pre>

<p>It returned the culprit table comprising the max data.</p>

<p>As a next step, i want to cleanup the rows based on the size. For this, i would like to order the rows based on size.</p>

<p>How to achieve this using a query? Are there any tools to do this?</p>

An easier approach for all table sizes is to use the stored procedure at
this site
.
You could alter the select statement of that stored procedure to:
```
```
SELECT * 
FROM #TempTable
Order by dataSize desc
```
```
to have it ordered by size.
How do you want to cleanup? Cleanup the biggest row of a specific table? Not sure I understand the question.
EDIT
(response to comment)
Assuming your eventlog has the same layout as mine (DNN eventlog):
```
```
SELECT     LEN(CONVERT(nvarchar(MAX), LogProperties)) AS length
FROM         EventLog
ORDER BY length DESC
```
```