10.12.2012 Views

SQL*Plus User's Guide and Reference - InfoLab

SQL*Plus User's Guide and Reference - InfoLab

SQL*Plus User's Guide and Reference - InfoLab

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

xxxii<br />

Changes to SET SERVEROUTPUT ON<br />

Changes to the way output from nested PL/SQL functions is displayed may change<br />

the appearance of output with SET SERVEROUTPUT ON. SET SERVEROUTPUT<br />

ON now correctly shows output (DBMS_OUTPUT.PUT_LINE) from a PL/SQL<br />

function nested inside a SQL statement. Previously, output from a nested PL/SQL<br />

function did not display until a subsequent PL/SQL function was executed.<br />

See Also: "SET" on page 13-103<br />

SHOW RECYCLEBIN<br />

A new option RECYCLEBIN original_name has been added to the SHOW comm<strong>and</strong>.<br />

It enables users to view tables that are available for purging or reverting using the<br />

new PURGE <strong>and</strong> FLASHBACK BEFORE DROP comm<strong>and</strong>s.<br />

See Also: "SHOW" on page 13-136<br />

SET PROMPT Support for Substitution Variables<br />

You can now use substitution variables in the <strong>SQL*Plus</strong> comm<strong>and</strong>-line prompt to<br />

display, for example, the database <strong>and</strong> server you are connected to, or other<br />

information available through a substitution variable you choose. This is similar to<br />

the substitution variable usage in TTITLE.<br />

See Also: "SET SQLP[ROMPT] {SQL> | text}" on page 13-132.<br />

Predefined Variables: _DATE, _PRIVILEGE, _USER<br />

There are three new predefined variables:<br />

� _DATE contains the current date or a user defined fixed string.<br />

� _PRIVILEGE contains the privilege level of the current connect. This will be<br />

either AS SYSDBA, AS SYSOPER or blank to indicate a normal connection.<br />

� _USER contains the username as supplied by the user to make the current<br />

connection. This is the same as the output from the SHOW USER comm<strong>and</strong>.<br />

These variables can be accessed like any other substitution variable. For example,<br />

they could be used in TTITLE, in '&' substitution variables, or as your <strong>SQL*Plus</strong><br />

comm<strong>and</strong>-line prompt by using the SET SQLPROMPT comm<strong>and</strong>. For example, to<br />

make your prompt always show your username (_USER), the @ symbol, <strong>and</strong> then<br />

your connection identifier (_CONNECT_IDENTIFIER) during your session, enter:<br />

SET SQLPROMPT "_USER'@'_CONNECT_IDENTIFIER > "

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!