Is there a way to check if an event is running?

asked 25 Jan '11, 14:49

Jon%20Greisz's gravatar image

Jon Greisz
571979
accept rate: 0%

Sorry not enough detail. We need to check to see if another event is running when an event is kicked off and stop the new event. They are not the same event. It looks like there is a parameter within the same event to do this, but how about another event?

(25 Jan '11, 14:51) Jon Greisz

If you are using 10.0.1 or later, you could use the following to check if a particular event is currently running:

if exists( select * from sa_conn_list(null,db_id()) 
    where connection_property('EventName', Number) = '<event_name>') then
    // event is running
end if;
permanent link

answered 25 Jan '11, 17:49

Bruce%20Hay's gravatar image

Bruce Hay
2.6k1510
accept rate: 48%

You can use sa_conn_info() to check for current connections.

Connections for events (like other internal connections) have high numbers (above 1 billion) and are named after the event.

So you might check that from within your event.

permanent link

answered 25 Jan '11, 15:16

Volker%20Barth's gravatar image

Volker Barth
30.8k308456665
accept rate: 32%

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:

×35

question asked: 25 Jan '11, 14:49

question was seen: 1,308 times

last updated: 25 Jan '11, 17:49