Hi Everyone,
I found this "NOCOPY" option has been used a lot in so many stored procedures. As I googled, I found some facts and features as mentioned below.
The technique of OUT and IN OUT parameters was designed to protect original values of them in case exceptions were raised,
so that changes could be rolled back. Because a copy of the parameter set was made, rollback could be done. However, this method
imposed significant CPU and memory overhead when the parameters were large data collectionsfor example, PL/SQL Table or VARRAY types.
With the new NOCOPY option, OUT and IN OUT parameters are passed by reference, which avoids copy overhead. However, parameter set
copy is not created and, in case of an exception rollback, cannot be performed and the original values of parameters cannot be restored.
So if this is true, what benefit we will be getting by using this option. I mean, in case of a failure transaction we will not be able to rollback for those
variables or parameters declared with NOCOPY option? If it is performance related, Ok but we can't rollback in case of any error.
Regards,
BS2012