Thursday, March 21, 2019

SCCM SQL Based Replication (DRS)


New (SQL) based site to site replication model is the most challenging but very interesting part (at least for me) of System Center 2012 Configuration Manager. So, I thought of sharing the some points which are main pillars of SQL replication model

Key components of new (SQL) based replication model
1. DRS – Data Replication Service
2. SSB – SQL Service Broker
3. RCM – Replication Configuration Management/Monitoring
4. RG – Replication Group
5. Replication Pattern
6. Article Name/s
Also some tips:: how to :: force or re-init site to site replication, verify the site to site replication……
Before going into deep dive, I would like to thank Saud Al-Mishari, Microsoft PFE who was the speaker of MMS 2012 session “CD-B407”. This post is inspired from his session.
DRS – Data Replication Service / SSB – SQL Service Broker
To replicate the data between configmgr sites, Configuration Manager uses Database Replication Service (DRS). The DRS intern uses SQL Server Service Broker (SSB) to replicate data between the sites.
More Details about DRS – TechNet Article
More Details about SSB – SQL Team Article
RCM –  Replication Configuration Management/Monitoring
RCM is a thread of SMSEXEC. As the name suggests, this thread keeps an eye on Replication Configuration and Monitoring. You can refer to rcmctrl.log file to get more details about RCM related activities.
RG – Replication Group
Replication Groups are a set of tables that are monitored and replicated together. Replication groups are segregated and grouped in to THREE Replication Patterns.
To get the full list of RG along with replication schedule – Run the SQL query – Select * from vReplicationData
Each RG (Replication Group) has a unique Replication ID. In CM 2012 RTM release, all the transport is based on DRS.
SQL Based Replication Guide
Replication Pattern
Replication Patterns are group rules based on those, the replication groups are segregated. Three replication patterns are available. More Details about Data Replication – TechNet Blog
SQL Based Replication Guide
a) Global – Global data is anything that is created by administrator. Two way replication between the CAS and Primaries. e.g Package Metadata
image
b) Global_Proxy – This Replication data is based out secondary servers.
image
c) Site – One way replication to the parent site / CAS. e.g Software Inventory/Hardware Inventory
image
Article Name/s
Replication Groups are further divided into Article Names based on ReplicationID . Each RG (Replication Group) has a unique Replication ID.
Run the SQL query to get the list of Article Names “ Select * from vArticleData
e.g  Add_Remove_Programs_64_DATA, Add_Remove_Programs_64_HIST, Add_Remove_Programs_DATA, BoundaryGroup, BoundaryGroupMembers etc…
SQL Based Replication Guide
Force Site To Site Replication / re-init process
You can use <site_Code>.SHA file or Preinst.exe /syncchild, If you want to force site to site replication in SCCM / ConfigMgr 2007. Fortunately/Unfortunately, these methods are NOT going to work in CM 2012Smile
/SYNCCHILD option to sync child sites has been deprecated. This functionality is
not longer required in System Center 2012 Configuration Manager.
image
If you need to perform a manual sync between the CAS and Primary server, same like dropping .SHA file in the inbox or syncchild…..
You can use the stored procedure (sproc) spDrsSendSubscriptionInvalid with suitable parameter to force the site to site replication.
Word of caution – This will start the re replication between the sites and may cause of lot of Network Traffic…..
EXEC spDrsSendSubscriptionInvalid,,
e.g  EXEC spDrsSendSubscriptionInvalid 'PR1', 'CAS', 'Configuration Data'
image
How to verify the site to site replication from SQL Server Management studio ?
Run the SQL query to check out Transmission Queue for a particular site (in my example it’s site PR1)
SELECT TOP 1000 *, casted_message_body =
 CASE message_type_name WHEN 'X'
 THEN CAST(message_body AS NVARCHAR(MAX))
 ELSE message_body
 END
 FROM [CM_CAS].[sys].[transmission_queue] where to_service_name = 'ConfigMgrDRS_SitePR1'
image
You can verify the transmission logs through vLogs view.
Word of Caution – Avoid using “ select * from vLogs ” query in production environment !!
Select top 1000 * from vLogs order by LogTime desc
You can verify site replication through the rcmctrl.log at CAS and Primary servers.
rcmctrl.log  @ CAS server.
See the log file entry “Created miniJob to send compressed copy of DRS INIT BCP Package to site PR1”
image
rcmctrl.log @ Primary server (PR1)
image
image

Thursday, May 22, 2014

Steps for Manually Data Restore after PC REFRESH using USMT:-


Check if Recovery information is available for that specific computer in ‘Computer Association’ in respective site server.
Where,

D279953B-5454-469F-BB11-77A68E9D01B3   - Recovery key.

  • Copy user state data and USMT package to user’s local drive viz. ‘C:\store’ and ‘C:\usmt’ resp. Also create folder named ‘temp’ where state restore logs will be stored.
  • Open ‘Command Prompt’ and enter to ‘usmt’ directory. 
  • Type following command  as,


C:\usmt>loadstate.exe c:\store /decrypt /key: D279953B-5454-469F-BB11-77A68E9D01B3 c /l:"C:temp\loadstate.log" /progress:"C:\temp\loadstateprogress.log” /i:"C:\usmt\MigApp.xml" /i:"C:\usmt\MigUser.xml" /i:"C:\usmt\MigSys.xml" /i:"C:\usmt\Custom.xml" /lac /lae

How to fetch the SMSTS LOG during OSD..



If you get any Error during installation then follow below steps for collecting the logs from Target PC.

1) Please create a folder on your PC and give full permission to every one. 

1) Press “F8” once the installation failed with Error.

2) Then you will get a Command Prompt.

3) Type "net use z:\\yourPC IP\sharefoldername"

4) Then type your user name and password

 
Please find the below Screen Print…
 

Clean-up your Inboxes!!!


look at is the folders in \Microsoft Configuration Manager\Inboxes.  These folders contain all the activity of ConfigMgr and typically consist of files which are coming and going.  However, some times things go wrong and a bunch of files can start accumulating in these folders, eventually running you out of disk space.  This is never good and you should look into the root cause to fix it before worrying to much about the files themselves.  However, some things fix themselves, or some files are left behind after fixing the problem, and those problems are a nuisance that needs to be cleaned up and removed.  I will try and provide a list of some of the folders I look at and recommend cleaning up if there are old files in them.
should make a note here that while you can just delete the files, and will be fine in most cases, it is a good practice to instead move the files to a temp folder long enough (a day or week) to make sure there are no negative repercussions from the file removals.  It is just smart to play it safe.

  • Compsumm.box – This is for component summarizer messages.  If you have old stuff, it may not be relevant any more so remove the files.
  • CIAMgr.box – Configuration items, probably related to patches but perhaps for other things.  If the files are older than a week, they have probably been forgotten and can be removed.
  • Auth\dataldr.box\badmifs – Hardware inventory that was bad for some reason.  Often times the bad file will be a temporary thing and the system will self correct, leaving files behind.  Once you have investigated and solved the reason it is bad, feel free to remove the files.
  • Hman.box – Don’t touch stuff in the subfolders, but if files in the root are old, site communication probably had a hiccup at some time and the files can be removed.
  • Sinv.box\badsinv – Software inventory gone bad, similar to the dataldr.box\badmifs.  Remove files once any investigation is done.
  • Statmgr.box – These are status messages and old files can be removed as they are probably no longer relevant.
  • Auth\statesys.box\corrupt – Old status messages here should be removed .  They are probably out of date anyway.
  • Auth\ddm.box\regreq\bad_ddrs - These are discovery records that couldn't process for some reason.


There are lots of inboxes, and I’m sure many of them also get file backlogs for various reasons.  these are just the ones I see most often.  As I see and validate them I will update this list as appropriate.

POST SC Client installtion....

Once the agent is available on the network and the client is installed, the client goes through the following actions as part of the reporting process:

  • Client location services identify the site code and the MP it is supposed to connect to.
  • The client connects to the Management Point and downloads the policies.
  • Once the policies are downloaded it sends the heartbeat record to the server.
  • Once the server receives this heartbeat record these are converted in to DDR and processed.  This will set the client flag to 1 which will make the client status display as Yes in the console.
  • On a regular basis the agent will send the heartbeat and if no heart beat or inventory shows up for a length of time then the client flag will be marked as 0 by the client flag maintenance task, setting the client status to No.
 

SCCM Port Details



·         -- > indicates one computer initiates and the other computer always responds
·         < -- > indicates that either computer can initiate

 

Wednesday, May 21, 2014

How to Perform WMI Repair & Check WMI Health



To Repair WMI:

 To repair WMI follow the steps below, Please note that this is a destructive process and must only be used in the case where wmi is corrupt.

Step 1:
%windir%\system32\wbem\winmgmt /clearadap
%windir%\system32\wbem\winmgmt /kill
%windir%\system32\wbem\winmgmt /unregserver
%windir%\system32\wbem\winmgmt /reserver
%windir%\system32\wbem\winmgmt /resyncperf

Step 2:
net stop winmgmt /y

Step 3:
If exist %windir%\system32\wbem\repository.old rmdir /s /q %windir%\system32\wbem\repository.old
ren %windir%\system32\wbem\repository repository.old
regsvr32 /s %systemroot%\system32\scecli.dll
regsvr32 /s %systemroot%\system32\userenv.dll
for /f %%s in (‘dir /b /s %windir%\system32\wbem\

Step 4:
net start winmgmt /y

Note: Ensure that the Windows Management Instrumentation service is running after performing the above steps
To Check WMI health & connectivity :