Home » RDBMS Server » Server Administration » View to check user connections (Oracle 11.2.0.3.0 , Linux 6)
View to check user connections [message #618022] Sun, 06 July 2014 23:40 Go to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Hi,

When we are ask to check how many user connections have establish currently,what view should we use to check from the following queries ?
1.select count(*) from v$session where status in ('ACTIVE','INACTIVE')

2.SELECT username,
       extended_timestamp,
       owner,
       obj_name,
       action_name
FROM   dba_audit_trail
WHERE  owner = 'AUDIT_TEST'
ORDER BY timestamp;


Regards,
Database admin

[Updated on: Sun, 06 July 2014 23:41]

Report message to a moderator

Re: View to check user connections [message #618023 is a reply to message #618022] Sun, 06 July 2014 23:46 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Is application 3-tier as below?

EndUser<=>browser<=>Webserver<=>ApplicationServer<=>DatabaseServer
Re: View to check user connections [message #618031 is a reply to message #618022] Mon, 07 July 2014 00:16 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Database Reference
Check the 2 views you mentioned and tell us which one is to be used.

Re: View to check user connections [message #618036 is a reply to message #618031] Mon, 07 July 2014 01:01 Go to previous messageGo to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Hi Blackswan/Michel,

When i reread my question i found it to be wrong.Let me correct it.

When we are ask to check how many user connections have establish currently,what view should we use to check. is that v$session or dba_audit_trail view ?

Quote:
Is application 3-tier as below?

EndUser<=>browser<=>Webserver<=>ApplicationServer<=>DatabaseServer

Yes
Re: View to check user connections [message #618038 is a reply to message #618036] Mon, 07 July 2014 01:27 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

My answer does not change. Which view gives the current connections? Check the documentation.

Re: View to check user connections [message #618045 is a reply to message #618038] Mon, 07 July 2014 04:30 Go to previous messageGo to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Michel,

If this is the running query then join v$session and v$sql.

By default in 11.2, if you didn't deactivate it, connections are audited, so query dba_audit_session.

Regards,
Srinivas
Re: View to check user connections [message #618046 is a reply to message #618045] Mon, 07 July 2014 04:52 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Audit have both past and current connections, if you want only current ones then query v$session (you don't need v$sql to get just the connection information).

Re: View to check user connections [message #618047 is a reply to message #618046] Mon, 07 July 2014 04:55 Go to previous messageGo to next message
Roachcoach
Messages: 1576
Registered: May 2010
Location: UK
Senior Member
First thing you should clarify is EXACTLY what the person asking the question wants to know because with a structure like the one balckswan described they could be asking at any level of the stack.
Re: View to check user connections [message #618049 is a reply to message #618047] Mon, 07 July 2014 05:03 Go to previous message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Quote:
Audit have both past and current connections, if you want only current ones then query v$session (you don't need v$sql to get just the connection information).

Michel information was useful to me. Thanks Michel

[Updated on: Mon, 07 July 2014 05:04]

Report message to a moderator

Previous Topic: How do you rename User name and switch user to a new tablespace?
Next Topic: Transportable tablespace
Goto Forum:
  


Current Time: Thu Mar 28 12:19:56 CDT 2024