Dragos
Dragos

Reputation: 2981

Currently running stored procedures

Is there a way I can determine from Java which stored procedures are currently running on a database?

The answer can involve using Hibernate, although it is not necessary.

My database engine is SQL Server.

Upvotes: 0

Views: 74

Answers (1)

peter.petrov
peter.petrov

Reputation: 39437

Yes, you can connect to your SQL Server from Java and run an SQL query against it.

See this for example.

http://blog.sqlauthority.com/2009/01/07/sql-server-find-currently-running-query-t-sql/

Then you can take the results returned and process them as you like in your Java code.

Upvotes: 1

Related Questions