-- To use OPENQUERY on local server, do: exec sp_serveroption [VALHALLA-MDD06H] , 'data access', 'true' SELECT * INTO #W FROM OPENQUERY([VALHALLA-MDD06H], 'exec sp_who') SELECT * FROM #W