Openrowset issue

  • Hello,

    I'm trying to fetch table data from Server B to a temp table in Server A. I didn't get entire data when I ran query below.

    select * into temptbl from openrowset('SQLOLEDB','Data Source=Server B; Initial Catalog=DB;trusted_connection=yes;','select * from dbo.SrcTable')

    To figure out where it is going wrong, I did count query to see how many rows it is fetching

    when I run the below query from my local machine(client) I get less number of rows(count). when I run the same query directly on src machine it gives me exact count. Can someone tell me why and where am I losing data.

    select count(*) from openrowset('SQLOLEDB','Data Source=Server B; Initial Catalog=DB;trusted_connection=yes;','select count(*) from dbo.SrcTable')

    Note: I cannot use linked server.

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply