Created
July 23, 2012 11:43
-
-
Save yoshikaw/3163209 to your computer and use it in GitHub Desktop.
login.sqlのサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET TERMOUT OFF | |
SET HEADING OFF | |
-------------------------------------------------------------------------------- | |
-- SQL BUFFER | |
-------------------------------------------------------------------------------- | |
DEFINE _EDITOR=vim | |
SET EDITFILE "afiedt.sql" | |
-------------------------------------------------------------------------------- | |
-- SQLPROMPT | |
-------------------------------------------------------------------------------- | |
COLUMN h NEW_VALUE v1 | |
COLUMN s NEW_VALUE v2 | |
SELECT ' [' || REGEXP_REPLACE(HOST_NAME, '\..*$', '') || ']' || INSTANCE_NAME AS h FROM V$INSTANCE; | |
SELECT '/' || SERVICE_NAME AS s FROM V$SESSION WHERE SID = USERENV('SID') AND SERVICE_NAME != 'SYS$USERS'; | |
SET SQLPROMPT "'('_DATE')'&v1&v2 _USER'>' " | |
SET SQLPROMPT "'('_DATE')'&v1&v2 _USER _PRIVILEGE'>' " | |
COLUMN h CLEAR | |
COLUMN s CLEAR | |
UNDEFINE v1 | |
UNDEFINE v2 | |
-------------------------------------------------------------------------------- | |
-- OTHER SETTINGS | |
-------------------------------------------------------------------------------- | |
@@columns.sql | |
@@app_columns.sql | |
SET PAGESIZE 9999 | |
SET LINESIZE 9999 | |
SET LONG 999999 | |
SET AUTOCOMMIT OFF | |
SET TIME OFF | |
SET TIMING ON | |
SET HEADING ON | |
SET TERMOUT ON | |
SET TRIMSPOOL ON | |
SET TAB OFF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment