• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 471
  • Last Modified:

Statement(s) could not be prepared on link server

declare testcursor cursor for
SELECT namelink
FROM linkserver.database.dbo.tablename



error
Statement(s) could not be prepared.
0
PradeepYadhav
Asked:
PradeepYadhav
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you cannot use cursor for select on linked server.
you have to copy the relevant rows locally, and put the cursor on that local (temp) table.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now