Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL*PLUS not running the latest version of my script

MrGibbageJan 28 2013 — edited Jan 29 2013
I have a database that I do daily work in but I am forced to use SQL*PLUS over Citrix. I don't know why, but after years of complaining about it, it isn't going to change.

One nagging problem I have is that let's say I have a sql script on my computer that I want to run. I can enter in SQL*PLUS @myscript and myscript.sql will run. But if I make a small change to it (perhaps there was an error, or I just need to make some other change) and rerun it again (like within a minute of running the last one), it will often just rerun the original script rather than the modified script. This happens so often that I will just stay in the SQL*PLUS, hit up arrow and press enter, repeat, repeat, repeat and eventually (like within a minute or two) it will finally execute the new script. So it looks like my script has been cached on the server and instead of checking to see if I am running a new script or a modified script, it just spits out the original results.

Is there any way to make Oracle stop that? If I make a change to the script, it should execute that newly modified script.

I am using SQL_Plus release 10.2.0.4.0 on an oracle 11g server

Just to be clear, this is 100% NOT a matter of me not saving the change, or me executing the wrong script. I can run a script, make a change to the script, press up-arrow and re-run the script, and the new script does not immediately execute. It runs the old script. I can keep on hitting up-arrow and enter and eventually the modified script runs. Without me ever going back and doing anything to the script.

Now it doesn't do this every time, but it does it A LOT. There definitely seems to be a time factor going on. If it has been a while since I last ran it, it will usually run the newly modified script. But if it is a very short period of time, then I can almost guarantee it will do as I described above.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 26 2013
Added on Jan 28 2013
8 comments
326 views