Copyright: Copyright (c) 1994, Oracle Corporation.
Citation: Copyright (c) 1994, Oracle Corporation.


Entry Topic
SQL*PlusR for Windows Installation Guide

SQL*Plus® for Windows Installation Guide

Preface

CHAPTER 1. Getting Started

CHAPTER 2. SQL*Plus Menus

CHAPTER 3. SQL*Plus in the Windows Environment

APPENDIX A. Customizing Operating System Parameters: The ORACLE.INI File


This help file created via:

Oracle Book to Microsoft Help Version 1.0w

© 1994 Oracle Corporation Inc.

Authored by KM .


SQL*Plusâ for Windows Installation Guide
SQL*Plus® for Windows Installation Guide

 Release  3.1  Part No. A21425-1

 SQL*Plus® for Windows Installation Guide ,  Release  3.1

Part No. A21425-1  November 1994

Copyright © Oracle Corporation 1994

Contributing Author:  Thomas Albert

Contributors:   Lynn Murphy, William Chan, Shawn Hall, Geraldine Kuo, Heather Stewart

This software/documentation contains proprietary information of Oracle Corporation; it is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law.  Reverse engineering of the software is prohibited.

If this software/documentation is delivered to a U.S. Government Agency of the Department of Defense, then it is delivered with Restricted Rights and the following legend is applicable:

Restricted Rights Legend Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013, Rights in Technical Data and Computer Software (October 1988).

Oracle Corporation, 500 Oracle Parkway, Redwood City, CA  94065.

If this software/documentation is delivered to a U.S. Government Agency not within the Department of Defense, then it is delivered with "Restricted Rights," as defined in FAR 52.227-14, Rights in Data - General, including Alternate III (June 1987).

These programs were not developed for use in any nuclear, aviation, mass transit, medical or other inherently dangerous applications.  It is the customer's responsibility to take all appropriate measures to ensure the safe use of such applications if the programs are used for such purposes.

The information in this document is subject to change without notice.   If you find any problems in the documentation, please report them to us in writing.   Oracle Corporation does not warrant that this document is error-free.

All products or company names are used for identification purposes only, and may be trademarks of their respective owners.


Preface

Welcome to SQL*Plus for Windows!  This Guide contains important information to help you get started with SQL*Plus. Specifically, this Guide covers the following topics:

•	SQL*Plus setup and installation

•	SQL*Plus for Windows menu interface

•	SQL*Plus in the Microsoft Windows environment

 Audience

This Guide is for all users who wish to install and use SQL*Plus.  Oracle Corporation's SQL extension.  in the Microsoft Windows graphical environment.

 Prerequisites

You should be familiar with your computer and its operating system. For example.  you should know the commands for deleting and copying files and understand the concepts of the search path.  subdirectories.  and path names.

You should also understand the fundamentals of Microsoft Windows.  such as Program Manager.  File Manager.  and the elements of an application window.

 How to Use this Guide

This Guide is a companion piece to the SQL*Plus User's Guide and Reference and the SQL*Plus Quick Reference.  included with your SQL*Plus package. Use this Guide to learn how to install SQL*Plus for Windows.  then work through the SQL*Plus examples in the SQL*Plus User's Guide and Reference.

As you work through the examples in the SQL*Plus User's Guide and Reference.  refer to this Guide for information about the SQL*Plus menu items and the use of SQL*Plus in the Windows environment.

 How this Guide is Organized

This Guide consists of three chapters and an appendix:

Chapter 1   Getting Started

This chapter  provides SQL*Plus for Windows system requirements.  installation instructions.  and procedures for starting SQL*Plus.

Chapter 2   SQL*Plus Menus

This chapter describes the SQL*Plus for Windows menu commands.

Chapter 3   SQL*Plus in the Windows Environment

This chapter contains operating system-specific information and documentation cross-references found in the SQL*Plus User's Guide and Reference.

Appendix A   Customizing Operating System Parameters: The ORACLE.INI File

This appendix lists the parameters used by SQL*Plus in the Windows environment and describes how to customize your ORACLE configuration by changing the parameter values defined in the ORACLE.INI file.

 Notational Conventions

The following typographical conventions are used in this Guide:

Courier font	Text in courier font indicates commands that you must enter exactly as shown. Text typed on a PC is not case-sensitive.  unless noted otherwise.

Keys indicated in the text are also shown in courier font.  for example.  CTRL+C.

UPPERCASE	Uppercase characters within the text represent command names.  SQL reserved words.  and keywords.

lowercase	Lowercase characters in a command statement  represent a variable. Substitute an appropriate value.

Punctuation	In commands.  punctuation other than brackets and vertical bars must be entered exactly as shown.

\DIRECTORY	A backslash before a directory name indicates that the directory is a subdirectory.

C:\>	C:\> represents the DOS prompt. Your prompt may differ and may.  at times.  reflect your current subdirectory.

DOS	This term refers to Microsoft DOS (MS-DOS) and Novell DOS (DR DOS).

 A Note on Directory Names

This Guide refers to the directory names used in the default installation procedures. If you change the names of any of the Oracle directories.  substitute those names for the ones in this Guide.

 Related Publications

This Guide references the following Oracle documentation:

•	Oracle Desktop Products Customer Information

•	SQL*Plus User's Guide and Reference

•	SQL*Plus Quick Reference

•	ORACLE7 Server  Error Messages and Codes

 Your Comments Are Welcome

We value and appreciate your comments as an ORACLE user. At the back of this Guide is a Reader's Comment Form. We encourage you to use this form to tell us what you like and dislike about this (or other) Oracle manuals. If the form is missing.  or if you would like to contact us.  please use the following address.

Desktop Products Division

Oracle Corporation

500 Oracle Parkway

Box 659408

Redwood Shores.  CA  94065


CHAPTER 1. Getting Started

This chapter provides the following information to help you get started with SQL*Plus for Windows:

•	SQL*Plus for Windows introduction

•	system requirements

•	backing up your SQL*Plus disks

•	step-by-step installation instructions

•	starting SQL*Plus for Windows instructions

 ________________________________________

What Is SQL*Plus for Windows?

SQL*Plus for Windows combines the power of Oracle Corporation's SQL*Plus command language with the graphical environment of Microsoft Windows.

As a SQL*Plus for Windows user, you have access to the command-line functionality that is available with the character-mode DOS version of SQL*Plus, as well as the menu-based features of a Windows application. For instance, you can select SQL*Plus menu items to perform tasks such as these:

•	saving and opening SQL scripts

•	copying and pasting text to and from the Windows clipboard and the SQL*Plus application window

•	invoking a Windows text editor such as Notepad or Microsoft Word

•	searching for text in the SQL*Plus application window

•	changing the size of the SQL*Plus screen buffer

•	selecting parameters from a dialog box to customize the SQL*Plus environment

Other advantages of using SQL*Plus for Windows include the following:

•	additional memory management capabilities, including resources, discardable code segments, and virtual memory in 386 enhanced mode

•	multi-tasking among SQL*Plus and other Windows applications

•	a resizable application window with Windows elements, such as scroll bars, minimize and maximize buttons, and the control-menu box

•	mouse support

 ________________________________________

System Requirements

This section lists the minimum system requirements necessary to install and run SQL*Plus for Windows. Refer to your Microsoft Windows documentation for information on monitor, printer, and mouse requirements.

•	an IBM, a COMPAQ, or a computer 100% compatible with an 80386 processor or higher

•	a 3.5 inch double-sided, high-density disk drive

•	1.7 Megabytes (Mb) of disk space

•	2 Megabytes (Mb) of available memory in addition to the memory required to run Windows

•	Microsoft Windows, Version 3.1 or higher

•	MS-DOS, Version 5.0 or higher, or DR DOS, Version 6.0 or higher

Note: Some earlier releases of DR DOS, Version 6.0 may require a software patch in order to work properly with Microsoft Windows, Version 3.1. Contact Digital Research, Inc. for more information.

•	an ORACLE database, Version 7.1 or higher

If you access a remote ORACLE database, you will also need SQL*Net for Windows

 ________________________________________

Back up the SQL*Plus Disks

Before you begin the SQL*Plus installation procedure,  back up the original SQL*Plus disks and use the backup copies for installation. To copy the disks, use the Copy Disk option from Windows File Manager or use the DOS DISKCOPY command.

Note: Do not use the DOS COPY command to make backup copies; the disk volume labels will not be copied.

 ________________________________________

Installation

The SQL*Plus installation procedure consists of two procedures:

1.	 Set up the Oracle Installer in Windows Program Manager by starting the Oracle Installer application from the Install disk. After you start the application, the Oracle Installer performs the following tasks:

•	creates the Oracle home directory and subdirectories

Note: Note:  If you installed another Oracle Windows product previously, the Oracle Installer will not re-create these directories.

•	copies installation files to the subdirectories of Oracle home

•	create the Oracle program group and the Oracle Installer icon

2.	Install the SQL*Plus software. The Oracle Installer performs the following tasks:

•	creates the SQL*Plus and the Required Support Files subdirectories

•	installs the Required Support Files

•	installs SQL*Plus

•	creates a SQL*Plus icon in the Oracle program group

The following section, "Set up the Oracle Installer" gives step-by-step instructions for the first part of the installation. The section, "Install SQL*Plus Software," later in this chapter, gives step-by-step instructions for the second part.

 Set up the Oracle Installer

To set up the Oracle Installer in Windows Program Manager, complete the steps in this section.

Note: If you installed another Oracle Windows product previously, the Oracle Installer is already set up in the Windows Program Manager. Complete the steps in this section, however, to ensure you use the current release of the Installer to install SQL*Plus.

Step 1    Start Windows

To start Windows, if it is not already running, enter the following command at the DOS prompt:

C:\> WIN

You can install SQL*Plus with Windows running in either standard mode or enhanced mode.

Step 2    Run ORAINST from the Install disk

Insert the Install disk into your disk drive. Select the Run option from the Program Manager File menu. Enter B:\ORAINST, or the appropriate disk drive.

Note: If you installed another Oracle Windows product previously, the ORAINST executable file already exists in your Oracle home directory.  You must run ORAINST from the Install disk, however,  to ensure you use the current release of the Oracle Installer.

Step 3    Specify company name

Now, the dialog box appears. Enter the name of your company and choose OK.

Step 4    Specify path of Oracle home directory

Next, the Installer prompts you to specify the location of your Oracle home directory. Enter the drive and directory, or choose OK to accept the default.

The Installer displays the progress dialog box which shows the names of the files being copied to your hard drive and the percentage of the installation completed.

Step 5    Choose OK

After the Installer copies all the files, the dialog box appears again.

Choose OK to exit the Oracle Installer. Read the next section for instructions on installing SQL*Plus for Windows.

 Install SQL*Plus

After the Oracle Installer is copied to your hard drive, you are ready to install SQL*Plus.

Step 1    Insert the SQL*Plus disk

Remove the Install disk from your disk drive and insert the SQL*Plus for Windows disk.

Step 2    Start the Installer

Restore the Program Manager icon to a window. Then, start the Installer (by double-clicking the Oracle program group icon).

When you start the Oracle Installer with the SQL*Plus for Windows disk inserted in the disk drive, the Oracle Installer window appears.

 Installer Windows

The Oracle Installer window contains the following three windows:

Available Products

Lists all the products available from the Oracle product disk.  "SQL*Plus" is listed in Available Products. If "SQL*Plus" does not appear in the Available Products window, you probably did not insert the SQL*Plus for Windows disk before you started the Installer. Insert the disk and choose the From button.

Installed Products

Lists all Oracle products installed in your Oracle home directory. The default name of the Oracle home directory is ORAWIN, or the name you selected when you set up the Installer. The Oracle Installer is now listed in the Installed Products window.

Status

Provides feedback on the task you are performing.

 Online Help

The Oracle Installer also contains an online help facility. To display help on the Oracle Installer, select Using Oracle Installer from the Help menu, or type CTRL+U.

Step 3    Select SQL*Plus and  click the Install button

To begin the installation, select "SQL*Plus" from the Available Products window. Notice the message in the Available Products windows informing you how much disk space SQL*Plus requires and how much disk space is free.

If you have enough free disk space to install SQL*Plus, click the Install button.

Step 4    Specify where  to install SQL*Plus

The Installer prompts you to enter the drive and directory path to install SQL*Plus. Enter the drive and directory, or click OK to accept the default.

Step 5    Install the Required Support Files (if necessary)

The Installer prompts you to insert the Required Support Files disk. Insert the disk labeled Required Support Files and click OK.

If the Installer does not prompt you for this disk, the Required Support Files were probably copied to your PC during the installation of another Oracle Windows product.

Step 6    Reinsert the SQL*Plus for Windows disk (if necessary)

If you removed the SQL*Plus for Windows disk to install the Required Support Files, the Installer will prompt you for the SQL*Plus for Windows disk. Reinsert the disk and click OK.

Step 7    Exit the Installer

When the installation is complete, each product you have installed is listed in the Installed Products window.

To exit the installer, select Exit from the File menu.

 Removing Oracle Products

You can use the Installer to remove Oracle products from your hard drive.  To do so:

1.	Select the product you wish to remove from those listed in the Installed Products window.

2.	Choose the Remove button.

 ________________________________________

Starting SQL*Plus

Complete the following steps to start SQL*Plus for Windows:

Step 1

Load the drivers and executables needed to initialize a network connection (remote Oracle database connection only).

Step 2

Start Windows in enhanced mode by entering:

C:\>WIN

Step 3

Double-click the SQL*Plus icon in the Oracle program group.

Step 4

SQL*Plus now displays the Log On dialog box.

Enter you Oracle username and password.

If you are connecting to a remote Oracle database, enter the SQL*Net connect string. (You may enter your username, password, and connect string in the User Name box.)

Additional Information:  For more information, see the Installation Guide or Getting Started for your SQL*Net Driver.


CHAPTER 2. SQL*Plus Menus

This chapter gives a brief description of the SQL*Plus interface and describes the menu items listed in the following SQL*Plus menus:

•	File

•	Edit

•	Search

•	Options

•	Help

 ________________________________________

The SQL*Plus for Windows Interface The SQL*Plus for Windows Interface

After you install and start SQL*Plus as described in Chapter 1, "Getting Started," SQL*Plus displays the SQL prompt in the SQL*Plus window. The SQL*Plus window contains basic Microsoft Windows elements,  such as dialog boxes, pull-down menus, scroll bars, and minimize and maximize buttons. For more information about the operation of these elements, refer to the Microsoft Windows documentation.

 Using Both Mouse Buttons to Copy SQL Commands

In addition to the functionality provided by the Microsoft Windows elements, SQL*Plus allows you to use the mouse buttons to copy previously entered SQL commands to the current SQL prompt. To quickly copy a command, highlight it and hold down the left mouse button. While holding down the left button, click the right button. SQL*Plus copies the text.

 Using the Command Keys

SQL*Plus assigns the traditional functions to most of the command keys. However, the following command keys have special functions in SQL*Plus for Windows:

Key	Function

------------------------------------------------------------------------

HOME	Top of screen buffer

END	Bottom of screen buffer

CTRL+HOME	Right side of screen buffer

CTRL+END	Left side of screen buffer

PAGE UP	Previous screen page

PAGE DOWN	Next screen page

CTRL+PAGE UP	Show page on left of current screen page

CTRL+PAGE DOWN	Show page on right of current screen page

CTRL+INS	Copy text

SHIFT+INS	Paste text

SHIFT+DEL	Clear the buffer

Note: The Esc, Pause, Insert, Delete, and F1 through F12 keys have no function in SQL*Plus for Windows.

 ________________________________________

File Menu

The File menu consists of:

 Open

The Open option retrieves a previously stored command file. By default, SQL*Plus for Windows assigns the .SQL extension to command files. You can specify a different extension in the File Name text box.

GET is the command line equivalent of the Open menu item.

 Save

The Save menu item includes three options for saving: Save Create; Save Replace; and Save Append.

Save Create    saves the contents of the SQL*Plus buffer in a command file. By default, SQL*Plus for Windows assigns the .SQL extension to command files. You can specify a different extension in the File Name text box.

The SAVE CREATE clause is the command line equivalent of the Save Create menu item.

Save Replace    replaces the contents of an existing file with the contents of the SQL*Plus buffer. If the file does not exist, Save Replace creates the file.

The SAVE REPLACE clause is the command line equivalent of the Save Replace menu item.

Save Append    adds the contents of the SQL*Plus buffer to the file that you specify.

The SAVE APPEND clause is the command line equivalent of the Save Append menu item.

After you save a command file, you can:

•	retrieve the file with the Open option

•	edit the file with the Editor option from the Edit menu

•	start or run the file with the START or RUN commands from the SQL*Plus command prompt

 Save As

The Save As option stores the contents of the buffer to a command file. By default, SQL*Plus for Windows assigns the .SQL extension to command file. You can specify a different extension in the File Name text box.

SAVE is the command line equivalent of the Save As menu item.

 Spool

The Spool menu item contains two options: Spool File and Spool Off.

Spool File    stores query results in a file. By default, SQL*Plus for Windows assigns the .LST extension to spool files. You can specify a different extension in the File Name text box.

After you spool query results to a file, you can:

•	edit the results with the Editor option from the Edit menu

•	print the file from a Windows text editor, such as Notepad

The SPOOL FILE clause is the command line equivalent of the Spool File option.

Spool Off    turns off spooling.

The SPOOL OFF clause is the command line equivalent of the Spool Off option.

 Run

The Run option lists and executes the SQL command or a PL/SQL block currently stored in the SQL buffer.

RUN is the command line equivalent of the Run menu item.

 Cancel

The Cancel option cancels an in-progress operation.

CTRL+C is the keyboard shortcut for the Cancel menu item.

 Exit

The Exit option commits all pending database changes and closes the SQL*Plus application Window.

EXIT is the command line equivalent of the Exit menu item.

 ________________________________________

Edit Menu

The Edit menu consists of:

 Copy

The Copy option copies selected text to the Windows clipboard.

After you copy text to the clipboard, you can paste the copied text into other Windows applications, such as Microsoft Excel and Microsoft Word.

CTRL+INS is the keyboard shortcut for the Copy menu item.

 Paste

The Paste option pastes the contents of the Windows clipboard onto the SQL*Plus command line.

Note: A maximum of 3625 characters can be pasted from the Windows clipboard onto the SQL*Plus command line during a single paste operation.

SHIFT+INS is the keyboard shortcut for the Paste menu item.

 Clear

The Clear option clears the Windows screen buffer and the screen.

The CLEAR SCREEN clause is the command line equivalent of the Clear menu item.

SHIFT+DEL is the keyboard shortcut for the Clear menu item.

 Editor

The Editor menu item consists of two options: Invoke Editor and Define Editor:

Invoke Editor    loads the contents of the buffer into a Notepad window. By default, Notepad saves the file to AFIEDT.BUF. You can specify a different filename by using the Save As option in the Notepad file menu.

You can also specify another editor by using the Define Editor option.

Note: To save text to the buffer automatically, you must use Notepad.  If you use an editor other than Notepad, you can save text into the buffer manually by choosing the file from the Open dialog in the File menu.

EDIT is the command line equivalent of Invoke Editor option.

Additional Information: See Edit in SQL*Plus User's Guide and Reference.

Define Editor    defines the editor that is invoked when you select the Invoke Editor option.

To define an editor, select Define Editor, enter the name of the executable of the editor, such as WRITE.EXE, and click OK. Whenever you select Invoke Editor, SQL*Plus loads the content of the buffer into the window of the text editor you specified.

DEFINE _EDITOR is the command line equivalent of the Define Editor option.

 ________________________________________

Search Menu

The Search menu consists of the following options:

 Find

The Find option looks for a character, word, or a group of characters or words in the SQL*Plus application window. When you choose the Find option, SQL*Plus starts the search from the top of the displayed screen.  Note that when SQL*Plus reaches the end of the SQL*Plus session display, SQL*Plus will not automatically continue searching from the top of the SQL*Plus session display.

To find text:

1.	Display the screen where you want to start the search, using the Home, End, Page Up, and Page Down keys.

2.	Select Find and enter the text you want to find.

3.	 Select the Case Sensitive check box if you want to match capitalization exactly.

 Find Next

The Find Next option finds the next occurrence of the search text.

 ________________________________________

Options Menu

The Options menu consists of:

 Screen Buffer

The Screen Buffer option controls the number of characters and lines SQL*Plus displays. The SQL*Plus screen buffer can be larger or smaller than the size of the SQL*Plus application window. You might think of the screen buffer as an "invisible window" within the SQL*Plus application window that determines the amount of data SQL*Plus displays. If the screen buffer is larger than the application window, you can use the scroll bars to view all of the data.

Initially, the size of the buffer is set to display a width of 80 characters and a length of 100 lines. You can increase the number of characters and lines of Oracle data SQL*Plus displays by changing the values of the Buffer Width and Buffer parameters in the Screen Buffer dialog box.

When you select the Screen Buffer option, SQL*Plus displays a warning dialog box to alert you that if you shorten the size of your screen buffer, some data may not be displayed on your screen. Click OK if you want to proceed.

The Screen Buffer dialog box consists of two text boxes: Buffer Width and Buffer Length:

Buffer Width   sets the number of characters SQL*Plus displays on one line. If you enter a number smaller than the length of output data, SQL*Plus truncates the data to match the buffer width you specified. The default value of the Buffer Width parameter is 80 characters. You can specify from 80 to 1,000 characters on one line.

Buffer Length  sets the number of lines SQL*Plus displays on the screen. If SQL*Plus displays more lines of data than you specify, the remaining lines of data will "wrap around" to the top of the screen buffer. The default value of the Buffer parameter is 100 lines. You can specify from 100 to 2,000 lines on one screen.

 Set Options

The Set Options option provides a list of variables you can choose to establish aspects of the SQL*Plus environment for your current session, such as:

•	setting the display width for NUMBER data

•	setting the display width for LONG data

•	enabling or disabling the printing of column headings

•	setting the number of lines per page

To establish an aspect of the SQL*Plus environment:

1.	Select Set Options, then select a variable from the list box.

2.	Depending on the variable you selected, SQL*Plus activates the Switch region and the Value region. The switch region toggles a variable on or off. The value region sets the variable to the default value or the value you specify. Click the switch buttons and enter the values for each variable you select, then click OK.

The SET command and variables are the command line equivalents of the options available from the Set Options menu item.

 ________________________________________

Help Menu

The Help menu consists of the following items:

SQL*Plus User's Guide and Reference explains the features and uses of SQL*Plus and describes in detail each SQL*Plus command.

SQL Language Quick Reference provides an overview of the Oracle procedural language extension of Structured Query Language (PL/SQL).

PL/SQL Programming Language Quick Reference provides an overview of the Oracle procedural language extension of Structured Query Language (PL/SQL).

About SQL*Plus displays the copyright date and version number.


CHAPTER 3. SQL*Plus in the Windows Environment

This chapter describes the operation of SQL*Plus in the Windows environment and provides the Windows-specific information cross-referenced in the SQL*Plus User's Guide and Reference.

 ________________________________________

Operating System-Specific References

As you work through the examples in the SQL*Plus User's Guide and Reference, note the references to the "Oracle installation and user's manual(s) provided for your operating system."  Whenever you see one of these cross references, you can find the Windows specific information in the following section.

For example, the description of the SET TIMING command in Chapter 6 of the SQL*Plus User's Guide and Reference includes the following statement:  "For information about the data SET TIMING ON displays, see the Oracle installation and user's manual(s) provided for your operating system".   To get information on the operation of the SET TIMING command in the Windows environment, read the section, "The TIMING Command" later in this chapter.

 Loading the Sample Data

The section "Access to Sample Tables" in Chapter 1 discusses the sample data that you must load into your database in order to work through the exercises in the SQL*Plus User's Guide and Reference.

Note: If you access a database installed on another computer, your Database Administrator (DBA) should build these tables for you.

To load the data, log on to SQL*Plus with the user account you will use to work through the examples.  The SQL*Plus User's Guide and Reference  refers to username `SCOTT' with password `TIGER,' but you may use any account that has the resource privilege.  Enter the following command at the SQL*Plus prompt, substituting the drive and directory name of your Oracle home directory for C:\ORAWIN.

SQL> @C:\ORAWIN\DBS\DEMOBLD.SQL

 Removing the Demonstration Tables

When you finish working through the examples, you may remove the sample data from the database, by entering the following command:

SQL> @C:\ORAWIN\DBS\DEMODROP.SQL

 Key Assignments

"Using the Keyboard" in Chapter 2 describes the SQL*Plus keyboard functions.  In SQL*Plus for Windows, keys have the same function in SQL*Plus as they do in Windows.  In addition, SQL*Plus for Windows provides shortcut keys for copying and pasting text and for clearing the buffer.  See Chapter 2 of this Guide for more information.

 Automatic Logon

"Shortcuts to Starting SQL*Plus" in Chapter 2 refers you to this Guide for information about automatically logging on to SQL*Plus when you log on to your operating system.  Since you do not log on to Windows, automatic logons do not apply to SQL*Plus for Windows.

 The TIMING Command

The section "Collecting Timing Statistics on Commands You Run" in Chapter 2 and the sections "Set" and "Timing" in Chapter 6 discuss how to use the TIMING command and the TIMING parameter with the SET command to record timing data for an elapsed period.  In SQL*Plus for Windows, the accumulated time is displayed in milliseconds.

 Error Messages

"Interpreting Error Messages" in Chapter 2 refers you to the Oracle7 Server Messages and Codes Manual and this Guide to find error codes that begin with the letters "ORA."

If you do not find the error code in the Oracle7 Server Messages and Codes Manual, refer to the installation and user's guide provided with your Oracle database.

 The LOGIN Files

"Setting Up Your SQL*Plus Environment" in Chapter 3 describes the use of the LOGIN files, LOGIN.SQL and GLOGIN.SQL.  When you installed SQL*Plus, LOGIN.SQL was copied to the \DBS subdirectory of your Oracle home directory.  GLOGIN.SQL was copied to \PLUS31, the SQL*Plus subdirectory.  If you modify LOGIN.SQL or GLOGIN.SQL, make sure you do not add any ANSI escape sequences.

Note: Some Oracle products use a LOGIN file named LOGIN.NEW.  If this file exists on your computer, make sure  you do not use it with SQL*Plus for Windows.

 Sending Query Results to a File

"Sending Results to a File" in Chapter 4 describes the use of the SPOOL command.  Note that this command is available as a menu option in the SQL*Plus for Windows File menu.  (See the section, "File Menu", in Chapter 2 of this Guide.)

When you use the SPOOL command from the File menu or from the SQL*Plus command line, SQL*Plus for Windows adds .LST to your filename if you do not specify an extension.

Note: SQL*Plus for Windows does not support the use of the SPOOL OUT clause at the SQL*Plus command line.

 Path Search and  the @ and START Commands

The sections, "@ ("at" sign)," "@@(double "at" sign)," and "START" in Chapter 6 explain how SQL*Plus searches for a file when you use the @, @@, or START command.  Under Windows, SQL*Plus searches the current default directory for the filename you specified with the @, @@, or START command.  If SQL*Plus cannot find this file, the program searches a path to find the file.

You can specify the path that SQL*Plus searches by modifying the SQLPATH parameter in your ORACLE.INI.  Refer to Appendix A of this Guide for more information about the SQLPATH parameter.

 Exit Command

The section, "EXIT" in Chapter 6 describes how to use the EXIT command to run SQL*Plus command files in batch mode.  SQL*Plus for Windows does not support batch mode.

 Host Command

As described in the section, "HOST" in Chapter 6, you can access the DOS command line by entering the HOST command or the dollar sign ($) at the SQL*Plus prompt.  To return to SQL*Plus, type EXIT at the DOS prompt.

 RUNFORM Command

The section, "RUNFORM", in Chapter 6 describes how to use the RunForm command to invoke a SQL*Forms application from within SQL*Plus.  SQL*Plus for Windows does not support RUNFORM.

 MAXDATA Parameter of the SET command

The function of the SET command parameter, MAXDATA, is described in the section "SET" in Chapter 6.  SQL*Plus for Windows can process a row width of up to 32K.  The default value for the MAXDATA parameter is 32K.

Note: You can "SET" the MAXDATA parameter by selecting the Set Options option from the Options menu.

 Site Profile

The "SQLPLUS" section of Chapter 6 describes how to use the Site Profile command file.  This command file is not applicable to the  Windows environment.

 PUPBLD.SQL

Appendix E describes the PRODUCT_USER_PROFILE table.  To create this table, you or your DBA must run the PUPBLD.SQL file located in the \PLUS31 subdirectory of your Oracle home directory.

Note: If you are using SQL*Plus for Windows with a remote database, you may want to install the PRODUCT_USER_PROFILE on the remote database.  To do this, run PUPBLD on the server directly.  Alternatively, you can set the LOCAL parameter in your ORACLE.INI file to point to the remote database and then run PUPBLD.  See Appendix A of this chapter for more information on setting the LOCAL parameter.


APPENDIX A. Customizing Operating System Parameters: The ORACLE.INI File

You can customize your ORACLE configuration by changing the operating system parameter values defined in the ORACLE.INI file. This chapter discusses the ORACLE.INI file and its associated parameters.

 ________________________________________

Modifying the ORACLE.INI File

When you use the Oracle Installer for Windows to install any Oracle Windows product, it creates the following section in your WIN.INI file:

[Oracle]

ORA_CONFIG=C:\WINDOWS\oracle.ini

In addition, the Installer creates an Oracle-specific file called ORACLE.INI in your WINDOWS directory. ORACLE.INI contains configuration parameters and initial settings for the Oracle Windows products that you install.

ORACLE.INI parameters control such things as the name of the Oracle home directory, the location of the product preference file, and the location of the help files. If you use SQL*Net for Windows, the  ORACLE.INI parameters also determine the driver to be used for network communications and the values that SQL*Net should use for its operating parameters. See your SQL*Net documentation for descriptions of ORACLE.INI parameters that affect the performance of SQL*Net.

 When to Set ORACLE.INI Parameters

When you installed SQL*Plus for Windows, the Installer automatically set certain parameters in your ORACLE.INI file. The default values for these parameters are listed in this Appendix. Other parameters must be set manually and are so noted in the parameter descriptions.

If you change the default value of a parameter or add a parameter to your ORACLE.INI file, the changes will take effect whenever SQL*Plus executes a procedure that uses one of these parameters. For example, if you copy the SQLUS.MSB file to another directory and reset PRO15, the parameter that specifies the location of SQLUS.MSB to that directory, SQL*Plus will look for the file in the new directory the next time this file is needed.

 How to Set ORACLE.INI Parameters

To set ORACLE.INI parameters, use a text editor such as Notepad to change or add the parameters in the default ORACLE.INI file. For example, you could add the following line to your ORACLE.INI file to set the SQLNET parameter:

SQLNET DBNAME Mktg_SRV=X:Server1

Note: If you define a parameter two or more times in the ORACLE.INI file,  only the first value is used.

 Specifying Another ORACLE.INI File

You can also specify a different ORACLE.INI file by changing the Oracle entry in the WIN.INI file located in your WINDOWS directory. For example, you could change the following line in WIN.INI:

ORA_CONFIG=C:\WINDOWS\ORACLE.INI

to:

ORA_CONFIG=C:\WINDOWS\MYORACLE.INI

 ________________________________________

ORACLE.INI Parameter Descriptions

The following list describes the ORACLE.INI parameters and their default values. Acceptable parameter name abbreviations appear in parentheses.

 LOCAL (LOC)

Windows Default: not set automatically

Legal Values:  any valid SQL*Net driver prefix

This parameter specifies the SQL*Net driver and SQL*Net parameters (complete database string) to use when no communications driver is specified upon loading SQL*Plus. This parameter enables the DBA to define a "default" network connection. When the user logs on without specifying any network parameters, ORACLE uses the LOCAL connection. Thus, the distributed database is made invisible to the user.

You can reset this parameter on the command line at any time.

Additional Information: For more information about the driver prefixes and SQL*Net parameters that are valid for Windows, see the Installation Guide or Getting Started for your SQL*Net driver.

 NLS_LANG

Default:  AMERICAN_AMERICA.WE81508859P1

Legal Values:  See the accompanying Release Notes for a current list of	 	available values.

The NLS_LANG parameter sets the language in which message files appear. The syntax for NLS_LANG is as follows:

NLS_LANG=language_territory.char_set

where:

language	specifies the language and its conventions for displaying messages and day and month names.

territory	specifies the territory and its conventions for calculating week and day numbers.

char_set	specifies the character set used for the UPPER, LOWER, and INITCAP functions, and the type of sort used by an ORDER BY query. This argument also controls the character set used for displaying messages.

 ORACLE_HOME

Default:  \ORAWIN on the drive where you boot your PC

Legal Values:  any directory on any drive

This parameter specifies the home directory in which Windows Oracle products are installed.

 PRO15

Default:  \ORAWIN\PRO15

Legal Values:  any directory on any drive

This parameter specifies the location of the SQLUS.MSB message file. The SQLUS.MSB file is used by any precompiled Oracle Product. (This release of SQL*Plus is not precompiled.)

Note: SQLUS.MSB is the name of the American English file. If you are not using the American English version of the Required Support Files, the name of this file may vary.

The first three characters of this parameter, PRO, stand for the precompiler, such as Pro*C, Pro*COBOL, and PRO*Fortran. The remaining characters correspond to the current version of the SQLUS.MSB message file. Other ORACLE tools and subsequent releases of the Required Support Files use a different version of this message file.

 PLUS31

Default:  \ORAWIN\PLUS31

Legal Values:  any directory on any drive

This parameter specifies the location of the SQL*Plus files, including the help scripts and the GLOGIN.SQL file. In addition to searching the directory specified by the PLUS31, SQL*Plus will also search the current directory for SQL*Plus files.

The first four characters of this parameter, PLUS, stand for SQL*Plus. The remaining characters correspond to the current version of SQL*Plus. Subsequent releases of SQL*Plus may use a different parameter to specify the SQL*Plus directory to enable you to keep multiple versions of SQL*Plus on your PC.

 RDBMS70

Default:  \ORAWIN\RDBMS70

Legal Values:  any directory on any drive

This parameter specifies the location of three message files: LCDUS.MSB, ORAUS.MSB, and SOSDUS.MSB.

Note: LCDUS.MSB, ORAUS.MSB, and SOSDUS.MSB are the names of the American English files. If you are not using the American English version of the Required Support Files, your file names may vary.

The first five characters of this parameter, RDBMS, stand for ORACLE RDBMS. The remaining characters correspond to the current version of the RDBMS message files. Other ORACLE tools and subsequent releases of the Required Support Files may use different versions of these message files.

 REMOTE (REM)

Default:  not set automatically

Legal Values:  any valid SQL*Net driver prefix and parameters

This parameter specifies the default and remote SQL*Net driver to use when connecting via a local database. The parameter can include the default SQL*Net parameters (complete database string). For example:

REMOTE=P:PIPER

where P: is the network prefix for Named Pipes. Piper is the database name.

If a user logs on and specifies a connection with an explicit driver prefix matching the one specified in REMOTE, but specifies no SQL*Net parameters, the parameters specified in REMOTE are used. This parameter enables the DBA to define a "normal" network connection for which the SQL*Net user need not specify connection parameters.

You can reset this parameter on the command line at any time.

 SQLNET

Default:  not set automatically

Legal Values:  any valid network alias/network prefix combination

This parameter allows you to set a unique alias for each server on your network or distributed network. By setting multiple aliases you can refer to connect strings by simple names or mnemonic conventions; you need not remember the complete connect string for each one. The following is the general syntax for SQLNET:

SQLNET DBNAME server_alias=connect_string

To use the server specified in SQLNET, you must enter the alias. For example, if you had set

SQLNET DBNAME Mktg_SRV=X:Server1

you would access the database from within SQL*DBA by typing:

SQLDBA> CONNECT SCOTT/TIGER@Mktg_SRV;

You can include multiple SQLNET parameters in the ORACLE.INI file to define multiple network aliases.

 SQLPATH

Default:  \ORAWIN\DBS

Legal Values:  any directory on any drive

This parameter specifies the location of SQL scripts. In addition to searching the directory specified by the SQLPATH parameter, SQL*Plus will also search the current directory for SQL scripts.

Note: SQL*Plus uses the PLUS31 parameter to specify the location of the  GLOGIN.SQL script. Refer to "PLUS31" earlier in this Appendix for more information.

When you set the SQLPATH parameter, note that directories can be concatenated with a semicolon (;). For example:

SQLPATH=C:\ORAWIN\DATA;C:\ORAWIN\DBS>

 TK20

Default:  \ORAWIN\DBS

Legal Values:  any directory on any drive

This parameter specifies the location of the UIWUS.MSB message file. In addition to searching the directory specified by the TK20 parameter, SQL*Plus will also search the current directory for the UIWUS.MSB message file.

Note: UIWUS.MSB is the name of the American English file. If you are not using the American English version of the Required Support Files, the name of this file may vary.

The first two characters of this parameter, TK, stand for Oracle toolkit. The remaining characters correspond to the current version of the Oracle toolkit. Other ORACLE tools and subsequent releases of the Required Support Files may use a different version of this message file.

 USERNAME (USER)

Default:  not set automatically

Legal Values:  any valid OPS$ username (without the OPS$ prefix)

This parameter specifies the variable part of a User ID that begins with the fixed character string 'OPS$'. (See your database documentation for more information on OPS$ accounts.)  For example, if OPS$EUGENE is a valid User ID, a possible USERNAME would be:

USERNAME=EUGENE

Since a User ID cannot be more than 30 characters long, the username  part of an OPS$ User ID may not be more than 26 characters long.

ORACLE assigns the User ID specified by USERNAME to anyone who logs on without providing a User ID. In other words, anyone who presses Enter in response to a User ID prompt will be able to log on. You can use this facility to free a user or a class of users from having to log on and remember passwords.

The User ID specified by USERNAME must be a valid User ID defined in the usual way with the GRANT statement; for example:

SQL>GRANT CONNECT, RESOURCE TO OPS$EUGENE IDENTIFIED BY WELCOME;

A user who logs on without specifying a username or password receives whatever privileges were granted to the OPS$ username.

You can define several classes of OPS$ users by specifying different USERNAMEs in different ORACLE.INI files. Specify each ORACLE.INI file with a SET ORACLE.INI command line option in a batch file written for use by each class of user.

New User IDs can be created at any time, and are effective immediately.