Forum Discussion
rmerritt
Oct 26, 2024Tin Contributor
Stored Proc is running , is there anyway to see what database it is working on
Stored Proc is running , is there anyway to see what database it is working on?
the script is Ola Helgren's IndexOptimization on all user databases. I tried using sql profiler but nothing usefull came of it.
2 Replies
- Mike_LemayTin Contributor
If it is optimizing indexes you can usually catch them running in the "Active Expensive Queries" pane in the Activity Monitor on SSMS. Each query being run to optimize will usually show up there.
- olafhelperBronze ContributorNo, you can only see the name of the procedure, but not which line of is currently running, nor the cross-database access.
You have to implement a logging in your code.