Archive for July, 2015

INSERT EXEC cannot be nested

July 17, 2015

Error: An INSERT EXEC statement cannot be nested

solution: rewrite as an openquery

select * from OPENQUERY([LOCALSERVERNAME],’EXEC dbase.schema.proc’)

Error: SQL Server not configured for data access

solution: enable data access

EXEC sp_serveroption ‘LOCALSERVERNAME’, ‘DATA ACCESS’, TRUE

Error: The OLE DB provider “SQLNCLI10” for linked server “LOCALSERVERNAME” indicates that either the object has no columns or the current user does not have permissions on that object.

solution: Add SET FMTONLY OFF;SET NOCOUNT ON

select * from OPENQUERY([LOCALSERVERNAME],’SET FMTONLY OFF;SET NOCOUNT ON;EXEC dbase.schema.proc’)

Advertisements