SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Queries currently running on Oracle server???


Queries currently running on Oracle server???

Author
Message
sandyinfowave
sandyinfowave
SSC-Enthusiastic
SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)

Group: General Forum Members
Points: 110 Visits: 1092
Just like SQL Profiler in MSSQL server is there any tool in Oracle to figure out what queries are currently running on the server. Can we do that using TOAD??
weitzera
weitzera
Ten Centuries
Ten Centuries (1,000 reputation)Ten Centuries (1,000 reputation)Ten Centuries (1,000 reputation)Ten Centuries (1,000 reputation)Ten Centuries (1,000 reputation)Ten Centuries (1,000 reputation)Ten Centuries (1,000 reputation)Ten Centuries (1,000 reputation)

Group: General Forum Members
Points: 1000 Visits: 629
In SQL Developer, there are a couple of options in the tools menu.

Monitor Sessions shows the results of the following query:


with vs as (select rownum rnum,
sid,
serial#,
status,
username,
last_call_et,
command,
machine,
osuser,
module,
action,
resource_consumer_group,
client_info,
client_identifier,
type,
terminal
from v$session)
select vs.sid ,serial# serial,
vs.username "Username",
case when vs.status = 'ACTIVE'
then last_call_et
else null end "Seconds in Wait",
decode(vs.command,
0,null,
1,'CRE TAB',
2,'INSERT',
3,'SELECT',
4,'CRE CLUSTER',
5,'ALT CLUSTER',
6,'UPDATE',
7,'DELETE',
8,'DRP CLUSTER',
9,'CRE INDEX',
10,'DROP INDEX',
11,'ALT INDEX',
12,'DROP TABLE',
13,'CRE SEQ',
14,'ALT SEQ',
15,'ALT TABLE',
16,'DROP SEQ',
17,'GRANT',
18,'REVOKE',
19,'CRE SYN',
20,'DROP SYN',
21,'CRE VIEW',
22,'DROP VIEW',
23,'VAL INDEX',
24,'CRE PROC',
25,'ALT PROC',
26,'LOCK TABLE',
28,'RENAME',
29,'COMMENT',
30,'AUDIT',
31,'NOAUDIT',
32,'CRE DBLINK',
33,'DROP DBLINK',
34,'CRE DB',
35,'ALTER DB',
36,'CRE RBS',
37,'ALT RBS',
38,'DROP RBS',
39,'CRE TBLSPC',
40,'ALT TBLSPC',
41,'DROP TBLSPC',
42,'ALT SESSION',
43,'ALT USER',
44,'COMMIT',
45,'ROLLBACK',
46,'SAVEPOINT',
47,'PL/SQL EXEC',
48,'SET XACTN',
49,'SWITCH LOG',
50,'EXPLAIN',
51,'CRE USER',
52,'CRE ROLE',
53,'DROP USER',
54,'DROP ROLE',
55,'SET ROLE',
56,'CRE SCHEMA',
57,'CRE CTLFILE',
58,'ALTER TRACING',
59,'CRE TRIGGER',
60,'ALT TRIGGER',
61,'DRP TRIGGER',
62,'ANALYZE TAB',
63,'ANALYZE IX',
64,'ANALYZE CLUS',
65,'CRE PROFILE',
66,'DRP PROFILE',
67,'ALT PROFILE',
68,'DRP PROC',
69,'DRP PROC',
70,'ALT RESOURCE',
71,'CRE SNPLOG',
72,'ALT SNPLOG',
73,'DROP SNPLOG',
74,'CREATE SNAP',
75,'ALT SNAP',
76,'DROP SNAP',
79,'ALTER ROLE',
79,'ALTER ROLE',
85,'TRUNC TAB',
86,'TRUNC CLUST',
88,'ALT VIEW',
91,'CRE FUNC',
92,'ALT FUNC',
93,'DROP FUNC',
94,'CRE PKG',
95,'ALT PKG',
96,'DROP PKG',
97,'CRE PKG BODY',
98,'ALT PKG BODY',
99,'DRP PKG BODY',
to_char(vs.command)) "Command",
vs.machine "Machine",
vs.osuser "OS User",
lower(vs.status) "Status",
vs.module "Module",
vs.action "Action",
vs.resource_consumer_group,
vs.client_info,
vs.client_identifier
from vs
where vs.USERNAME is not null
and nvl(vs.osuser,'x') <> 'SYSTEM'
and vs.type <> 'BACKGROUND'
order by 1





Dan Guzman - Not the MVP (7/22/2010)
All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

sajavateventplanner
sajavateventplanner
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 3
hi guys you can find bvy this query running query status..


select sesion.sid,
sql_text
from v$sqltext sqltext, v$session sesion
where sesion.sql_hash_value = sqltext.hash_value
and sesion.sql_address = sqltext.address
and sesion.username is not null
order by sqltext.piece;


try it and see the result.

http://www.sajawatevents.com/
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search