Skip navigation

I'm getting a sort failed 1501 message on SQL Server - what's going on?

A. This is usually caused by a time-out when creating an index - if you see "state 12" after the 1501 then it definitely is. This hard-coded timeout was upped with SQL 6.5 SP3 and is rarely seen now (though it does still sometimes occur). It is normally caused by a slow or congested disk subsystem - either get some faster disks/controllers or make sure that no other processes are contending on the same disks at the time of the query that causes the error.

If the above doesn't fit, then you can try upping the "sort pages" parameter in sp_configure. This may keep more of the sort in memory and reduce the iterations it goes through and thus prevent the error.

Other than that all you can do is contact Microsoft PSS with the error message, including state number, and let them delve through the code to see what piece of code the state message you're getting is in. (The state codes are unique)


TAGS: SQL
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish