Starting Windows SQL*Plus

To start the Windows GUI version of SQL*Plus, first find the icon. Figure 2-1 shows SQL*Plus for Oracle Database 10 g in the Windows Start menu. It looks like a blue disk drive topped with a yellow plus sign.

Figure 2-1. The SQL*Plus icon

figs/sqp2_0201.gif

You'll find the SQL*Plus icon in a program group under the Start menu. The path varies slightly from one release of Oracle to the next but will usually be something along the lines of Start All Programs Oracle Application Development SQL*Plus. Figure 2-2 shows the Windows Start menu expanded to show the SQL*Plus icon.

Figure 2-2. Start menu expanded to show the SQL*Plus icon

figs/sqp2_0202.gif

After starting SQL*Plus, you'll see the dialog box shown in Figure 2-3. To log into your database, simply enter your database username, password, and host string into the dialog box and click OK.

Figure 2-3. SQL*Plus logon dialog box

figs/sqp2_0203.gif

The example in Figure 2-3 uses the net service name db01 . You may use the tnsnames.ora and easy connection identifier formats (Oracle Database 10 g only) for the connect string.

Make sure to enter the correct information in the logon dialog box. If you make a mistake, SQL*Plus will reprompt you for your username and password but not for the connect string. This is annoying when you are connecting to a remote database.

After you have successfully logged into your database, the SQL*Plus screen will look much like that shown in Figure 2-4.

Figure 2-4. The Windows SQL*Plus GUI

figs/sqp2_0204.gif

At first glance, the Windows version of SQL*Plus doesn't seem to add much to the command-line version because it implements only a simple, scrolling window into which you type commands. But there are some advantages to using the Windows GUI. The GUI version implements copy and paste using the standard Ctrl-c/Ctrl-v key combinations, allows you to easily size the window any way you want (think large), and implements a scroll-back buffer so that you don't need to worry too much about query results scrolling by before you can read them. Once you get used to using SQL*Plus with a 1000-line scroll-back buffer and a large, vertical window size , you won't want to go back to the default, 25 80 character command-prompt window environment.

Newer versions of Windows implement scroll-back from command-prompt windows, so that's not such a great advantage anymore.

 

Missing the Product User Profile

SQL*Plus implements a security feature known as the product user profile. Sometimes DBAs neglect to create the tables and views that support this feature. Consequently, SQL*Plus users will occasionally see an error message such as the following when connecting to a database:

Error accessing PRODUCT_USER_PROFILE

Warning: Product user profile information not loaded!

You may need to run PUPBLD.SQL as SYSTEM
 

Alarming as it sounds, this message is nothing to worry about. Nothing is wrong with your database, and all SQL*Plus commands will work as normal. This message is telling you only that the product user profile security feature has not been implemented at your site or, more specifically , that you do not have SELECT access to the PRODUCT_PROFILE table owned by SYSTEM. Chapter 13 describes this feature in detail, and also shows how your DBA can easily create the necessary tables to make this message go away. If you don't know your DBA, or you can't persuade him to create the profile table, don't worry about it. Just ignore the message, and do whatever you need to do.


     

Introduction to SQL*Plus

Command-Line SQL*Plus

Browser-Based SQL*Plus

A Lightning SQL Tutorial

Generating Reports with SQL*Plus

Creating HTML Reports

Advanced Reports

Writing SQL*Plus Scripts

Extracting and Loading Data

Exploring Your Database

Advanced Scripting

Tuning and Timing

The Product User Profile

Customizing Your SQL*Plus Environment

Appendix A. SQL*Plus Command Reference

Appendix B. SQL*Plus Format Elements



Oracle SQL Plus The Definitive Guide, 2nd Edition
Oracle SQL*Plus: The Definitive Guide (Definitive Guides)
ISBN: 0596007469
EAN: 2147483647
Year: N/A
Pages: 151

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net