Anyone knows how to see the lastActivity of each connection?

asked 16 Nov '15, 11:38

pLee's gravatar image

pLee
214111220
accept rate: 0%


If by "last Activity" you mean what did each connection do, when did it do it, then the easy answer is to use

select connection_property( 'LastReqTime', connid ),
       connection_property( 'LastStatement', connid )

to get this information about connection connid

See this documentation page for a full list of information about each connection that can be obtained by using connection_property() or connection_extended_property()

You can also get the connection activity information by using the sa_conn_activity() procedure.

FWIW: You can get the full list of properties for a connection (or all connections) by using the sa_conn_properties() procedure.

HTH

permanent link

answered 16 Nov '15, 11:48

Mark%20Culp's gravatar image

Mark Culp
24.9k10139297
accept rate: 41%

edited 16 Nov '15, 14:37

Exactly how is connection_extended_property called without the second argument but with the third argument?

AFAIK in this context connection_property is the function of choice.

(16 Nov '15, 14:35) Breck Carter
Replies hidden

One doesn't try to omit a parameter ;-). I corrected my answer to use connection_property()

(16 Nov '15, 14:40) Mark Culp
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×11

question asked: 16 Nov '15, 11:38

question was seen: 1,730 times

last updated: 17 Nov '15, 08:10