• Facebook
  • RSS Feed
  • Instagram
  • LinkedIn
  • Twitter
Sep 102008

I have been doing some work on PST Migrations over the last few days to discover what happens under circumstances.   The work has been interesting, and varied.  There is at least one bug that I have escalated, but this post is really just to track an interesting little bit of SQL that I did.

My repro involved locating 11,000 PST files that I created.  I had to do this several times.
The first hurdle then is that I didn’t really fancy creating 11,000 PST files manually, and copying and pasting them in Windows Explorer is also a bit of a pain.  I wrote a little VBScript which will copy a single PST many, many times .. here it is :

maxloop = 10000

dim filesys, demofile
set filesys = CreateObject (“Scripting.FileSystemObject”)

set demofile = filesys.GetFile(“c:temppstsfile1.pst”)

do while loopcounter  < maxloop

demofile.Copy(“c:temppstsfile1-A” & loopcounter & “.pst”)

loopcounter = loopcounter + 1
The problem with running PST migration multiple times (or rather the PST Locator) is that by default it only scans remote machines hard-drives once every 24 hours.  The easiest way, I found, to get around this is to reset the date of the last scan, so after each locator-task run, I executed the following SQL :

Delete  from pstfile;
Update pstlocatortask set hardsearchlasttime = ‘2008-09-01 03:00:00.000’

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>