GET AROUND MAXIMIN PREFIX FOR RPC OUT ON LINKED SERVER
DECLARE @name sysname,
@sql nvarchar(MAX)
SELECT @sql =
'DECLARE cur CURSOR STATIC LOCAL FOR
SELECT TOP (5) CompanyName FROM dbo.Customers
ORDER BY CustomerID'
EXEC sp_executesql @sql
OPEN cur