Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Any SQL gurus out there?
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Re: Any SQL gurus out there?
Not applicable
Any SQL gurus out there?
24-10-2014 12:42 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I was wondering if there was anyway you can determine if a given procedure is running on a SQL Server Instance? (In this case SQL Server 2014 Enterprise Edition)
For example I have Procedure XXX that can take anything up to N minutes to complete. However when this procedure is running I do not want any other users to be able to execute it. I know I could set a flag in a table to say that this procedure is running, but this approach falls down in the event of a system failure.
In an ideal world it would be a real time way of knowing if the procedure was running. Maybe this can be done using the system catalogues I don't know, which is why I am asking those that might.
For example I have Procedure XXX that can take anything up to N minutes to complete. However when this procedure is running I do not want any other users to be able to execute it. I know I could set a flag in a table to say that this procedure is running, but this approach falls down in the event of a system failure.
In an ideal world it would be a real time way of knowing if the procedure was running. Maybe this can be done using the system catalogues I don't know, which is why I am asking those that might.
2 REPLIES 2
Re: Any SQL gurus out there?
24-10-2014 2:27 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Does this help? http://stackoverflow.com/questions/21582244/find-out-if-the-stored-procedure-is-already-running
jelv (a.k.a Spoon Whittler) Why I have left Plusnet (warning: long post!) Broadband: Andrews & Arnold Home::1 (FTTC 80/20) Line rental: Pulse 8 Home Line Rental (£14.40/month) Mobile: iD mobile (£4/month) |
Not applicable
Re: Any SQL gurus out there?
24-10-2014 2:45 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
It certainly does and a lot more elegant than other options I found, thank you for that, very much appreciated.
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Re: Any SQL gurus out there?