sqlplus中glogin.sql的例子

chance2000發表於2006-03-26
sqlplus中glogin.sql的例子[@more@]

--
-- copyright (c) oracle corporation 1988, 2000. all rights reserved.
--
-- name
-- glogin.sql
--
-- description
-- sql*plus global login startup file.
--
-- add any sqlplus commands here that are to be executed when a user
-- starts sql*plus on your system
--
-- usage
-- this script is automatically run when sql*plus starts
--

-- for backward compatibility
-- Determines whether SQL*Plus allows trailing blanks at the end of each spooled line.
set trimspool on
-- Sets maximum width (in characters) for displaying and copying LONG values.
set long 5000
-- Sets the default format for displaying numbers.
set numformat 9999999999
-- Sets the total number of characters that SQL*Plus displays on one line before beginning a new line.
set linesize 120
-- Sets the number of lines in each page.
set pagesize 14

set sqlpluscompatibility 8.1.7

-- used by trusted oracle
column rowlabel format a15

-- used for the show errors command
column line/col format a8
column error format a65 word_wrapped

-- used for the show sga command
column name_col_plus_show_sga format a24

-- defaults for show parameters
column name_col_plus_show_param format a36 heading name
column value_col_plus_show_param format a30 heading value

-- defaults for set autotrace explain report
column id_plus_exp format 990 heading i
column parent_id_plus_exp format 990 heading p
column plan_plus_exp format a80
column object_node_plus_exp format a8
column other_tag_plus_exp format a29
column other_plus_exp format a44

column global_name new_value gname
-- Controls the display of output generated by commands executed from a command file.
set termout off
select lower(user) || || lower(substr(global_name,1,instr(global_name,'.') - 1)) global_name from global_name;
-- Sets the SQL*Plus command prompt.
set sqlprompt '&gname>'
set termout on
-- show system time. Controls the display of the current time.
set time on
-- show elapse time. Controls the display of timing statistics.
set timing on
-- not show & variable's old and new value
-- Controls whether SQL*Plus lists the text of a SQL statement or PL/SQL command
-- before and after SQL*Plus replaces substitution variables with values.
set verify off
-- Sets the character used to underline column headings in SQL*Plus reports to c.
set underline =
--Controls whether to display the output (that is, DBMS_OUTPUT.PUT_LINE) of stored procedures or PL/SQL blocks in SQL*Plus.
set serveroutput on size 100000
-- define default editor
define _editor="C:Program FilesUltraEdituedit32.exe"
-- set editfile's filename
set editfile "afiedit.sql"

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/802415/viewspace-823047/,如需轉載,請註明出處,否則將追究法律責任。

相關文章