whenever sqlerror exit
whenever oserror exit
set term off
set term on
set verify off
set pagesize 0
set linesize 132
set feedback off
column SPID format 99999 trunc justify LEFT
column O_USER format A12 trunc
column U_USER format A12 trunc
column SERIAL# format 99999 trunc
column TERMINAL format A5 trunc
column PROGRAM format A60 trunc
column BACKGROUND format A1
select decode(nvl(p.background, 0), 0, ' ', 'B') background,
to_number(p.SPID) SPID,
'U:' || p.USERNAME u_user,
'O:' || lower(s.USERNAME) o_user,
p.TERMINAL,
upper(decode(nvl(s.command, 0),
0, '---------------',
1, 'Create Table',
2, 'Insert ...',
3, 'Select ...',
4, 'Create Cluster',
5, 'Alter Cluster',
6, 'Update ...',
7, 'Delete ...',
8, 'Drop ...',
9, 'Create Index',
10, 'Drop Index',
11, 'Alter Index',
12, 'Drop Table',
13, '--',
14, '--',
15, 'Alter Table',
16, '--',
17, 'Grant',
18, 'Revoke',
19, 'Create Synonym',
20, 'Drop Synonym',
21, 'Create View',
22, 'Drop View',
23, '--',
24, '--',
25, '--',
26, 'Lock Table',
27, 'No Operation',
28, 'Rename',
29, 'Comment',
30, 'Audit',
31, 'NoAudit',
32, 'Create Ext DB',
33, 'Drop Ext. DB',
34, 'Create Database',
35, 'Alter Database',
36, 'Create RBS',
37, 'Alter RBS',
38, 'Drop RBS',
39, 'Create Tablespace',
40, 'Alter Tablespace',
41, 'Drop tablespace',
42, 'Alter Session',
43, 'Alter User',
44, 'Commit',
45, 'Rollback',
46, 'Savepoint')) job,
s.program program
from v$process p,
v$session s
where p.addr=s.paddr (+)
and p.spid is not null
order by 1, program, p.username, s.username, spid;
[결과 - 윈도우 오라클]
948 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
1248 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
1884 U:SYSTEM O:sys JCLEE SELECT ... sqlplus.exe
1092 U:SYSTEM O: JCLEE ---------------
1404 U:SYSTEM O: JCLEE ---------------
B 740 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
B 808 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
B 820 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
B 940 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
B 1124 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
B 1524 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
B 1596 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
B 1684 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
whenever oserror exit
set term off
set term on
set verify off
set pagesize 0
set linesize 132
set feedback off
column SPID format 99999 trunc justify LEFT
column O_USER format A12 trunc
column U_USER format A12 trunc
column SERIAL# format 99999 trunc
column TERMINAL format A5 trunc
column PROGRAM format A60 trunc
column BACKGROUND format A1
select decode(nvl(p.background, 0), 0, ' ', 'B') background,
to_number(p.SPID) SPID,
'U:' || p.USERNAME u_user,
'O:' || lower(s.USERNAME) o_user,
p.TERMINAL,
upper(decode(nvl(s.command, 0),
0, '---------------',
1, 'Create Table',
2, 'Insert ...',
3, 'Select ...',
4, 'Create Cluster',
5, 'Alter Cluster',
6, 'Update ...',
7, 'Delete ...',
8, 'Drop ...',
9, 'Create Index',
10, 'Drop Index',
11, 'Alter Index',
12, 'Drop Table',
13, '--',
14, '--',
15, 'Alter Table',
16, '--',
17, 'Grant',
18, 'Revoke',
19, 'Create Synonym',
20, 'Drop Synonym',
21, 'Create View',
22, 'Drop View',
23, '--',
24, '--',
25, '--',
26, 'Lock Table',
27, 'No Operation',
28, 'Rename',
29, 'Comment',
30, 'Audit',
31, 'NoAudit',
32, 'Create Ext DB',
33, 'Drop Ext. DB',
34, 'Create Database',
35, 'Alter Database',
36, 'Create RBS',
37, 'Alter RBS',
38, 'Drop RBS',
39, 'Create Tablespace',
40, 'Alter Tablespace',
41, 'Drop tablespace',
42, 'Alter Session',
43, 'Alter User',
44, 'Commit',
45, 'Rollback',
46, 'Savepoint')) job,
s.program program
from v$process p,
v$session s
where p.addr=s.paddr (+)
and p.spid is not null
order by 1, program, p.username, s.username, spid;
[결과 - 윈도우 오라클]
948 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
1248 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
1884 U:SYSTEM O:sys JCLEE SELECT ... sqlplus.exe
1092 U:SYSTEM O: JCLEE ---------------
1404 U:SYSTEM O: JCLEE ---------------
B 740 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
B 808 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
B 820 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
B 940 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
B 1124 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
B 1524 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
B 1596 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
B 1684 U:SYSTEM O: JCLEE --------------- ORACLE.EXE
오라클자바커뮤니티에서 운영, 개발자 전문교육, 개인80%환급 오엔제이프로그래밍실무교육센터(www.onjprogramming.co.kr)
평일주간(9:30~18:30) 개강
(4/07)[기업100%환급]SQL기초에서 Schema Object까지
(4/07)[기업100%환급]자바기초에서 JDBC, Servlet/JSP까지
(4/14)C#4.0,ADO.NET,Network 프로그래밍
(4/14)[기업100%환급]Spring ,MyBatis,Hibernate실무과정
(4/14)[기업100%환급]PL/SQL,ORACLE HINT,TUNING
평일야간(19:00~22:00) 개강
(4/04)웹퍼블리싱 마스터
(4/04)자바기초에서JSP,Ajax,jQuery,Spring3.2,MyBatis까지
(4/04)C#,ASP.NET마스터
(4/07)SQL초보에서실전전문가까지
(4/08)Spring3.X, MyBatis, Hibernate실무과정
(4/22)안드로이드개발자과정
주말(10:00~18:00) 개강
(4/05)웹퍼블리싱 마스터
(4/05)닷넷실무자를위한WPF개발자과정
(4/05)Spring3.X, MyBatis, Hibernate실무과정
(4/05)SQL초보에서실전전문가까지
(4/12)C#,ASP.NET마스터
(4/12)안드로이드개발자과정
(4/12)JAVA기초에서실무까지
댓글 없음:
댓글 쓰기