Help using Base SAS procedures

Insufficient memory error in proc sort

Accepted Solution Solved
Reply
Contributor
Posts: 20
Accepted Solution

Insufficient memory error in proc sort

My data is stored in Oracle table MY_DATA. This table contains only 2 rows with 7 columns. But when I execute step:

proc sort data=oraclelib.MY_DATA nodupkey out=SORTED_DATA;
by client_number;
run;

the following error appears:

 ERROR: The SAS System stopped processing this step because of insufficient memory.

If I comment nodupkey option then error disappears. If I copy dataset in work library and execute proc sort on it then everything is OK too.

My memory options:

SORTSIZE=1073741824
SUMSIZE=0
MAXMEMQUERY=268435456
LOADMEMSIZE=0    
MEMSIZE=31565617920
REALMEMSIZE=0

What can be the root of the problem and how can I fix it?


Accepted Solutions
Solution
‎11-26-2016 10:27 AM
Respected Advisor
Posts: 3,887

Re: Insufficient memory error in proc sort

[ Edited ]

I suggest you open a track with SAS TechSupport as memory shouldn't really be an issue with Proc Sort.

 

One thing you could check:

Is the password for your Oracle connection in grace period? Strange things can happen if this is the case (at least this was true for older SAS versions).

View solution in original post


All Replies
Super User
Posts: 3,102

Re: Insufficient memory error in proc sort

Try running your program with the FULLSTIMER SAS option to report on how much memory SAS is using.

 

Also your LIBREF oraclelib is 9 characters long when 8 is the maximum - is this a typo?

 

I suspect your sort is happening entirely in SAS as you specify the NODUPKEY option. You could always read the data out of Oracle in a DATA step, then sort separately.

Super User
Posts: 6,932

Re: Insufficient memory error in proc sort

Pull the table into a SAS dataset, do a proc contents on it, and then repeat the sort.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Solution
‎11-26-2016 10:27 AM
Respected Advisor
Posts: 3,887

Re: Insufficient memory error in proc sort

[ Edited ]

I suggest you open a track with SAS TechSupport as memory shouldn't really be an issue with Proc Sort.

 

One thing you could check:

Is the password for your Oracle connection in grace period? Strange things can happen if this is the case (at least this was true for older SAS versions).

Contributor
Posts: 20

Re: Insufficient memory error in proc sort

Thans all!

 

Patrick,

its a magic but you are absolutely right! My password was in grace period and when I changed it the issue disappeared!

 

Regards,

Dmitry

 

 

Super User
Posts: 9,673

Re: Insufficient memory error in proc sort


proc sort .......  sortsize=3G  tagsort ;
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 887 views
  • 10 likes
  • 5 in conversation