• Hi Craig,

    Thanks for your reply. I will not be using this mechanism often. also i am informed to use non linked server that's why i started to do the research. Finally i tried with open Rowset and i am able to acheive with concern. My concern is , i tried in my local database and for just returning 4 rows it took 00:00:01 by means 1 second which is bad. because my table has only 4 rows. so to return 4 rows it should not take 1 second. any suggestion please

    My code:

    declare @sql nvarchar(max)

    select @sql = 'select a.* from openrowset(''MSDASQL'', ''Driver={SQL SERVER}; Server=testserver;UID=sa; PWD=loginpwd;'', ''select * from [sample].dbo.Company'') as a'

    exec sp_executeSQL @sql