All sort of interesting things happen when we are asleep: Santa Clause, tooth fairies, and, lately, CRM errors. If you are running production on premises system, enabling blanket tracing needs to be done with a great care as server disks will overflow very fast. It’s OK during the day to enable trace, reproduce the error and disable trace, but if your errors happen in the middle of the night, who’s there to flip the lights on and off?
Immense power of Windows scheduling to the rescue – schedule your traces to sleep well at night.
Couple points from Tipp Jarr:
- Multiple servers in deployment are like a box of chocolate, so if you have more than one of those, run the job on each one of them.
- Enabling script in the article misses TraceRefresh flag. Without it, your script will work only once.
- KB writers seems to have a dislike for carriage returns. Here is the content lined up and ready to be pasted
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM] "TraceEnabled"=dword:00000001 "TraceRefresh"=dword:00000002
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM] "TraceEnabled"=dword:00000000 "TraceRefresh"=dword:00000003
- When scheduling the job, make sure it runs under account with sufficient privileges. Muggles do not have permissions to modify HKLM keys.