Gotta get the schema right first
Before trying to synchronize much of anything, we need to make sure the required schema elements are in place.
NOTE: I would estimate that around a third of all questions I've received on ADAMSync came back to schema problems. It is critically important that the schema be configured properly.
For ADAMSync to properly synchronize your data, there are really two things that need to exist in the target environment:
1) The ADAMSync schema extensions. ADAMSync itself has a series of schema elements which need to be present in the target ADAM environment. These schema elements are used for ADAMSync itself to track configuration information.
2) Whatever schema elements are needed for the data you would like to synchronize. Remember that ADAM, out of the box, has a schema which contains far fewer elements than that of AD. If you’re going to synchronize data from AD in to ADAM which uses schema extensions in AD which are not yet in ADAM, we need to get them in there.
So let’s first prep our ADAM environment by importing the ADAMSync schema extensions.
C:\WINDOWS\ADAM>ldifde -i -f MS-AdamSyncMetadata.LDF -s localhost -t 50000 -c "cn=configuration,dc=x" #configurationNamingContext
Connecting to "localhost"
Logging in as current user using SSPI
Importing directory from file "MS-AdamSyncMetadata.LDF"
Loading entries..........
9 entries modified successfully.The command has completed successfully
For the required elements for the objects themselves, that can often be quite a bit more tricky.
The real issue is that synchronizing the schema from AD to ADAM is often a tougher task. We heard this loud and clear, and actually built a tool to help with this (included in ADAM as well….ADSchemaAnalyzer). So as to keep things simple, let’s just ignore that for now, and instead import one of the ldif files included with ADAM that has what we’ll need for this first demo. Later on we’ll revisit this and do a more targeted schema move when we look at ADSchemaAnalyzer in more depth (hopefully, after the ADAMSync posts are done, we’ll look at that next).
C:\WINDOWS\ADAM>ldifde -i -f MS-AdamSchemaW2K3.LDF -s localhost -t 50000 -c "cn=configuration,dc=x" #configurationNamingContext
Connecting to "localhost"
Logging in as current user using SSPI
Importing directory from file "MS-AdamSchemaW2K3.LDF"
Loading entries.................................................................
.................................... ............................................
................................................................ ................
................................................................................
........ ........................................................................
.................................... ............................................
................................................................ ................
................................................................................
........ ........................................................................
.................................... ............................................
................................................................ ................
................................................................................
........ .........................................................
1009 entries modified successfully.The command has completed successfully
Now that our schema is ready, let’s go ahead and make sure that we have the proper NCs. Yesterday I mentioned off-hand that we’ll create one with a given name, but I’d like to just change that name slightly so skirt around some schema issues for now. Never fear, we’ll get back to a target NC of type OrganizationalUnit a bit later, as this is also a very common question.
C:\WINDOWS\ADAM>dsmgmt
dsmgmt: partition management
partition management: connections
server connections: connect to server localhost:50000
Binding to localhost:50000 ...
Connected to localhost:50000 using credentials of locally logged on user.
server connections: q
partition management: list
Note: Directory partition names with International/Unicode characters will only
display correctly if appropriate fonts and language support are loaded
Found 2 Naming Context(s)
0 - CN=Configuration,CN={B57A6E49-957D-434C-8584-9AA3D3946EF0}
1 - CN=Schema,CN=Configuration,CN={B57A6E49-957D-434C-8584-9AA3D3946EF0}
Ah, nothing but schema and configuration. This is because during the install, I didn’t actually specify any NCs that I’d like it to create. Let’s go ahead and create one so we have a place to synchronize our data in to:
partition management: create NC dc=SyncTargetDC DomainDNS NULL
adding object dc=SyncTargetDC
Next stop, our first synchronization task.
Edit: Minor formatting nit
Comments
- Anonymous
September 08, 2005
admod -h .:50000 -b dc=SyncTargetDC -add objectclass::domaindns instancetype::5
:) - Anonymous
September 13, 2005
Your posts on ADAM have been invaluable to me. However, it should be noted that the version you are posting about is the version in R2.
Thanks for the informative posts on ADAM, I look forward to reading more about ADAM. - Anonymous
September 14, 2005
Hi Chuck.
Yes I'm using the version of ADAMSync in R2 RC0. That was one of my disclaimers. :)
http://blogs.technet.com/efleis/archive/2005/09/06/410346.aspx