Мазмұнға өту

SQL*Plus

Уикипедия — ашық энциклопедиясынан алынған мәлімет
17:16, 2012 ж. қарашаның 15 кезіндегі 95.59.110.118 (талқылау) жасаған нұсқа (Жаңа бетте: '''SQL*Plus''' - Оракл теру утилитасы <!-- The most basic Oracle utility, with a basic command-line interface, commonly used by users, administrators, and ...)
(айырма) ← Ескірек нұсқа | Соңғы нұсқа (айырма) | Жаңарақ нұсқа → (айырма)

SQL*Plus - Оракл теру утилитасы

|archivedate = 2007-11-09}}</ref> 
  1. SQL statements
  2. PL/SQL blocks
  3. SQL*Plus internal commands, for example:
    1. environment control commands such as SET
    2. environment monitoring commands such as SHOW

Scripts can include all of these components.

An Oracle programmer in the appropriately configured software environment can launch SQL*Plus, for example, by entering:

sqlplus scott/tiger

where the Oracle user scott has the password tiger. SQL*Plus then presents a prompt with the default form of:

SQL>

Interactive use can then start by entering a SQL statement (terminated by a semicolon), a PL/SQL block, or another command. For example:

SQL> select 'Hello world' as example from dual;

EXAMPLE
--------------------------------
Hello world

History

The first version of SQL*Plus was called UFI ("User Friendly Interface"). UFI appeared in Oracle database releases up to Version 4.

After Oracle programmers had added new features to UFI, its name became Advanced UFI. The name "Advanced UFI" changed to "SQL*Plus" before the release of thisҮлгі:Which? version.

Үлгі:As of the product continues to bear the name SQL*Plus.

Usage

Graphical interfaces from Oracle or third parties have diminished the proportion of Oracle database end-users who depend on the SQL*Plus environment. Oracle shops typically continue to use SQL*Plus scripts for batch updating or simple reports.[дереккөзі?]

Oracle Corporation's wrappers/gui-fications/replacements for SQL*Plus include:

Oracle 11g

Starting from Oracle database 11g, iSqlplus (web based) and sqlplus graphical GUI no longer ship with Oracle database software.[5] The command-line SQL*Plus interface continues in use, mostly[дереккөзі?] for non-interactive scripting or for administrative purposes (connect internal before Oracle 8i; sqlplus ... as sysdba later).

Compatibility

Other vendors have made their software somewhat compatible with SQL*Plus script commands or offer a SQL*Plus mode of operation. Relevant products include TOAD from Quest Software.[дереккөзі?]

Integration

Үлгі:Expand section

Variables

SQL*Plus-internal variables, accessible within an SQL*Plus session, include:

  • user variables, displayable with the DEFINE command and referenceable with one or two cases of a prefixed character (default prefixes: '&' and '&&'). These variables are called "substitution variables" and can be used anywhere in a SQL or PL SQL statement or in SQL Plus commands. They can be populated by a literal using DEFINE or from the database using the column command.
    • predefined variables, prefixed with an underscore ('_')[6]
    • substitution variables, useful for interacting with user-input[7]
  • bind variables, prefixed by a colon (':'), which can interact with the PL/SQL environment. Displayable with the VARIABLE and PRINT commands[8]

Supplementary software

  • SQL Assistant SQL Assistant add-on for SQL*Plus Windows version extends SQL*Plus with SQL automatic word completion, in-line Oracle SQL Reference, data export/import, code unit testing, data browsing, and code development functions.
  • rlwrap rlwrap does GNU Readline like command completion for SQL*Plus on UNIX and Linux.

-->

Тағы қараңыз

References

  1. Evans, Robert The SQL*Plus Worksheet. Cardiff University (1 қазан 2008). — «Oracle's SQL*Plus Worksheet is a straight-forward, easy-to-use, graphical user interface for SQL.»  Тексерілді, 21 қараша 2008.
  2. ISQLPlus. Oracle FAQ (29 ақпан 2008). — «iSQLPlus (iSQL*Plus) is a web-based utility similar to the SQL*Plus command line utility for executing SQL and PL/SQL commands (available up to Oracle 10gR2).»  Тексерілді, 21 қараша 2008.
  3. Oracle SQL Developer 1.5: Feature List. Oracle Corporation. — «The SQL*Plus commands supported by Oracle SQL Developer SQL Worksheet are listed [...]»  Тексерілді, 21 қараша 2008.
  4. Oracle Application Express. Oracle Corporation. — «SQL Workshop provides tools to enable you to view and manage database objects from a Web browser. Use SQL Commands to run SQL and PL/SQL statements. ...»  Тексерілді, 21 қараша 2008.
  5. Deprecated Components in Oracle Database 11g Release 1 (11.1), retrieve by 25-Jun-2009
  6. Alapati Sam R. 4 // Expert Oracle Database 11g Administration — Apress, 2008. — P. 118–119. — ISBN 978-1-4302-1015-3.
  7. Roshak, Natalka Spice up your SQL Scripts with Variables. Oracle FAQ (6 қараша 2005). — «& and && indicate substitution variables in SQL*Plus scripts or commands.»  Тексерілді, 29 шілде 2009.
  8. Nyffenegger, René Using bind variables in SQL*Plus. René Nyffenegger's collection of things on the web. — «In SQL*Plus, a bind variable is declared with variable [...] The value of the bind variable can then be printed with print»  Тексерілді, 29 шілде 2009.