Skip to Main Content
Oracle SQL*Plus: The Definitive Guide
book

Oracle SQL*Plus: The Definitive Guide

by Jonathan Gennick
March 1999
Intermediate to advanced content levelIntermediate to advanced
528 pages
14h 39m
English
O'Reilly Media, Inc.
Content preview from Oracle SQL*Plus: The Definitive Guide

Packaging Your Script

For most scripts you write, you will be satisfied just invoking them from the SQL*Plus prompt. Sooner or later, however, you are going to write a script that you want to share with an end user who may not be familiar with SQL*Plus, or you may end up implementing a complex batch process as a SQL*Plus script. In either of these cases you may find it convenient to create a command or icon that can easily be used to execute the script in question. In the Microsoft Windows environment, for example, you could easily create an icon on which an end user could double-click in order to produce a report or extract data.

Creating a Windows Shortcut

There are two decisions you need to make if you are going to create an icon or shortcut to execute a script. One is whether to embed the Oracle username and password into the shortcut or to prompt the user for this information. The second is to decide which version of SQL*Plus you want to use — the GUI version or the DOS version.

Both of these decisions affect the command used by the shortcut to invoke SQL*Plus and start the script. Your job is easiest if you can embed the Oracle username and password, or at least the username, into the shortcut. If you need to prompt for both username and password at runtime, then you will need to make some minor additions to your script.

For purposes of example, let’s assume you are going to create a Windows shortcut to run the Project Hours and Dollars Report shown earlier in this chapter. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle SQL*Plus: The Definitive Guide, 2nd Edition

Oracle SQL*Plus: The Definitive Guide, 2nd Edition

Jonathan Gennick
Oracle PL/SQL Programming, Third Edition

Oracle PL/SQL Programming, Third Edition

Steven Feuerstein, Bill Pribyl
Oracle SQL

Oracle SQL

Dan Hotka

Publisher Resources

ISBN: 1565925785Supplemental ContentCatalog PageErrata