Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Openrowset issue Expand / Collapse
Author
Message
Posted Saturday, August 4, 2012 9:37 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, July 29, 2014 7:22 PM
Points: 54, Visits: 350
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.
Post #1340234
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse