SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2...

38
SQL*Plus for Windows NT and Windows 95/98 8.1.5 1999 5 : A62911-1

Transcript of SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2...

Page 1: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

SQL*Plus for Windows NT and Windows 95/98

8.1.5

1999 5

: A62911-1

Page 2: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

SQL*Plus for Windows NT and Windows 95/98 8.1.5

: A62911-1

1 1999 5 1

SQL*Plus Getting Started Release 8.1.5 for Windows NT and Windows 95/98

A69025-01

Susan Lee

Riaz Ahmed, Larry Faulks, Joseph Garcia, Jeff Stein, Nicole Sullivan, Martha Woo

Copyright © 1999, Oracle Corporation. All rights reserved.

Printed in Japan.

* Oracle Corporation

Oracle Corporation

Restricted Rights Legend

Restricted Rights Legend

Programs delivered subject to the DOD FAR Supplement are "commercial computer software" and use, duplication and disclosure of the Programs shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement. Otherwise, Programs delivered subject to the Federal Acquisition Regulations are "restricted computer software" and use, duplication and disclosure of the Programs shall be subject to the restrictions in FAR 52.227-14, Rights in Data -- General, including Alternate III (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065.

Page 3: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

iii

............................................................................................................................................................................. v

1 SQL*Plus

............................................................................................................................................................................ 1-2

.................................................................................................................................................................... 1-2SQL*Plus ............................................................................................................................... ...... 1-3

2 SQL*Plus

................................................................................................................ 2-2.................................................................................... 2-2

SQL*Plus .............................................................................. 2-4

SQL ...... 2-4

............................................................................................................................ 2-4

SQL*Plus ...................................................................................................................... 2-5

.................................................................... 2-10

3

........................................................................................................................................ 3-2

............................................................................................................................................................ 3-2TIMING .................................................................................................................................................. 3-3

.................................................................................................................................... 3-3

SQL*Plus ............................................................................................................................... .............. 3-3............................................................................................................................ 3-3

@ @@ START ............................................................................................................................... .... 3-4

EXIT ............................................................................................................................... .......................... 3-4

Page 4: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

iv

HOST ....................................................................................................................................................... 3-5SET NEWPAGE ..................................................................................................................................... 3-5

PRODUCT_USER_PROFILE .......................................................................................................................... 3-5

A

............................................................................................................................................ A-2

SQLPATH ........................................................................................................................ A-2

Page 5: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

v

SQL*Plus for Windows NT and Windows 95/98 Microsoft Windows NT 4.0 Windows 95 Windows 98

SQL*Plus

: SQL*Plus for Windows NT and Windows 95/98 SQL*Plus

Page 6: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

vi

■ SQL*Plus

SQL*Plusvii

■ Microsoft Windows NT Windows 95/98

Windows NT Windows 95/98SQL*Plus

SQL*Plus SQL PL/SQLOracle

SQL*PlusENAME Employee

COLUMN ENAME HEADING EMPLOYEE

EMP

DESCRIBE EMP

Page 7: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

vii

1 SQL*PlusSQL*Plus

2 SQL*PlusSQL*Plus

SQL*Plus

3SQL*Plus

Windows NT/95/98

AWindows NT/95/98 SQL*Plus

SQL*Plus for Windows NT and Windows 95/98 WindowsSQL*Plus SQL*Plus

CD-ROMSQL*Plus Oracle Enterprise Edition for Windows NT SQL*Plus

■ SQL*Plus

■ SQL*Plus

Page 8: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

viii

SQL*PlusSQL*Plus

helpinst.txt

ORACLE_BASE¥ORACLE_HOME¥SQLPLUS¥ADMIN¥HELP

ALTER DATABASE SQL

filename

filename

Oracle Oracle8

C:¥> C:¥>ORACLE¥ORA81

■ Optimal Flexible Architecture OFA

Oracle

Windows

"MS-DOS "

¥¥ORADATA

Page 9: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

ix

ORACLE_HOMEORACLE_BASE

ORACLE_BASE¥ORACLE_HOME¥ADMIN SQL*Plus

ORACLE_HOME

■ Windows NT C: ¥ORANT

■ Windows 95 C: ¥ORAWIN95

■ Windows 3.1 C: ¥ORAWIN

Oracle

Optimal Flexible Architecture OFA

ORACLE_HOME

ORACLE_BASE

C:¥ORACLE

Oracle Optimal Flexible Architecture OFA

Oracle8i Enterprise Edition for Windows NT

HOME_NAME OracleHOME_NAMETNSListener Oracle

16

Page 10: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

x

.

,

-

;

:

=

¥

'

"

( )

Page 11: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

SQL*Plus 1-1

1SQL*Plus

SQL*Plus

■ SQL*Plus

Page 12: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

1-2 SQL*Plus for Windows NT and Windows 95/98

SQL*Plus SQLPL/SQL Oracle

PL/SQLSQL

SQL*Plus SQL PL/SQLSQL*Plus

■ SQL PL/SQL

SQL*PlusGUI 2 SQL*Plus

SQL*Plus

: 8.1.5 Server ManagerSQL*Plus Server Manager 8.1.x

SQL*Plus

SQL*Plus Oracle

SQL SQL

SQL*Plus SQL*Plus

SQLPL/SQL

Oracle

Page 13: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

SQL*Plus

SQL*Plus 1-3

SQL*Plus SQL*Plus

SQL*PlusCD-ROM SQL*Plus

1 SQL ( SQL SELECT )

SQL*Plus

SQL SQL*Plus SQL

SQL*Plus

: Oracle CD-ROMReadme

Page 14: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

SQL*Plus

1-4 SQL*Plus for Windows NT and Windows 95/98

Page 15: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

SQL*Plus 2-1

2SQL*Plus

SQL*Plus SQL*Plus

Page 16: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

2-2 SQL*Plus for Windows NT and Windows 95/98

SQL*Plus

SQL*Plus

1. Oracle Net8

2. MS-DOS

3. SQL*Plus

SQLPLUS

SQL*Plus SQL*Plus

Windows NTWindows NT Windows 95/98 MS-DOS

■ "string" 1

■ ¥

Windows NT Windows 95/98SQL*Plus

1. Oracle Net8

2. -> -> Oracle - HOME_NAME -> Application Development -> SQL Plus

Page 17: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

SQL*Plus 2-3

OracleSQL*Net

3. OK

Oracle SQL*Plus

SQL

Page 18: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

2-4 SQL*Plus for Windows NT and Windows 95/98

SQL*PlusSQL*Plus SQL

SQL SQL*Plus SQL[Enter]

SQL

SQL SQL

SQL*PlusSQL

SQL*Plus

:

[Home]

[End]

[PageUp]

[PageDown]

[Ctrl]+[Page Up]

[Ctrl]+[Page Down]

[Alt]+[F3]

[F3]

[Ctrl]+C

[Ctrl]+V

[Shift]+Del

Page 19: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

SQL*Plus 2-5

SQL*PlusSQL*Plus GUI

SQL*Plus .SQL

GET filename

3 SAVE

■ SQL*PlusSQL*Plus

.SQL

SAVE filename CREATE

■ SQL*PlusSQL*Plus

SAVE filename REPLACE

■ SQL*Plus

■ SQL*Plus STARTRUN

SAVE filename APPEND

SQL*Plus

SQL*Plus .SQL

SAVE filename

2

Page 20: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

2-6 SQL*Plus for Windows NT and Windows 95/98

SQL*Plus .LST

Windows NT Windows 95/98

SPOOL filename

■ SPOOL OFF

SQL SQLPL/SQL

RUN

[Ctrl]+C

[Ctrl]+C

SQL*PlusEXIT

Microsoft Excel Microsoft Word Windows

[Ctrl]+C

SQL*Plus

: 1 SQL*Plus3625

[Ctrl]+V

SQL*Plus

[Shift]+[Del]

CLEAR SCREEN

2

Page 21: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

SQL*Plus 2-7

■ SQL*PlusSQL*Plus

AFIEDT.BUF

EDIT

■ DEFINE_EDITOR= editor name

SQL*Plus

SQL*Plus

: SQL*Plus SQL*Plus

[Alt]+[F3]

[F3]

SQL*Plus

3

: 2-10

Page 22: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

2-8 SQL*Plus for Windows NT and Windows 95/98

SQL*Plus

■ NUMBER

■ LONG

■ 1

SET SQL*Plus

SET variable value

4

: 2

SET variable value

Page 23: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

SQL*Plus 2-9

2

• SQL*Plus 1

SQL*Plus

100 1 80 1000

• SQL*PlusSQL*Plus

(WRAP)1000 1 100 2000

: SQL*Plus

OK

SET variable value

SQL*Plus

Page 24: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

2-10 SQL*Plus for Windows NT and Windows 95/98

->SQL*Plus SQL

OK

2–1

20

Page 25: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

SQL*Plus 2-11

2–2

echoecho

echo

Page 26: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

2-12 SQL*Plus for Windows NT and Windows 95/98

Page 27: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

3-1

3

SQL*Plus

■ TIMING

■ SQL*Plus

■ @ @@ START

■ EXIT

■ HOST

■ SET NEWPAGE

■ PRODUCT_USER_PROFILE

Page 28: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

3-2 SQL*Plus for Windows NT and Windows 95/98

SQL*Plus 1

SQL*PlusSQL*Plus TIGER

SCOTT

SQL*Plus

SQL> @ORACLE_BASE¥ORACLE_HOME¥DBS¥DEMOBLD.SQL

SQL> @ORACLE_BASE¥ORACLE_HOME¥DBS¥DEMODROP.SQL

SQL*PlusSQL*Plus

2 SQL*Plus

Window NT Windows 95/98 OracleSQL*Plus

1. Windows NT Windows 95/98USERX <PREFIX>USERX

<PREFIX> OPS$ init.ora OS_AUTHENT_PREFIX

2. Windows NT Windows 95/98 USERX /

:

Page 29: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

3-3

TIMINGSQL*Plus 2

8 SET TIMING TIMINGSET TIMING

SQL*Plus

ORA SQL*Plus2 Oracle8i

Oracle8i Oracle8i Enterprise Edition for Windows NT

SQL*PlusSQL*Plus 3 SQL*Plus

LOGIN.SQL GLOGIN.SQL

SQL*Plus LOGIN.SQL Oracle DBS

SQL*Plus GLOGIN.SQL OracleSQLPLUS\ADMIN

LOGIN.SQL GLOGIN.SQL ANSI

Oracle LOGIN.NEW LOGINSQL*Plus

SQL*Plus 4SPOOL

GUI SQL*Plus2-5

SPOOLSQL*Plus .LST

Page 30: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

@ @@ START

3-4 SQL*Plus for Windows NT and Windows 95/98

SQL*Plus SPOOL OUT

@ @@ STARTSQL*Plus 8 @ @@

START @ @@ STARTSQL*Plus

SQL*Plus @ @@ STARTSQL*Plus

SQLPATH SQL*Plus

EXITSQL*Plus 8 EXIT EXIT

SQL*Plus

SQL*Plus

Page 31: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

PRODUCT_USER_PROFILE

3-5

HOSTSQL*Plus 8 HOST HOST

SQL*Plus

SQL*Plus HOST $ SQL*PlusMS-DOS

MS-DOS SQL*Plus EXIT

SET NEWPAGESQL*Plus 8 SET

NEWPAGE

SET NEWPAGE 0API

"/f"

PRODUCT_USER_PROFILESQL*Plus E PRODUCT_USER_

PROFILE PRODUCT_USER_PROFILESQL GRANT REVOKE

PUPBLD.SQLORACLE_BASE¥ORACLE_HOME¥DBS

SQL*Plus PRODUCT_USER_PROFILEPUPBLD.SQL

LOCALPUPBLD.SQL

Page 32: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

PRODUCT_USER_PROFILE

3-6 SQL*Plus for Windows NT and Windows 95/98

Page 33: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

A-1

A

SQLPATH SQL*Plus

■ SQLPATH

:

Page 34: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

A-2 SQL*Plus for Windows NT and Windows 95/98

Windows NT Windows 95/98 OracleOracle Universal Installer

WindowsREGEDT32.EXE REGEDIT.EXE

HKEY_LOCAL_MACHINE¥SOFTWARE¥ORACLE Oracle

OracleSQL*Plus

SQLPATHSQLPATH Windows NT

Windows 95/98 SQL*Plus

: HKEY_LOCAL_MACHINE¥SOFTWARE¥ORACLE

: ORACLE_BASE¥ORACLE_HOME¥DBS

:

SQL SQL*Plus SQLPATHSQL

SQLPATH (;)

C:¥ORACLE¥ORA81¥DATA;C:¥ORACLE¥ORA81¥DBS

WindowsREGEDT32.EXE REGEDIT.EXE

Windows NT 4.0

Windows 95

Windows 98

Page 35: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

-1

$ 3-5@@ 3-4@ 3-4

AAFIEDT.BUF 2-7ANSI 3-3

CCD-ROM 1-3

DDEMOBLD.SQL 3-2DEMODROP.SQL 3-2

EEXIT 3-4

GGLOGIN.SQL 3-3

Hhelpinst.txt viiiHOME_NAME ixHOST 3-5

LLOCAL 3-5LOGIN.NEW 3-3LOGIN.SQL 3-3

MMS-DOS SQL*Plus 3-5

OOptimal Flexible Architecture OFA ixORACLE_BASE ixORACLE_HOME ixORA 3-3

PPL/SQL SQL*Plus 1-2PRODUCT_USER_PROFILE 3-5PUPBLD.SQL 3-5

RREGEDIT.EXE A-2REGEDT32.EXE A-2

SServer Manager SQL*Plus 1-2SET NEWPAGE 3-5SET TIMING 3-3SPOOL OUT 3-4SPOOL 3-3

Page 36: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

-2

SQL*PlusGUI 2-7LOGIN GLOGIN 3-3

1-31-2

3-21-2

1-22-23-3

Windows vvi2-5

SQL*Plus GUI 2-6SQL*Plus 3-2SQL*Plus 2-2SQLPATH 3-4 A-2START 3-4

TTIMING 3-3

2-82-8

Server Manager SQL*Plus 1-21-3

2-72-7

3-3

2-82-7

SQL*Plusv

SQL*Plus viii

1-22-6

SQL*Plus 2-7 3-32-7

vii

1-2

2-22-5

2-7

viii1-2SQL*Plus GUI 2-4

2-52-5

2-2

A-23-2

3-2

Page 37: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

-3

2-71-3

2-6

SQL PL/SQL 2-6

2-93-3

2-5

PRODUCT_USER_PROFILE 3-5LOGIN GLOGIN 3-3

2-3vi

SQL*Plus vi

2-72-7

2-72-4 2-6

2-63-2

1-31-3

viiviii

3-4

SQL 1-3 2-51-3

2-62-9

SQLPATH 3-4 A-2

3-21-2

3-32-5

Oracleix

1-2

2-92-6

2-32-5

2-4

Windows 2-2

A-21-3

Page 38: SQL*Plus for Windows NT and Windows 95/98otndnld.oracle.co.jp/document/products/iserver/... · 3-2 SQL*Plus for Windows NT and Windows 95/98 SQL*Plus 1 SQL*Plus SQL*Plus TIGER SCOTT

-4