오라클 SQL*Plus 환경 설정 정보 저장 방법 [출처] 오라클 SQL*Plus 환경 설정 정보 저장 방법|작성자 메멘토
오라클 SQL*Plus 환경 설정 정보 저장 방법
SQL*Plus 에서 여러 설정을 한 후 종료하면 모든 설정 내용이 초기화 된다.
오라클을 C: 드라이브에 ora92 라는 SID로 설치 했다면
C:\oracle\ora92\sqlplus\admin\glogin.sql 파일을 수정하면 SQL*Plus 의 설정 내용을 저장할 수 있다.
glogin.sql 은 SQL*Plus 가 실행될 때 자동으로 실행되는 SQL 파일이다.
glogin.sql 파일의 마지막 부분에 아래와 같이 내용을 추가해주면 된다.
---------------
glogin.sql
---------------
--
-- 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
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 a60
COLUMN object_node_plus_exp FORMAT 
a8
COLUMN other_tag_plus_exp FORMAT 
a29
COLUMN other_plus_exp FORMAT 
a44
-- ↑ 기존 내용
-- 한 줄 에 120 글자가 나오게 하고 싶은 경우 (내가 추가하고 싶은 내용)
SET LINESIZE 120
[출처] 오라클 SQL*Plus 환경 설정 정보 저장 방법|작성자 메멘토