1

What is the syntax and steps involved to access a linked DB via a procedure?

I need to return the columns below from a table INVEST (resident on a Linked DB) using ROWID as input parameter.

The columns are

AMOUNT, TRANSACTION_ID

The query I currently develop throws the following error:

OLE DB provider "SQLNCLI11" for linked server "XXXX" returned message "Deferred prepare could not be completed

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
kolmanuel
  • 21
  • 5
  • 1
    You mean `linked server`? – Hackerman Jul 19 '17 at 16:48
  • possible duplicate of: https://stackoverflow.com/questions/15158017/deferred-prepare-could-not-be-completed-error-when-using-local-database-as-lin – Eli Jul 19 '17 at 21:27
  • Possible duplicate of ["Deferred prepare could not be completed" error when using local database as linked server](https://stackoverflow.com/questions/15158017/deferred-prepare-could-not-be-completed-error-when-using-local-database-as-lin) – Eli Jul 19 '17 at 21:28
  • Yes please... Can you please give a detail of how the procedure is gonna look like for the scenario i created. I work on SqlDB 'A', on which I have SqlDB 'B' as a Linked Server. I want to create a Procedure on SqlDB A, to get data from Linked server DB 'B'. The columns on the table 'TAccoutn' on SqlDB 'B' which I want to retrieve are TAmount and TSeq, getting data by TAccount_ID. The Procedure is expected to return Output TAmount and TSeq. BR, – kolmanuel Jul 20 '17 at 12:42
  • Please find below my current query – kolmanuel Jul 20 '17 at 13:14

0 Answers0