DFSR: From UID to File Path in One Easy Step

Hi, Ned here again. If you have spent any time in the DFSR debug logs, you’ll probably found that getting a file’s full path is a bit of a pain. For example, examine this sample debug log of a file being replicated – see if you find the folder’s path in here anywhere. Go ahead, I’ll wait.

You didn’t find anything because the debug logs won’t tell you. DFSR uses an ESE database to keep track of file and folder paths as part of their IDRECORD information. If you were to examine the database rows directly, you’ll find that its tables don’t contain the full path either. Instead, a record of each ‘object’ (file or folder) is stored as a Unique Identifier (UID) and its relationship with its parent and children UID’s is stored as well. So when you look in the debug logs, you see:

<Upstream> 20090624 12:04:56.359 3196 JOIN 1122 Join::SubmitUpdate LDB Updating ID Record:
+    fid 0x200000000A752
+    usn 0x930508
+    uidVisible 1
+    filtered 0
+    journalWrapped 0
+    slowRecoverCheck 0
+    pendingTombstone 0
+    internalUpdate 0
+    dirtyShutdownMismatch 0
+    meetInstallUpdate 0
+    meetReanimated 0
+    recUpdateTime 20080624 16:04:56.339 GMT
+    present 1
+    nameConflict 0
+    attributes 0x20
+    ghostedHeader 0
+    data 0
+    gvsn {EDE2D64E-1306-4C7C-B568-449A98371AA2}-v29
+    uid {EDE2D64E-1306-4C7C-B568-449A98371AA2}-v29
+    parent {175F2B6A-289F-4CA8-AF8B-4D9BF1A2C501}-v2
+    fence 16010101 00:00:00.000
+    clockDecrementedInDirtyShutdown 0
+    clock 20080624 16:04:56.339 GMT (0x1c8d6140ba94250)
+    createTime 20080624 16:04:56.258 GMT
+    csId {175F2B6A-289F-4CA8-AF8B-4D9BF1A2C501}
+    hash 00000000-00000000-00000000-00000000
+    similarity 00000000-00000000-00000000-00000000
+    name somefile.txt


So what if you want to actually get the real path of a file? That is useful in large environments where file name uniqueness gets less common.

In Windows Server 2003 R2 and Windows Server 2008

Just provide the UID to this well-hidden WMI Method in a CMD prompt:

Wmic.exe /namespace:\rootmicrosoftdfs path dfsridrecordinfo.Uid=”your uid here” call getfullfilepath

For example:

Wmic.exe /namespace:\rootmicrosoftdfs path dfsridrecordinfo.Uid=”{EDE2D64E-1306-4C7C-B568-449A98371AA2}-v29” call getfullfilepath

Which would tell you:

Method execution successful.
Out Parameters:
instance of __PARAMETERS
FullPath = “C:\testrf\somefile.txt“;
ReturnValue = 0;

Sorta ugly, but it gets the job done.

In Windows Server 2008 R2

So much easier now! DFSRDIAG.EXE now supports the IDRECORD option.


For example:

C:>dfsrdiag idrecord /uid:{EDE2D64E-1306-4C7C-B568-449A98371AA2}-v29

File name : somefile.txt
Path : c:testrfsomefile.txt
UID : {EDE2D64E-1306-4C7C-B568-449A98371AA2}-v29
GVSN : {{EDE2D64E-1306-4C7C-B568-449A98371AA2}-v29

Not ugly at all. Read more about this and other new DFSRDIAG features here:

DFS Replication: What’s new in Windows Server™ 2008 R2


–    Ned ‘Breadcrumbs’ Pyle