/**
* ユーザ実行SQL確認
*/
SELECT B.ADDRESS, B.HASH_VALUE, B.SQL_TEXT
FROM V$OPEN_CURSOR A, V$SQLTEXT B
WHERE A.SID = &SID AND A.ADDRESS = B.ADDRESS AND A.HASH_VALUE = B.HASH_VALUE
ORDER BY B.ADDRESS, B.HASH_VALUE, B.COMMAND_TYPE, B.PIECE
/**
* ログインユーザ確認
*/
SELECT SID, STATUS, USERNAME, SCHEMANAME, OSUSER, MACHINE, PROGRAM, SERIAL#, COMMAND
FROM V$SESSION
WHERE TYPE = 'USER'
SQL PLUSでの確認
SHOW USER
/**
* ユーザ統計情報確認
*/
SELECT A.STATISTIC#, B.CLASS, B.NAME, A.VALUE
FROM V$SESSTAT A, V$STATNAME B
WHERE A.SID = &SID AND A.STATISTIC# = B.STATISTIC#
/**
* ユーザ確認
*/
SELECT USERNAME
FROM ALL_USERS
ORDER BY 1
★USERENV関数
SELECT USERENV('SESSIONID') FROM DUAL;
パラメータ:CLIENT_INFO, ENTRYID, ISDBA, LANG, LANGUAGE, SESSIONID, TERMINAL
0 件のコメント:
コメントを投稿