I'm using the Microsoft Management Data Warehouse solution on all of my SQL Server 2008 r2 servers. The Server Activity data collection (collection_set_2_noncached_collect_and_upload) set takes 7 seconds to process on one server (good), and 11 minutes to process on another server (bad). Why is the one server taking so long? Step 3 of the SQLAgent job is the one that is taking too much time. I need to run this collector every 5 minutes, which is impossible due to the total time lag.
Collection set 3 takes about a minute on the bad server, vs 7 seconds on the good server as well. Granted, the connection is over a WAN to another datacenter, but a windows file share copy of an 11mb backup file took about 3 seconds, so I don't think it is network speed.
When I go through SSMS - Server - Management - Data Collection - System Data Collection Sets - Server Activity - Properties, and copy the Input parameters, I can run each statement by itself, and each one returns in less than a second.
My server is Windows 2008R2 enterprise, running on a cluster, with an @@version of
Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64) Jun 17 2011 00:54:03 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)