Home » SQL & PL/SQL » SQL & PL/SQL » View my own queries (10g, RHEL 7)
View my own queries [message #675487] Tue, 02 April 2019 06:00 Go to next message
preet_kumar
Messages: 204
Registered: March 2007
Senior Member
There is a user account assigned to user without System/DBA privileges and the user runs multiple queries on his schema.
How can this user list all his active queries ?



Re: View my own queries [message #675488 is a reply to message #675487] Tue, 02 April 2019 06:12 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
All his active queries?
Only one query can be active at a given time for a given session.
Re: View my own queries [message #675490 is a reply to message #675488] Tue, 02 April 2019 06:16 Go to previous messageGo to next message
preet_kumar
Messages: 204
Registered: March 2007
Senior Member
The user account is used by application so the application can open different sessions.

Only want to list all running queries for this user.
Re: View my own queries [message #675491 is a reply to message #675490] Tue, 02 April 2019 06:33 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Query v$session joined to v$sql on sql_id.
restrict v$session to user in question.
Re: View my own queries [message #675493 is a reply to message #675490] Tue, 02 April 2019 06:56 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
preet_kumar wrote on Tue, 02 April 2019 04:16
The user account is used by application so the application can open different sessions.

Only want to list all running queries for this user.

Oracle considers SQL statements to be a shared resource.
There is no "owner" associated with any SQL statement.
Re: View my own queries [message #675494 is a reply to message #675493] Tue, 02 April 2019 07:25 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
BlackSwan wrote on Tue, 02 April 2019 12:56
preet_kumar wrote on Tue, 02 April 2019 04:16
The user account is used by application so the application can open different sessions.

Only want to list all running queries for this user.

Oracle considers SQL statements to be a shared resource.
There is no "owner" associated with any SQL statement.
So?

You seem to have missed the point again.
Re: View my own queries [message #675585 is a reply to message #675494] Mon, 08 April 2019 02:25 Go to previous message
Roachcoach
Messages: 1576
Registered: May 2010
Location: UK
Senior Member
You need to find out why people are asking you this, what their expectations are and what they are going to do with the data once supplied. It is highly likely they are not asking you the correct question for their needs.

Additionally the first and frankly only real source of truth in what the application is running is the developers, this question should start there.
Previous Topic: Import/Entry from txt file
Next Topic: Import XML file into XMLType Column
Goto Forum:
  


Current Time: Thu Mar 28 07:05:37 CDT 2024