question

helingsong-5963 avatar image
0 Votes"
helingsong-5963 asked Cathyji-msft commented

On sqlserver 2019 server,How do I write sql statement to query all operations on the server with the following fields?

On sqlserver 2019 server,How do I write sql statement to query all operations on the server with the following fields?101214-qzdiwj8bvsc2ki49lebl.png


sql-server-generalsql-server-transact-sql
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @helingsong-5963,

We have not received a response from you. Did the reply(s) could help you? If the response helped, do "Accept Answer". If it is not, please let us know. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

0 Votes 0 ·
Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered Cathyji-msft edited

Hi @helingsong-5963,

How do I write sql statement to query all operations on the server with the following fields?

SQL server statement query could not meet your requirement. But you can using ApexSQL Log( a well known third party tool) to achieve this goal. Below is using ApexSQL tool read the SQL server transaction log in my environment.

101205-picture2.jpg

You can download this tool from this link.

Below screenshot is also a Example for this tool.

101130-screenshot-2021-06-01-101748.jpg


If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OlafHelper-2800 avatar image
0 Votes"
OlafHelper-2800 answered

If you mean all currently running operation, they can be queried with

 select pro.cmd, pro.*
 from sys.sysprocesses as pro
 where pro.status = 'runnable'
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.