-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathme2.sql
72 lines (72 loc) · 1.54 KB
/
me2.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
DECLARE
TYPE keys_t IS TABLE OF VARCHAR2(50);
keys keys_t := keys_t(
'ACTION',
'AUDITED_CURSORID',
'AUTHENTICATED_IDENTITY',
'AUTHENTICATION_DATA',
'AUTHENTICATION_METHOD',
'AUTHENTICATION_TYPE',
'BG_JOB_ID',
'CLIENT_IDENTIFIER',
'CLIENT_INFO',
'CURRENT_BIND',
'CURRENT_SCHEMA',
'CURRENT_SCHEMAID',
'CURRENT_SQL',
'CURRENT_SQL_LENGTH',
'CURRENT_USER',
'CURRENT_USERID',
'DB_DOMAIN',
'DB_NAME',
'DB_UNIQUE_NAME',
'ENTRYID',
'ENTERPRISE_IDENTITY',
'EXTERNAL_NAME',
'FG_JOB_ID',
'GLOBAL_CONTEXT_MEMORY',
'GLOBAL_UID',
'HOST',
'IDENTIFICATION_TYPE',
'INSTANCE',
'INSTANCE_NAME',
'IP_ADDRESS',
'ISDBA',
'LANG',
'LANGUAGE',
'MODULE',
'NETWORK_PROTOCOL',
'NLS_CALENDAR',
'NLS_CURRENCY',
'NLS_DATE_FORMAT',
'NLS_DATE_LANGUAGE',
'NLS_SORT',
'NLS_TERRITORY',
'OS_USER',
'POLICY_INVOKER',
'PROXY_ENTERPRISE_IDENTITY',
'PROXY_GLOBAL_UID',
'PROXY_USER',
'PROXY_USERID',
'SERVER_HOST',
'SERVICE_NAME',
'SESSION_USER',
'SESSION_USERID',
'SESSIONID',
'SID',
'STATEMENTID',
'TERMINAL'
);
BEGIN
DBMS_OUTPUT.PUT_LINE(RPAD('-', 80, '-'));
FOR i IN keys.FIRST..keys.LAST LOOP
BEGIN
DBMS_OUTPUT.PUT_LINE(RPAD(keys(i), 30, '.') || ': ' || SYS_CONTEXT('USERENV', keys(i)));
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(RPAD(keys(i), 30, '.') || ': ' || '(n/a)');
END;
END LOOP;
DBMS_OUTPUT.PUT_LINE(RPAD('-', 80, '-'));
END;
/