Saving and Running Scripts - Oracle DBA

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.

Saving and Running Scripts

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

Saving and Running Scripts

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.

Saving and Running Scripts

Finally, she clicks the Load button.

Saving and Running Scripts

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.

Saving and Running Scripts


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Oracle DBA Topics