Wednesday, March 23, 2011
Difference between Update and Refresh for DPs
1) Update distribution points increments the package version, goes to the source location, constructs new package content but only sends the delta between what is already present on the DP and what is currently in the new package source. Also this action is package specific and once you trigger this action all the DPs to which the package has been distributed will get the new version.
this option best when all DP’s are in local
2) Refresh distribution points does not increment the package version but simply sends out the current version of the package content again to a specific DP. So this is action is specific to a package-DP association and should be used when the content on any particular DP appears corrupted.
Impact of enabling BDR:
1) For Update Distribution Points: Consider the scenario where one (or potentially several) files in the package source has been updated/modified. Enabling BDR would trigger distribution manager to do a diff between the current version of the file and the new version of the file and only send the delta changes within the file. On the receiving side we will then perform a BDR merge for that delta. So in the BDR case we may end up sending lesser data than in the scenario where BDR is not enabled on the package.
2) For Refresh Distribution Points: BDR setting has no affect - we simply send the entire current version of the package.
Tuesday, March 22, 2011
Configuring SCCM and Branch Cache
Configuring SCCM and Branch Cache
Branch cache is a feature introduced with Windows 2008 R2 that allows systems within the same subnet and separated from a content source (such as a WSUS server) to share downloaded content locally rather than each system having to traverse a latent network link back to the content source. Branch cache has two modes of operation – distributed cache mode and hosted cache mode. SCCM only supports distributed cache mode.
As mentioned, branch cache is a function of the OS and not of SCCM but, with the release of SCCM SP2, we now are able to leverage branch cache on enabled servers. When we find branch cache enabled we use it – there is no special SCCM configuration requirements for branch cache other than what is likely in se in most environments anyway. We will highlight those shortly but to start a diagram of a sample configuration might help explain how this is all setup.
In the diagram we have 4 systems. The SCCM SP2 site server, an SCCM distribution point being hosted on a Windows 2008 R2 server that has branch cache enabled and two client systems – one server and one workstation. We have mentioned already that to support branch cache we need to use a Windows 2008 R2 system – but what about clients? From the diagram note that branch cache is supported natively on Windows 2008 R2 and Windows 7 – and with the addition of BITS 4.0 clients can also take advantage of branch cache on Vista SP1 and Windows 2008 SP1/SP2.
The diagram shows how SCCM works with branch cache. The first time content is requested from the distribution point the client has no choice but to retrieve it across the latent network. Once retrieved the content is stored by branch cache. When the second client attempts to retrieve the content it detects a latent network and sends out a request for any peers with the content. The first client responds and serves up the content thus avoiding the need to pull it across from the distribution point.
OK, so we have the general concept of how it works – so how do we set it up? It’s fairly easy. First, what are the requirements in SCCM to make use of branch cache. We need our distribution point to be installed on Windows 2008 R2 and to be BITS enabled.
The only other requirement is that your advertisement be set to download and execute locally.
Both of these settings are common in most environments and are all that is required on the SCCM side. There is no selection in SCCM to ‘enable’ branch cache – with the settings above it just happens.
So how do we configure branch cache on the OS side? Just a few settings to configure. First we need to enable branch cache – let’s start with the distribution point. In Server Manager, select features and add the branch cache feature. There is no configuration here – the feature is either on or off. Once installed you will see it in the feature list.
Next, we have to configure branch cache on our clients. This can be done through local policy on each system or – much easier – through domain policy. On my domain controller I open the group policy management console. In my lab I created an OU for just the systems I want to enable for branch cache and I created a GPO to enable branch cache.
Editing the properties of the GPO we have two places to configure. First, is branch cache policy. Here we enable branch cache, set distributed cache mode, define the speed that we consider to be a latent network (default 80 ms) and configure the percentage of disk space to allocate to branch cache activity.
Note that the one option we did not configure was to enable hosted cache mode. Why? Remember, SCCM only supports distributed cache mode so, for SCCM, there is no need to enabled hosted cache mode.
A word about hosted cache mode. The OS documentation that discusses branch cache discusses both modes of operation and discuses steos to configure SMB file transfers through branch cache. To me, the documentation is a bit fuzz. From what I can tell, configuring branch cache to support SMB requires some additional configuration on the content server – such as enabling a role service called ‘branch cache for network files’ and configuring specific shares to support branch cache using the ‘share and storage management tool’. Since SCCM uses branch cache via BITS there is no need to do this additional configuration to support SMB.
In addition to the above we must configure the windows firewall to allow branch cache specific communication as follows:
Both the inbound and outbound firewall rules are accessible on the predefined list – so configuring them is as easy as selecting from the drop down menu when configuring a new rule.
OK, so all of this is configured – how do we know if it’s working? To test, I setup a package and advertisement. When testing it’s important to understand that once the package is downloaded and cached, you have to either modify the content or setup a new package because unless there is a change, clients will always pull the content from the cache after the first download due to the latent network conditions.
For the test, I start with a fresh package. The client that will download the content first will have to go to the distribution point – nothing will come from the cache since no content has yet been downloaded.
With all of this I’m ready to start the download but to simulate a latent network in my lab I must first start a tool that will ‘inject’ latency into the network connection between the distribution point and my first client. I’ll use a tool we have internally to introduce a 30 ms latency – I will maintain this latency throughout my testing. Note that my policy settings above consider any network more latent than 20 ms to be slow.
With all of this configured, I start my advertisement which initiates a download of content.
At the end of the download I run the advertisement and then move on to my second machine. This second machine is where we expect to see branch cache in action.
I prepare to run the same advertisement on the second machine – note you can tell that this advertisement has never been run before on my system – which is important when testing branch cache.
I’m about to hit run but how can I tell whether branch cache actually fires up? Performance monitor. With performance monitor you can determine whether content is being transferred from the local branch cache or from a branch cache partner vs. the network. The chart below shows a chart of perfmon counters that you get from the branch cache object. The two most interesting are the Bytes from cache and Bytes from server. If content is being retrieved from either a systems local branch cache or a peer systems branch cache, that counter will show activity. In our test case and on the second system, no content for this advertisement has ever been downloaded before so we expect content to be retrieved from our peer client that is branch cache enabled.
We initiate the advertisement as before and downloading begins.
We allow the download to finish, complete the advertisement and then look back at our performance counter numbers to see what happened.
By looking at our counters we can see that we did pull the content from our peer caching partner – so branch cache worked.
Another way we can tell that our package came over from branch cache is by looking in the event log on the system as show below. Look for event 60 and on the detail tab look for the peerProtocolFlags value. If it is set to 1 then branch cache was used to deliver the content. Thanks to my colleague Frank for the tip!
Branch cache is just one more option available to administrators to help deliver content to clients efficiently and reduce load on the network. It’s not difficult to setup and offers notable performance advantage – defiantly worth taking a look.
Advertisement status tracking
How to read the advertisement reports:-
Accepted – Software can be installed in few mins, as it will start downloading the software from remote /local system
No Status - Systems are not online or has issue with SMS Agent, or not received the policy, if the system is online then this status must change in one hour time (if the status not changed then you may
Suspect the issue with SMS / SCCM agent )
Accepted - No Further Status – Back end installation may be running and need to wait for some time to get the actual status
Failed – Software installation failed, you need to re push once again this advertisement.
Succeeded – Software installed successfully without any issues
Monday, March 21, 2011
SQL Add-on Tool like SCCM Right Click tool : SQL Right Click Tool “SSMS Tools” http://www.ssmstoolspack.com/
It contains a few upgrades to the SSMS IDE that I thought were missing.
To see what's new and what got fixed in a release check the News page.
The current features include:
- SQL Snippets
- Window Connection Coloring
- Window Content History, Query Execution History and Current Window History
- Format SQL
- Search Table, View or Database Data
- Run one script on multiple databases
- Copy execution plan bitmaps to clipboard or file
- Search Results in Grid Mode
- Generate Insert statements from resultsets, tables or database
- Regions and Debug sections
- Running custom scripts from Object Explorer
- CRUD stored procedure generation
- New query template
- General options
And it's better than some non-free ones too. :)
Package not downloading due to some IIS File filtering blocking issue
Check with these commands
BITSADMIN /LIST /ALLUSERS
C:\>BITSADMIN /geterror {7D46DE5B-3911-40B1-A72B-607737DB06F9}
BITSADMIN version 2.0 [ 6.6.3790.3959 ]
BITS administration utility.
(C) Copyright 2000-2004 Microsoft Corp.
ERROR FILE: http://sccmserver.mydomain:80/SMS_DP_SMSPKGD$/SMSPKG/HCC00
05F/AdminImage/x86/en-us/acad/Acad/Program Files/Root/HelpHtml/contexthelp/+CONSTRAINTSETTINGS.htm -> C:\WINDOWS\system32\CCM\Cache\HCC0005F.1.System\AdminImage/x86/en-us/acad/Acad/Program Files/Root/HelpHtml/contexthelp/+CONSTRAINTSETTINGS.htm
ERROR CODE: 0x80190194 - The requested URL is not found on this server.
ERROR CONTEXT: 0x00000005 - When processing the remote file error has occurred
/LISTFILES job Lists the files in the job
/SUSPEND job Suspends the job
/RESUME job Resumes the job
/CANCEL job Cancels the job
/COMPLETE job Completes the job
BITSADMIN /INFO job [/VERBOSE]
BITSADMIN /geterror {B2826EF6-C78B-4D1C-A386-94D0D36DC107}
BITSADMIN /LIST /ALLUSERS
Where job =
{B2826EF6-C78B-4D1C-A386-94D0D36DC107}

















