Friday, November 30, 2012

SQL Queries FOR SCCM

VasanthSCCM has posted a number of very nice SQL queries for SCCM

SQL Queries FOR SCCM « vasanth:

'via Blog this'

If you find this article useful please leave me a comment or click on an ad to show your support.

Thursday, November 29, 2012

Create SCCM Collection of SCCM Servers


Query is: 

Select * from  SMS_R_System where SMS_R_System.Name in (select distinct ServerName from SMS_SystemResourceList)

If you find this article useful please leave me a comment or click on an ad to show your support.

Thursday, November 08, 2012

Internet Explorer Auto-Proxy Script Download Error

So I came across this error when outside our network.

Lots of websites said to simply turn off the automatic proxy detection. Yes this will probably stop the pop up from coming up but it will also probably stop your internet from working because you've disabled your proxy.

A better solution is to check your GPO Policy in regards to Internet Explorer.

Open Group Policy Console and check that none of your applied USER GPO's are applying

User Config > Admin Templates > Windows Components > Internet Explorer > 'Display error message on proxy script download failure'

If this is set to enabled you'll find that when a  user and computer are in a place that can't reach the WPAD file it will continuously show the user the above error. If it is enabled you will need to switch it to disabled.



If you find this article useful please leave me a comment or click on an ad to show your support.


Tuesday, November 06, 2012

SMS Despooler failed to merge delta to the compressed package: Error 1 Incorrect Fucntion

So I was happily adding some new drivers to a boot.wim and then tried to send the changes out to my distribution points. That's when the following error started occurring.


SMS Despooler failed to merge delta to the compressed package "C0100112". The operating system reported error 1: Incorrect function.
Possible cause: The destination drive is full.
Solution: Make more space available on that drive. SMS Despooler will attempt to merge the delta again during its next retry interval


I then see that the Source Version numbers on the package in the primary site is something like 13 and the rest are on version 7. Looks like a version mismatch to me.

First step.
- Turned off 'Enable binary differential replication'
- Deleted the WIM from all DP's

This didn't fix the issue.

I then looked in the distmgr.log file on the DP and found the following.


Package XXXXXXX requires a newer version (10) of source files and the new compressed files haven't arrived yet, current version is 7, skip X:\ConfigXXX\inboxes\distmgr.box\INCOMING\XXXXXXX.PKG

This tells me something has gone wrong or is stuck when SCCM tried to distribute the package. A call to PSS later and yes we found that the SCCM had stuffed up the Source Version for the packageID and to fix this we needed to modify the SCCM database directly.


http://social.technet.microsoft.com/Forums/en/configmgrswdist/thread/a6bb710c-91d6-4d34-b132-9c948e7c9d2b

http://social.technet.microsoft.com/Forums/en-US/configmgrswdist/thread/312d86e3-e793-4147-97a7-7785295e4986/

Update for Feb 2013:

The way we determined  that we had a source version mismatch was looking at the 'Package Status' for the package the primary SCCM had a package version of #4 and the rest of the distribution points had a version of #3

You can also verify this by looking directly at the PKGSTATUS table in SCCM SQL DB. by executing the following select statement
select * from PkgStatus where pkgstatus.ID = 'PACKAGEID' 
Replace PACKAGEID with the PackageID of the package.

The way we actually fixed the version mismatch was to login to primary database for SCCM and set the source version for package back to '0' and the status to '2'. Doing this tells SCCM that this package is a brand new package that has not been sent to any DP.

The way to update the SourceVersion and Status for Package in SCCM is to open SQL management studio and connect to the primary SCCM SQL DB.

Then execute the following query/statement to backup the PKGSTATUS table into a new table called dbo.pkgstatus_BU;
select * into dbo.pkgstatus_BU from dbo.PkgStatus
Then do an update statement to reset the SourceVersion and Status.
UPDATE PkgStatus SET SourceVersion = 0, Status = 2 WHERE Id = 'PACKAGEID' and PkgServer = 'SCCMSERVERNAME'
Replace PACKAGEID with the PackageID of the package you want to reset.
Replace SCCMSERVERNAME with the comptuername of the SCCM Distibution point server you want row you want to update.

You will need to execute the statement for every DP that has the wrong SourceVersion as compared to the primary.

WARNING: If you don't know what you are doing in SQL call Microsoft PSS for guidance before updating SQL databases because if you break your SCCM SQL DB because of something you read on the internet it's probably not going to be covered by warranty.

If you find this article useful please leave me a comment or click on an ad to show your support.

Failed to find CCM_SoftwareDistribution object for AdvertID="XXXXXX", PackageID="YYYYYYY", ProgramID="*"

I packaged a driver for an OSD deployment. When we went to test the OSD deployment the task sequence would fail with the error "Unable to find task sequence dependencies"

Looking at the SMSTS.log file I see this line
Failed to find CCM_SoftwareDistribution object for AdvertID="XXXXXX", PackageID="YYYYYYY", ProgramID="*"

This link identified the correct issue but failed to resolve the problem
http://managedux.com/2011/06/17/failed-to-resolve-selected-task-sequence-dependencies-code0x80040104-or-failed-to-find-ccm_softwaredistribution-object-for-an-osd-driver-package-that-is-on-a-distribution-point/

To solve the problem I deleted the driver package and recreate a new driver package. This then allowed the task sequence to work.

If you find this article useful please leave me a comment or click on an ad to show your support.