SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 Could not complete cursor operation
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

shobhaaradhya
Starting Member

37 Posts

Posted - 05/21/2013 :  04:36:09  Show Profile  Reply with Quote
Hi,

I am running a job on my published database. The job executes few lines of code which selects records from a table writes into a txt file. Am using cursor to traverse the record set. At some point the job is stopping (failing) with the message

"Could not complete cursor operation because the table schema changed after the cursor was declared"

Any idea about the issue.

Thanks in advance,
Shobha

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 05/21/2013 :  05:03:54  Show Profile  Reply with Quote
the error message is obvious. Are you doing any DDL operations inside your cursor?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

lrosales@shimee.com
Starting Member

3 Posts

Posted - 05/31/2013 :  13:33:16  Show Profile  Visit lrosales@shimee.com's Homepage  Reply with Quote
firs what version of SQL Server I you using?
Go to Top of Page

RickCox
Starting Member

United Kingdom
1 Posts

Posted - 08/22/2013 :  08:48:43  Show Profile  Reply with Quote
quote:
Originally posted by shobhaaradhya

Hi,

I am running a job on my published database. The job executes few lines of code which selects records from a table writes into a txt file. Am using cursor to traverse the record set. At some point the job is stopping (failing) with the message

"Could not complete cursor operation because the table schema changed after the cursor was declared"

Any idea about the issue.

Thanks in advance,
Shobha



Bulk insertion of data using package from one database to other , sometimes gives this kind of error. If any query is going to alter the Table that you should use trigger.

business phone providers

Edited by - RickCox on 08/22/2013 08:49:54
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000