The login user is sysadmin and db_owner for database Test
I run this statement in SQL Server Management Studio connected to SERVER\INSTANCE (SQL Server 2008 R2 10.50.4000)
select * from openrowset('SQLOLEDB','SERVER\INSTANCE';'user';'pass', 'SET NOCOUNT ON;SET FMTONLY OFF;exec Test.dbo.uspA')
and I get this error
Cannot process the object "SET NOCOUNT ON;SET FMTONLY OFF;exec Test.dbo.uspA". The OLE DB provider "SQLNCLI10" for linked server "(null)" indicates that either the object has no columns or the current user does not have permissions on that object.
If I run exec Test.dbo.uspA it worksI have another similar stored procedure uspB. For this one the statement
select * from openrowset('SQLOLEDB','SERVER\INSTANCE';'user';'pass', 'SET NOCOUNT ON;SET FMTONLY OFF;exec Test.dbo.uspB') works
Help please!