Toad creates *.tmp files when executing with sqlpuls or scriptrunner

If a sql file is opened in Toad and this is executed with sqlplus or scriptrunner, toad creates a temp file in the folder of the opened file containing the executed SQL statement.

The Temp Path is not changed

If you just open a file and don't make any changes to it in the editor, then execute with SQL*Plus, Toad uses that file and does not create a temp file.

If the text in the editor is modified (but not saved) after the file is opened, Toad creates a temp file and runs that instead. In that way, Toad can send your unsaved edits to SQL*Plus. The temp file will be deleted when Toad closes.

We don't use the temp path in this case because if the script contains something like "start <filename>" without specifying the file's full path, then SQL*plus will assume that the other file is in the same folder. Using the temporary folder in that case would break your script.

Hi, thanks for your fast response, but the file is not modified and is only executed after opening.

Which version of Toad are you using?

16.2 but is there too with 16.1

I just tested with Toad 16.2. Here are my steps. If you have different steps to reproduce the problem, please let me now what I should do differently.

  1. Start Toad, make a connection, open the Editor.
  2. Open a file in the Editor
  3. Click "Execute via SQL*Plus"
  4. Look in the folder in explorer. Temp file is not created. Close the SQL*Plus window.
  5. Make any change in the Editor but do not save (I just added a blank line at the end)
  6. click "Execute via SQLPlus again
  7. Temp file is created
  8. Close SQL*Plus
  9. Close Toad
  10. Temp file disappears.

This screen shot was taken between steps 3 and 4. Here you can see Toad 16.2 after executing SQL*Plus. SQL*Plus is still running, and you can see in explorer that no temp file is created. Note the Editor does not say "Modified" where I've highlighted. Maybe yours does?

Hi John,

1 i started Toad
2. opened a file without changing anything
3. executed the statment with sql plus
4. tmp file was created within the folder
5. Closed SQL Plus Window => tmp file still there
6. Closed Toad => tmp file removed

Maybe some of them tmp files remained in case toad was hanging and closed within the taskmanager.
Thanks for your fast feedback.
Have a nice day.