Exiting an Oracle stored procedure

I have a very large Oracle Stored procedure. I wold like to be able to test it in sections. Is there a way deliberately exit an Oracle stored procedure and avoiding any type of rollback? So for example if I just want to test the first 1/3 of the stored procedure, and then exit the stored procedure committing any changes, is there a way to do that? If so, how do I do it?
LVL 2
brgdotnetcontractorAsked:
Who is Participating?
 
Pawan KumarDatabase ExpertCommented:
You can use Return keyword.

Exit or exit when keyword -  if you want to exit from the loop.
0
 
arnoldCommented:
You have to see the logic of the SP, often, you have to commit, I believe the default behavior if you return, the transaction will not be committed, it will be rolled back.

Take and test it in a test environment.

The complexity might be that going a third of the way and committing you jeopardize the integrity of the data.

Look through the code, it will indicate where you can potentially return, look for the commit directive. It might not be a third of the way, but it will indicate where a determination is made and where the first cutoff is.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.