9.4. Saving and Running Scripts

If a set of SQL or iSQL*Plus commands will be used over and over again, it makes sense to save it as a script in a central location and retrieve it when it needs to be run. iSQL*Plus makes it easy to save and retrieve scripts.

Janice decides that the iSQL*Plus script she wrote for displaying salaries by department will be used by every department manager, so she will save it on a network disk drive that is accessible to all of the managers. She clicks the Save Script button at the bottom of the Workspace area.



This brings up the Save As dialog box. Janice saves the contents of the Workspace area to the directory F:CommonSQLScripts.



To retrieve a script, Janice clicks the Load Script button underneath the Workspace area, clicks Browse, navigates to the directory containing the script, and selects the filename to be retrieved.



Finally, she clicks the Load button.



The contents of the file are placed in the Workspace area, and Janice can run the commands right away or make further modifications to the script before running it.



..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset