Collections:
Run-Away Recursive Calls in Oracle
What Happens If Recursive Calls Get Out of Control in Oracle?
✍: FYIcenter.com
What happens if your code has bug on recursive procedure calls, which causes an infinite number nested procedure calls? The answer is not so good. Oracle server seems to offer no protection calling stack limit. The script below shows you a badly coded recursive procedure. If you run it on an Oracle 10g XE server on Windows, your server will out of control and keep using virtual memory to satisfy the growing calling stack. You have to reboot your server to control back.
SQL> CREATE OR REPLACE PROCEDURE STACK_TEST AS 2 --Warning: do not run this procedure on your server 3 PROCEDURE STACK AS 4 BEGIN 5 STACK; 6 END; 7 BEGIN 8 STACK; 9 END; 10 / SQL> EXECUTE STACK_TEST; (your server keep running with 100% CPU and memory usage)
⇒ Define Variables before Procedures and Functions in Oracle
⇐ Call Procedure or Function Recursively in Oracle
2018-03-18, 2784🔥, 0💬
Popular Posts:
What Is Program Global Area (PGA) in Oracle? A Program Global Area (PGA) is a memory buffer that is ...
What Happens If the UPDATE Subquery Returns Multiple Rows in MySQL? If a subquery is used in a UPDAT...
Why I Can Not Enter 0.001 Second in DATETIME values in SQL Server Transact-SQL? If you enter millise...
How To Count Rows with the COUNT(*) Function in SQL Server? If you want to count the number of rows,...
How To Get the Definition of a Stored Procedure Back in SQL Server Transact-SQL? If you want get the...