This is totally a SAS thing, so your SQL Server/ODBC connection takes no part. For a normal sort, you need to have 3 times the size of the source table available + the size for the target table. A few things that you could test: Use Order By in your SQL. Chances are that the sort will be pushed down to your SQL Server. Expand your WORK directory Expand your MEMSIZE ans SORTSIZE system options. Use TAGSORT in PROC SORT. Takes quite longer time, but uses less memory. I guess this is just a small code snippet, but consider not to move your data to SAS, it's just a sort...?
... View more