SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use SPSiteDataQuery to query from one SP farm to another. Both farms exist on the same active directory. What would be the most suitable approach? A custom web service might do it? An ideas will be appreciated

share|improve this question
up vote 2 down vote accepted

I would suggest creating a web service, and querying the web service from the other farm. I don't think you'll be able to use the SPSiteDataQuery object itself across the farm boundary.

share|improve this answer
That's correct. Because it's a different farm you have to use Web Services (either out of the box or custom) to query the data. – Waldek Mastykarz - MVP Dec 13 '10 at 16:02
I followed this at first: This looks a pretty good intro:… And this seems pretty thorough too:… – Andy Burns Dec 14 '10 at 11:11

If you want to query across farms, the best way I think is Search. If you efficiently use keyword and full text queries, you can fine tune your search results similar to SPSiteDataQuery (or even better) across many farms without compromising on performance

Taking the step forward, If you have the powerful FAST search you can find almost anything!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.