Oracle Error RMAN-03017: recursion detected in stored script string

Oracle Error Message

RMAN-03017: recursion detected in stored script string

Reason for the Error

A stored script is calling itself or another script which calls itself.

Solution

Remove the recursion.