Wednesday, 1 June 2011

OpenQuery to execute query on other linked server


use the following OpenQuery to execute query on other linked server:

select * FROM
OPENQUERY([LEB-ODSREP01],'SET FMTONLY OFF EXECUTE DEUView.dbo.SP_SPACEUSED [CDR201105]')

without using SET FMTONLY OFF, it will give following error:
The OLE DB provider "SQLNCLI10" for linked server "LEB-ODSREP01" supplied inconsistent metadata for a column. The name was changed at execution time.

1 comment:

  1. Bump.

    I'm receiving the same error when using OPENROWSET.

    ReplyDelete