Example: Joining a Site to a New Parent
As the smsprov.log
and SQL Profiler trace were captured while joining a Configuration
Manager site to a new parent site, the ParentSiteCode property was
changed. Changing the parent site is a change to the site properties,
which results in writing a new site control file. The SMS provider initializes this operation,
performed by the Site Control Manager, Site Hierarchy Manager, and the
Database Monitor. The Site Control Manager and Site Hierarchy Manager
generate milestone status messages when they have completed each major
phase of processing the site control file updates. Table 1 displays these status messages.
Table 1. Status Messages Generated During Site Join
Component | Message ID | Description |
---|
SMS_HIERARCHY_MANAGER | 3307 | SMS
Hierarchy Manager detected that a change was requested by this site to
the configuration of site “DAL.” SMS Hierarchy Manager created a delta
site control file for this request. If this site is site “DAL,” SMS
Hierarchy Manager submits this file to SMS Site Control Manager at this
site. If site “DAL” is a child site, SMS Hierarchy Manager instructs SMS
Replication Manager to deliver the file to SMS Site Control Manager at
site “DAL” at high priority. |
SMS_SITE_CONTROL_MANAGER | 2807 | The delta site control file %ProgramFiles%\Microsoft
Configuration Manager\inboxes\sitectrl.box\incoming\.CT1 contains a
site configuration change request submitted by the
“Microsoft.ConfigurationManagement.dll” SMS Provider client running as
user “SCCMUNLEASHED\administrator” on computer “WILDFLOWER” at site
“DAL” at “7/27/2008 4:26:17 PM.” The site configuration change request
was assigned the serial number 33 at site “DAL.” SMS Site Control
Manager uses this serial number to ensure that it does not process the
same site configuration change request from an SMS Provider client (such
as the SMS Administrator console) more than once. When an SMS Provider
client submits a delta site control file containing a site configuration
change request, SMS Hierarchy Manager at the site submitting the file
will report status message 3307. You can track the time on message 3307
and this one to determine when the site configuration change request was
submitted and when it actually went into effect. |
SMS_SITE_CONTROL_MANAGER | 2814 | SMS
Site Control Manager modified the properties of the “Site Definition”
item named “Site Definition” in the actual site control file %ProgramFiles%\Microsoft
Configuration Manager\inboxes\sitectrl.box\sitectrl.ct0. This
modification occurred due to a site configuration change request in the
delta site control file %ProgramFiles%\Microsoft
Configuration Manager\inboxes\sitectrl.box\incoming\drfg12og.CT1. The
change will take effect in serial number 53 of the actual site control
file. You can compare the file %ProgramFiles%\Microsoft Configuration Manager\inboxes\sitectrl.box\history\00000034.ct0 with the file %ProgramFiles%\Microsoft Configuration Manager\inboxes\sitectrl.box\history\00000035.ct0 to determine which properties changed. |
SMS_SITE_CONTROL_MANAGER | 2811 | SMS Site Control Manager created serial number 53 of the actual site control file %ProgramFiles%\Microsoft
Configuration Manager\inboxes\sitectrl.box\sitectrl.ct0. This creation
occurred in response to a site configuration change request contained in
the delta site control file %ProgramFiles%\Microsoft
Configuration Manager\inboxes\sitectrl.box\incoming\drfg12og.CT1. The
other SMS server components will detect a new actual site control file
is available, read it, and reconfigure themselves accordingly. |
SMS_SITE_CONTROL_MANAGER | 2865 | SMS Site Control Manager submitted a copy of serial number 53 of the actual site control file %ProgramFiles%\Microsoft
Configuration Manager\inboxes\sitectrl.box\sitectrl.ct0 to SMS
Hierarchy Manager. This is the new actual site control file that
contains the current configuration of this site. If this is a primary
site, SMS Hierarchy Manager will update this site’s database with the
copy. If this is a child site of another site, SMS Hierarchy Manager
will replicate the copy up the site hierarchy, updating each parent
site’s database. |
SMS_HIERARCHY_MANAGER | 3306 | SMS Hierarchy Manager successfully processed “%ProgramFiles%\Microsoft
Configuration Manager\inboxes\hman.box\AVBLXF1C.CT2,” which represented
serial number 53 of the site control file for site “Dallas Primary
Site” (DAL). If this site is a primary site, SMS Hierarchy Manager
stores this site control file in the SMS site database. If this site
reports to a parent site, SMS Hierarchy Manager instructs SMS
Replication Manager to replicate this file to the parent site at high
priority. |
The third entry in Table 1 identified as 2814 in the Message ID column contains the following statement:
You can compare the file
C:\Program Files\Microsoft Configuration
Manager\inboxes\sitectrl.box\history\00000034.ct0 with the file
C:\Program Files\Microsoft Configuration
Manager\inboxes\sitectrl.box\history\00000035.ct0 to determine which
properties changed.
Comparing these two files shows the delta entry in the new site control file, 00000035.ct0:
BEGIN_PROPERTY_LIST
<Deltas>
<Set,"Site Definition","Site Definition">
END_PROPERTY_LIST
This entry indicates the change is in the Site Definition section of the file. Table 2 presents part of the Site Definition section of each site control file. (The parent site code entry is changed from <> to <CEN>.)
Table 2. Changes to the Site Configuration File
00000034.ct0 File | 00000035.ct0 File |
---|
<DAL> | <DAL> |
<Dallas Primary Site> | <Dallas Primary Site> |
<> | <CEN> |
<WILDFLOWER> | <WILDFLOWER> |
<SCCMUNLEASHED> | <SCCMUNLEASHED> |
To capture this
activity in detail, configure the logging for these three components to
write to a single log file. This log provides a detailed record of how
the Configuration Manager components work together to process changes to
the site. The log entry displayed in Figure 3 shows the Database Monitor dropping an .SCU (Site Configuration Update) file in the Hierarchy Manager inbox.
Caution: Be Careful when Combining Log Files
Configuring more than
one Configuration Manager component to write to a single log file can be
useful when you want to see the overall flow of an operation. The
resulting log files can sometimes become overwhelming, however. Be
careful when you configure this type of logging.
To see even more detail of
the process activity that carries out the site modification, use Process
Monitor to capture the file system activity of the SMSExec process
during the site join.
Figure 4
shows the initial phase of the site join activity as displayed in the
Process Monitor user interface. You can use some of Process Monitor’s
filtering options to selectively display activity related to processing
the site change:
Using the
ConfigMgr logs, you can determine the thread identifiers (TIDs) of the
three components of interest and apply a filter to show only events from
these threads.
Filter to include only operations that access files in the ConfigMgr inbox folders.
Figure 3.44 has access to the Status Manager inbox filtered out. Components write to the Status Manager inbox to generate status messages.
Filter out several other operations such as closing files.
Notice the
NotifyChangeDirectory (directory change notifications) operations are
highlighted. These initiate processing by a ConfigMgr component in
response to a change to the component’s inbox folder. The first
highlighted event in Figure 4 shows the Database Monitor (TID 2484) creating the site control update file DAL.SCU in the Hierarchy Manager inbox.
When Database
Monitor creates the DAL.SCU file in the Hierarchy Manager inbox,
Hierarchy Manager (TID 3420) begins reading the database for site
configuration changes and preparing the delta site control (*.CT1) file.
Process
Monitor can display Registry access as well as file access. You could
use Process Monitor to see the details of Hierarchy Manager retrieving
the Registry values it uses to construct a connection string to the site
database and accessing the SQL client libraries to initiate the
database connection.
The filters omit the
sequence of events showing this activity. Instead, take a look at the
SQL activity from the Hierarchy Manager found in the SQL Profiler data:
Select SiteCode, SiteName, ReportToSite, Status, DetailedStatus, TimeStamp,
SomeId, SiteType, BuildNumber, Version, SiteServer, InstallDir, TimeZoneInfo
FROM Sites AS Sites order by ReportToSite, SiteCode
select * from SetupInfo where id = 'VERSION'
select distinct SiteCode from SiteControl where TypeFlag = 2
select SerialNumber from SiteControl where SiteCode = 'DAL' and TypeFlag = 2
order by SerialNumber asc
SELECT ISNULL(DATALENGTH(BinaryData),0), BinaryData FROM SiteControl
where SiteCode = 'DAL' and TypeFlag = 2 and SerialNumber = 33
This shows the actual
SQL queries Hierarchy Manager uses to retrieve data from the Sites and
SiteControl tables. Hierarchy Manager uses this data to construct the
delta site control file. Hierarchy Manager writes the site configuration
changes to a temporary file and then executes a file-rename operation
to place the delta site control file in the Site Control Manager inbox.
The rename operation is the last event shown prior to the next
highlighted NotifyChangeDirectory operation in Figure 3.44. At this point Hierarchy Manager logs the following single entry:
SMS_HIERARCHY_MANAGER Processed site control changes for the local site.
7/27/2008 4:26:24 PM
Hierarchy Manager also generates the first status message shown in Table 3.5 and logs this entry:
SMS_HIERARCHY_MANAGER 3420 (0x0D5C) 7/27/2008 4:26:24 PM
STATMSG: ID=3307 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_HIERARCHY_MANAGER"
SYS=WILDFLOWER SITE=DAL PID=4092 TID=3420 GMTDATE=Tue Aug 12 01:49:07.063 2008
ISTR0="DAL" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7=""
ISTR8="" ISTR9="" NUMATTRS=0
The directory change
notification signals to the Site Control Manager (TID 744) that it has
work to do. Site Control Manager generates the following log entries to
record its processing of the delta site control file (some details are
omitted here):
SMS_SITE_CONTROL_MANAGER Processing delta site control file
"C:\Program Files\Microsoft Configuration Manager\inboxes\sitectrl.box\incoming\
drfg12og.CT1"... 7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER The delta site control file
"C:\Program Files\Microsoft Configuration Manager\inboxes\sitectrl.box\
incoming\drfg12og.CT1" contains a record submitted by the
Microsoft.ConfigurationManagement.dll running as user SCCMUNLEASHED\administrator
on computer WILDFLOWER at site DAL via the SMS SDK on
Sun Jul 27 21:26:17 GMT. The record was assigned the serial number 33
at site DAL. 7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Wrote temporary file "C:\Program Files\Microsoft
Configuration Manager\inboxes\sitectrl.box\temp\00000035.ct0".
7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Copied file "C:\Program Files\Microsoft
Configuration Manager\inboxes\sitectrl.box\sitectrl.ct0" to "C:\Program
Files\Microsoft Configuration Manager\inboxes\sitectrl.box\history\
00000034.ct0". 7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Moved file "C:\Program Files\Microsoft Configuration
Manager\inboxes\sitectrl.box\temp\00000035.ct0" to "C:\Program
Files\Microsoft Configuration Manager\inboxes\sitectrl.box\sitectrl.ct0".
7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER The "Site Definition" item named "Site Definition"
in the master site control file was modified. Compare the file
"C:\Program Files\Microsoft Configuration Manager\inboxes\sitectrl.box\history\
00000034.ct0" with the file "C:\Program Files\Microsoft Configuration Manager\
inboxes\sitectrl.box\history\00000035.ct0" for more information.
7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Updated the master site control file
"C:\Program Files\Microsoft Configuration Manager\inboxes\
sitectrl.box\sitectrl.ct0", the new serial number is 53.7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Copied file "C:\Program Files\Microsoft
Configuration Manager\inboxes\sitectrl.box\sitectrl.ct0" to "C:\Program
Files\Microsoft Configuration Manager\inboxes\sitectrl.box\history\00000035.ct0".
7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Wrote a copy of the master site control file
"C:\Program Files\Microsoft Configuration Manager\inboxes\sitectrl.box\
sitectrl.ct0" to "C:\Program Files\Microsoft Configuration Manager\inboxes\
sitectrl.box\outgoing\avblxf1c.ct2" in SMS VarFile format. 7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Moved file "C:\Program Files\Microsoft Configuration
Manager\inboxes\sitectrl.box\outgoing\avblxf1c.ct2" to "C:\Program
Files\Microsoft Configuration Manager\inboxes\hman.box\avblxf1c.ct2".
7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Deleted file "C:\Program Files\Microsoft
Configuration Manager\inboxes\sitectrl.box\incoming\drfg12og.CT1".
7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Successfully processed delta site control file
"C:\Program Files\Microsoft Configuration Manager\inboxes\
sitectrl.box\incoming\drfg12og.CT1". 7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER New parent site code: CEN 7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Processing delta site control file "C:\Program
Files\Microsoft Configuration Manager\inboxes\sitectrl.box\incoming\
drfg12og.CT1"... 7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER The delta site control file "C:\Program
Files\Microsoft Configuration Manager\inboxes\sitectrl.box\incoming\drfg12og.CT1"
contains a record submitted by the Microsoft.ConfigurationManagement.dll running as
user SCCMUNLEASHED\administrator on computer WILDFLOWER at site DAL via the SMS
SDK on Sun Jul 27 21:26:17 GMT. The record was assigned the serial number 33
at site DAL. 7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Wrote temporary file "C:\Program Files\Microsoft
Configuration Manager\inboxes\sitectrl.box\temp\00000035.ct0". 7/27/2008
4:26:24 PM
SMS_SITE_CONTROL_MANAGER Copied file "C:\Program Files\Microsoft
Configuration Manager\inboxes\sitectrl.box\sitectrl.ct0" to "C:\Program
Files\Microsoft Configuration Manager\inboxes\sitectrl.box\history\00000034.ct0".
7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Moved file "C:\Program Files\Microsoft Configuration
Manager\inboxes\sitectrl.box\temp\00000035.ct0" to "C:\Program Files\Microsoft
Configuration Manager\inboxes\sitectrl.box\sitectrl.ct0". 7/27/2008
4:26:24 PM
SMS_SITE_CONTROL_MANAGER The "Site Definition" item named "Site Definition"
in the master site control file was modified. Compare the file "C:\Program
Files\Microsoft Configuration Manager\inboxes\sitectrl.box\history\00000034.ct0"
with the file "C:\Program Files\Microsoft Configuration
Manager\inboxes\sitectrl.box\history\00000035.ct0" for more information.
7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Updated the master site control file "C:\Program
Files\Microsoft Configuration Manager\inboxes\sitectrl.box\sitectrl.ct0", the new
serial number is 53. 7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Copied file "C:\Program Files\Microsoft
Configuration Manager\inboxes\sitectrl.box\sitectrl.ct0" to "C:\Program
Files\Microsoft Configuration Manager\inboxes\sitectrl.box\history\00000035.ct0".
7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Wrote a copy of the master site control file
"C:\Program Files\Microsoft Configuration Manager\inboxes\sitectrl.box\
sitectrl.ct0" to "C:\Program Files\Microsoft Configuration Manager\inboxes\
sitectrl.box\outgoing\avblxf1c.ct2" in SMS VarFile format.
7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Moved file "C:\Program Files\Microsoft Configuration
Manager\inboxes\sitectrl.box\outgoing\avblxf1c.ct2" to "C:\Program
Files\Microsoft Configuration Manager\inboxes\hman.box\avblxf1c.ct2".
7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Deleted file "C:\Program Files\Microsoft
Configuration Manager\inboxes\sitectrl.box\incoming\drfg12og.CT1".
7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER Successfully processed delta site control file
"C:\Program Files\Microsoft Configuration Manager\inboxes\sitectrl.box\
incoming\drfg12og.CT1". 7/27/2008 4:26:24 PM
SMS_SITE_CONTROL_MANAGER New parent site code: CEN 7/27/2008 4:26:24 PM
The
logs show that after detecting the delta site control file, the Site
Control Manager moves the master site control file to the history folder
and creates a new site control file. Site Control Manager then
enumerates and validates the changes in the new file. Once the file is
validated, it becomes the new master site control file and is written to
the history folder as well.
In addition, Site
Control Manager writes the new site control file in SMS VarFile format
to the Hierarchy Manager inbox as a .CT2 file. The Hierarchy Manager
updates the sites table in the database with the new site information.
Hierarchy Manager then creates a .CT6 file with the site’s public key
information and forwards this file to the parent site to initiate the
site join. The following log entries show Hierarchy Manager updating the
database and triggering replication to the new parent site:
SMS_HIERARCHY_MANAGER Site DAL in Sites table: Site status = 1, Detailed status
= 1 7/27/2008 4:26:29 PM
SMS_HIERARCHY_MANAGER Processing site control file: Site DAL File C:\Program
Files\Microsoft Configuration Manager\inboxes\hman.box\AVBLXF1C.CT2
7/27/2008 4:26:29 PM
SMS_HIERARCHY_MANAGER Update the Sites table: Site=DAL Parent=CEN
7/27/2008 4:26:29 PM
SMS_HIERARCHY_MANAGER Attaching site DAL to site CEN 7/27/2008 4:26:29 PM
SMS_HIERARCHY_MANAGER Creating a new CT6 file to send to the Parent Site
7/27/2008 4:26:29 PM
SMS_HIERARCHY_MANAGER Successfully created the CT6 file C:\Program
Files\Microsoft Configuration Manager\inboxes\hman.box\pubkey\DAL.CT6
7/27/2008 4:26:29 PM
SMS_HIERARCHY_MANAGER Created file listing all public keys, C:\Program
Files\Microsoft Configuration Manager\inboxes\hman.box\pubkey\DAL.CT6, to forward
to new parent site. 7/27/2008 4:26:29 PM
SMS_HIERARCHY_MANAGER Successfully forwarded CT6 file to parent site.
7/27/2008 4:26:29 PM
SMS_HIERARCHY_MANAGER Sent the actual site control image to site CEN
7/27/2008 4:26:29 PM
SMS_HIERARCHY_MANAGER Created site notification for site DAL 7/27/2008 4:26:30 PM
SMS_HIERARCHY_MANAGER Created site control notification for site DAL
7/27/2008 4:26:30 PM
At
this point, the SQL Profiler trace shows a large amount of activity by
the Site Hierarchy Manager updating the site database with information
from the new master site control file. Here’s a sampling of these
queries:
delete SiteControl from SiteControl
where SiteCode = 'DAL' and TypeFlag = 2 and SerialNumber <= 33
UPDATE SysResList SET ResourceType= "Windows NT Server",
ServerName = "WILDFLOWER", ServerRemoteName = "wildflower.sccmunleashed.com",
PublicDNSName = "", InternetEnabled = 0, Shared = 0 WHERE NALPath =
"[""Display=\\WILDFLOWER\""]MSWNET:[""SMS_SITE=DAL""]\\WILDFLOWER\"
and SiteCode = "DAL" and RoleName = "SMS Component Server" and
(ResourceType != "Windows NT Server" or ServerName != "WILDFLOWER" or
ServerRemoteName != "wildflower.sccmunleashed.com" or PublicDNSName != "" or
InternetEnabled != 0 or Shared != 0) ;
update SysResList set Certificate=<Certificate hash value>
insert SiteNotification (SiteCode, TimeKey) values ("DAL", "04/10/1970 06:35:00")
update SiteNotification set TimeKey = "07/27/2008 16:26:30" where SiteCode = "DAL"
The components
responsible for replicating the site change to the parent site are the
Replication Manager, Scheduler, and Sender. To see how Hierarchy Manager
initiates the actual site join, the next section looks at some events
captured with Process Monitor. It then reviews some of the key entries
from the logs from the three components involved in intersite
replication.