﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Steven Feuerstein's Blog</title>
    <description>&lt;table cellspacing="1" cellpadding="1"&gt;
        &lt;tr&gt;
            &lt;td valign="top"&gt;&lt;img height="183" alt="" width="139" src="/Portals/0/Blog/blog-steven-feuerstein.png" /&gt;&lt;/td&gt;
            &lt;td valign="top"&gt;Steven Feuerstein is considered one of the world's leading experts on the Oracle PL/SQL language, having written ten books on PL/SQL (all published by O'Reilly Media, including Oracle PL/SQL Programming. Steven has been developing software since 1980, spent five years with Oracle (1987-1992) and has served as PL/SQL Evangelist for Quest Software since January 2001. He is also an Oracle ACE Director. He writes regularly for Oracle Magazine, which named him the PL/SQL Developer of the Year in both 2002 and 2006.
            &lt;p&gt;&amp;#160;Steven's blog provides advice and code that you can put to immediate use in your world of programming.&amp;#160;&lt;/p&gt;
            &lt;p&gt;&lt;font color="#003366" size="3"&gt;&lt;strong&gt;Recent postings on his  PL/SQL Obsession:&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;/table&gt;</description>
    <link>http://www.toadworld.com/BLOGS/tabid/67/BlogId/13/Default.aspx</link>
    <language>en-US</language>
    <managingEditor>Steven Feuerstein</managingEditor>
    <webMaster>webmaster@toadworld.com</webMaster>
    <pubDate>Mon, 15 Mar 2010 17:54:19 GMT</pubDate>
    <lastBuildDate>Mon, 15 Mar 2010 17:54:19 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 3.2.0.15477</generator>
    <item>
      <title>Quseful #3: Don't put COMMIT; in your code!</title>
      <description>&lt;p&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;Qusefuls #1 and #2 were published on &lt;st1:personname w:st="on"&gt;Steven Feuerstein&lt;/st1:personname&gt;'s personal blog at feuerthoughts.blogspot.com.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;About Qusefuls&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;&lt;br /&gt;
&lt;br /&gt;
A Quseful is a Quick and Useful (as opposed to Quick and Dirty) tip on now to write programs in the Oracle PL/SQL language more effectively. I originally published Qusefuls on my blog (feuerthoughts.blogspot.com), but am now switching the "home" for Qusefuls to my ToadWorld blog. Each Quseful contains a description of the tip ("What's the point?"), some PL/SQL code you can install in your environment to implement the tip ("Show me the code!"), an example of how to use the code to help you get your job done ("How do I use it?").&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;What's the point?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;&lt;br /&gt;
&lt;br /&gt;
First, here is my recommendation to you:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoBodyText"&gt;&lt;em&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;Never call COMMIT or ROLLBACK; directly in your code. Instead, call a program that will do the commit for you, and design that program so you can dynamically turn commits/rollbacks on and off, without changing the application code.&lt;/span&gt;&lt;/em&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;Why would I say that? Because a COMMIT; in your code is an example of hard-coding, and as we all know, hard-coding is bad. "Hard-coding?" you ask, "What is Steven talking about?"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;Everyone knows what hard-coding is: you put a literal value directly in your code instead of "hiding it" behind a variable, constant or function name. As in:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;
&lt;div style="border-bottom: medium none; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 2pt; padding-right: 0in; margin-left: 0.4in; border-top: medium none; margin-right: -67.7pt; border-right: medium none; padding-top: 0in"&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;IF l_employee.salary &gt; 10000000 THEN&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;    must_be_ceo ();&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;END IF;&lt;/font&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;And we all know that this is a bad thing to do; even if it doesn't seem as though that literal value could ever change, we know that it will, and then we have to track down every occurrence of the number and change that. So that's the easy part of hard-coding. The hard part is recognizing all the different kinds of hard-coding that can appear in your code. For example, I suggest to you that every time you write COMMIT; or BOLLBACK; in your code, you have hard-coded &lt;em&gt;the transaction boundary&lt;/em&gt;. That is, once you commit, you cannot undo your changes. And once you rollback, those changes are gone. Lost forever.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;"Well, duh!" you are likely thinking. "That's the whole point of those statements. Now you are just being silly."&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;Not at all. This is one of those situations that seem so clear at first glance, but upon closer inspection, one realizes that it is a bit more complicated. Suppose I have created a program to adjust the popularity ratings of my company's products, partitioned by gender. The specifications for this program call for a commit, so I write the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;o:p&gt;
&lt;div style="border-bottom: medium none; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 2pt; padding-right: 0in; margin-left: 0.4in; border-top: medium none; margin-right: -67.7pt; border-right: medium none; padding-top: 0in"&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;PROCEDURE adjust_ratings (gender_in IN VARCHAR2)&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;IS&lt;br /&gt;
BEGIN&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;    .... execute many queries and DML statements ....&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;    COMMIT;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;END adjust_ratings;&lt;/font&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;It is then time to test my program (which I will do with &lt;a target="_blank" href="http://www.quest.com/code-tester-for-oracle/"&gt;Quest&lt;span style="font-family: Tahoma; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-language: AR-SA"&gt;®&lt;/span&gt; Code Tester for Oracle&lt;/a&gt;).  I must write the code to set up the various tables on which the program depends (and to which it writes). Some of these tables have hundreds of thousands of rows of data, so it is not at all practical to load it from scratch each time. In fact, what really makes the most sense is to be able to run her program, look at the changes to the tables, and then (assuming something is still wrong) issue a rollback after running adjust_ratings to return the state of the data back to its starting point. &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;No problem! I just go into my code and make this change:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;o:p&gt;
&lt;div style="border-bottom: medium none; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 2pt; padding-right: 0in; margin-left: 0.4in; border-top: medium none; margin-right: -67.7pt; border-right: medium none; padding-top: 0in"&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;PROCEDURE adjust_ratings (gender_in IN VARCHAR2)&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;IS&lt;br /&gt;
BEGIN&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;    .... execute many queries and DML statements ....&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;    -- Don't commit while testing COMMIT;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;END adjust_ratings;&lt;/font&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;Now I can run my tests, rollback, run some more tests, without having to go through an elaborate, time-consuming setup process. And when I have fully tested the program and is sure it works? I change the program back to its original state:&lt;/span&gt;&lt;/p&gt;
&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;
&lt;div style="border-bottom: medium none; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 2pt; padding-right: 0in; margin-left: 0.4in; border-top: medium none; margin-right: -67.7pt; border-right: medium none; padding-top: 0in"&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;PROCEDURE adjust_ratings (gender_in IN VARCHAR2)&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;IS&lt;br /&gt;
BEGIN&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;    .... execute many queries and DML statements ....&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;    COMMIT;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;END adjust_ratings;&lt;/font&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;So let's recap those steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in" class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;1.        Write program.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in" class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;2.        Modify program for testing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in" class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;3.        Test program until you are sure it works.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in" class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;4.        Then change the program.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;What's wrong with this picture? You are not supposed to change your code &lt;em&gt;after&lt;/em&gt; you finish testing! Sure, it's not a big deal to comment out and in the COMMIT; statement, but what if there are dozens of such statements in your code? How will you make sure that have changed them all?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;Oh and as for "commit as hard-coding," do you see now what I mean? It seems so unambiguous at first, but once we look at the requirements for testing one's code, that inflexible transaction boundary becomes an obstacle. Sometimes we want the commit to take place, but at other times, we'd really rather it didn't do the commit.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;So what should you do, instead? Call a program to do the committing for you. I have written such a program, in the my_commit package.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Show me the code!&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Sorry, rather than show you all the code here (very clumsy), I offer the source code and any supporting files in this &lt;a href="http://www.toadworld.com/Portals/0/stevenf/quseful3.zip"&gt;zip file.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You can also download my entire "&lt;a href="http://www.toadworld.com/Portals/0/stevenf/demo.zip"&gt;demo zip&lt;/a&gt;", containing all the scripts and reusable code that are part of my regular trainings. The zip for this Quseful is inside that zip as well.&lt;br /&gt;
&lt;br /&gt;
Here are the files in the Quseful3.zip:&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;my_commit.pks&lt;/strong&gt; - the my_commit package specification&lt;br /&gt;
&lt;strong&gt;my_commit.pkb&lt;/strong&gt; - the my_commit package body&lt;br /&gt;
&lt;strong&gt;Q##MY_COMMIT.qut&lt;/strong&gt; - a Quest Code Tester test definition export that you can import this into an installation of Code Tester, in order to confirm for yourself that my_commit wo&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;rks as advertised.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;&lt;strong&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;How do I use it?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;&lt;br /&gt;
&lt;br /&gt;
To take advantage of my_commit, I would change my procedure as follows:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;
&lt;div style="border-bottom: medium none; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 2pt; padding-right: 0in; margin-left: 0.4in; border-top: medium none; margin-right: -67.7pt; border-right: medium none; padding-top: 0in"&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;PROCEDURE adjust_ratings (gender_in IN VARCHAR2)&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;IS&lt;br /&gt;
BEGIN&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;    .... execute many queries and DML statements ....&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;    my_commit.perform_commit ();&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;END adjust_ratings;&lt;/font&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;By default, committing is enabled, and perform_commit will do the commit; here is the implementation of this utility:&lt;/span&gt;&lt;/p&gt;
&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;
&lt;div style="border-bottom: medium none; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 2pt; padding-right: 0in; margin-left: 0.4in; border-top: medium none; margin-right: -67.7pt; border-right: medium none; padding-top: 0in"&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font size="2"&gt;&lt;span style="background: white; color: blue"&gt;PROCEDURE&lt;/span&gt;&lt;font color="#008000"&gt;&lt;span style="background: white"&gt;perform_commit&lt;/span&gt;&lt;/font&gt;&lt;span style="background: white; color: blue"&gt;(&lt;/span&gt;&lt;span style="background: white"&gt;&lt;font color="#008000"&gt;context_in&lt;/font&gt;&lt;span style="background: white; color: blue"&gt;IN&lt;/span&gt;&lt;span style="background: white; color: red"&gt;VARCHAR2&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;:=&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;NULL)&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font size="2"&gt;&lt;span style="background: white; color: blue"&gt;IS&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font size="2"&gt;&lt;span style="background: white; color: blue"&gt;BEGIN&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;span style="background: white"&gt;   &lt;/span&gt;&lt;span style="background: white"&gt;trace_action&lt;/span&gt;&lt;/font&gt;&lt;span style="background: white; color: blue"&gt;(&lt;/span&gt;&lt;span style="background: white; color: red"&gt;'perform_commit'&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;, &lt;/span&gt;&lt;span style="background: white"&gt;&lt;font color="#008000"&gt;context_in&lt;/font&gt;&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font size="2"&gt;&lt;span style="background: white"&gt;&lt;font color="#008000"&gt;   &lt;/font&gt;&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;IF&lt;/span&gt;&lt;font color="#008000"&gt;&lt;span style="background: white"&gt;committing&lt;/span&gt;&lt;/font&gt;&lt;span style="background: white; color: blue"&gt;()&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font size="2"&gt;&lt;span style="background: white"&gt;&lt;font color="#008000"&gt;   &lt;/font&gt;&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;THEN&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font size="2"&gt;&lt;span style="background: white"&gt;&lt;font color="#008000"&gt;      &lt;/font&gt;&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;COMMIT;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font size="2"&gt;&lt;span style="background: white"&gt;&lt;font color="#008000"&gt;   &lt;/font&gt;&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;END&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;IF;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;span style="background: white; color: blue"&gt;&lt;font size="2"&gt;END;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;It contains a built-in tracing facility that you can turn on to "watch" commits. But the main thing is the conditional statement that &lt;em style="mso-bidi-font-style: normal"&gt;only&lt;/em&gt; commits when the package setting is enabled.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoBodyText"&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;So when I test my code, I can disable saving and then run the program. Shown below are the steps inside SQL*Plus. Check out the test definition export in the download zip to see how this is done in Quest Code Tester setup logic.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;o:p&gt;
&lt;div style="border-bottom: medium none; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 2pt; padding-right: 0in; margin-left: 0.4in; border-top: medium none; margin-right: -67.7pt; border-right: medium none; padding-top: 0in"&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;SQL&gt; exec my_commit.turn_off&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;font color="#008000" size="2"&gt;SQL&gt; exec adjust_ratings ('MALE')&lt;/font&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;And after I am done analyzing the results, I can simply rollback and test again.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;Do you like it? Do you use it?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: Tahoma; font-size: 9pt"&gt;&lt;br /&gt;
&lt;br /&gt;
I'd love to hear what you think of this utility and, in particular, if you found it useful. So please don't hesitate to post a comment on this blog or send me a note at &lt;a href="http://www.toadworld.commailto:steven.feuerstein@quest.com"&gt;steven.feuerstein@quest.com&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <link>http://www.toadworld.com/BLOGS/tabid/67/EntryID/88/Default.aspx</link>
      <author>Steven Feuerstein</author>
      <comments>http://www.toadworld.com/BLOGS/tabid/67/EntryID/88/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.toadworld.com/Default.aspx?tabid=67&amp;EntryID=88</guid>
      <pubDate>Tue, 05 Jun 2007 13:16:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.toadworld.com/DesktopModules/Blog/Trackback.aspx?id=88</trackback:ping>
    </item>
  </channel>
</rss>