Error 703



Message text

You cannot run this procedure, trigger, or SQL batch because it requires more than %ld pages of memory. Break it up into shorter queries, if possible.


This error occurs when a stored procedure or trigger cannot be executed because it requires more memory than is allowed for execution.

Two different stages of execution can trigger this error: “resolution,” in which the query tree is built, or “compilation,” in which the query plan is generated. If a query has been executed successfully but later fails with this error, it means that the query tree used to be less than the allowed memory limit but has since grown. If a query encounters this error every time it is executed, then it is too complex to be executed in its present form without exceeding the memory limit. Refer to Performance and Tuning Series: Query Processing and Abstract Plans for detailed information about query trees and query plans.


Errors 701 and 703 are very similar. Error 703 is raised when the procedure requires multiple process headers (control structures) but there is not enough memory to allocate the next header; error 701 is raised when there is not enough memory to extend the current header which already has some pages allocated. See “Error 701” for additional troubleshooting information.

If the procedure or trigger causes this error every time you try to execute it, divide it into smaller pieces. This division process varies greatly with the type of SQL statement.

If the object has successfully executed before, the 703 error probably occurred because the query tree grew beyond the specified page limit. This growth occurs each time the query tree is re-resolved. Once you have encountered the 703 error in this situation, you can drop and re-create the procedure or trigger in order to shrink the query tree to a legal size, or you can break the object up into smaller modules. Restarting Adaptive Server has no effect on the size of the query tree because query trees are stored on disk.

If this error occurs frequently on an object, you can either periodically drop and re-create the object as part of regular database maintenance, or break it into smaller modules.

Versions in which this error is raised

All versions