Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to close a cursor?

Status
Not open for further replies.

MAK9974

IS-IT--Management
Apr 11, 2002
145
US
Hi guys.

is there anyway I can find a cursor that is open
so that i can close it?

I have a procedure running daily (across servers). that stopped suddenly with this error.

A cursor with the name 'xyz' already exists.

I tried closing and deallocating on destination server. I am getting the error like "cursor doesnot exist"

I need to run this procedure. i dont want to recycle the destination server.

any ideas?
-MAK
 
The cursor should be listed on the server you are running it on or the server you created it on.

you can find it using (select * from syscursors)
 
Nope.
I tried all these

select * from syscursors
select * from syscursortables
select * from syscursorrefs
select * from syscursorcolumns

no rows.

but when executing the proc i am getting same
cursor exist error.

 
Hi,

Can u put the SP code, so that we can have a look at it.

Sunil
 
its actually sp created by replication.

All i can see is this error. and its in production
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top