Showing posts with label modify. Show all posts
Showing posts with label modify. Show all posts

Friday, March 23, 2012

How to determine if a SP is running?

I need to to modify a stored procedure so that it can
determine if it is already running. I could create a
table to add/opdate a status record, but I would prefer
to read a system table looking for the proc running on
a connection if possible.
If anyone has done something like this, I would really
like to hear about it.
tia,
BillYou can't do that directly, but you can use an application lock inside your
stored procedure. See sp_getapplock in Books Online for the details.
Jacco Schalkwijk
SQL Server MVP
<bill_sheets@.hotmail.com> wrote in message
news:1107442939.517642.53580@.g14g2000cwa.googlegroups.com...
>I need to to modify a stored procedure so that it can
> determine if it is already running. I could create a
> table to add/opdate a status record, but I would prefer
> to read a system table looking for the proc running on
> a connection if possible.
> If anyone has done something like this, I would really
> like to hear about it.
> tia,
> Bill
>

Wednesday, March 7, 2012

how to delete push subscription

Hi All:
i did disable publishing and distribution , but still leave a push
subscription in DB , how can i delete it , otherwise i can not modify the
Database which is doing push subscription.
Cheers
nick
Nick,
try using sp_removedbreplication.
Rgds,
Paul Ibison
"Nick" <fsheng@.ebreathe.co.nz> wrote in message
news:Og7BO7wCFHA.3728@.TK2MSFTNGP14.phx.gbl...
> Hi All:
> i did disable publishing and distribution , but still leave a push
> subscription in DB , how can i delete it , otherwise i can not modify the
> Database which is doing push subscription.
>
> Cheers
> nick
>
|||Thanks Paul
it works.
Cheers
nick
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:u7L9TRxCFHA.2072@.TK2MSFTNGP10.phx.gbl...[vbcol=seagreen]
> Nick,
> try using sp_removedbreplication.
> Rgds,
> Paul Ibison
> "Nick" <fsheng@.ebreathe.co.nz> wrote in message
> news:Og7BO7wCFHA.3728@.TK2MSFTNGP14.phx.gbl...
the
>