Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I wish to do some testing on my local machine which requires me to put the date forward a year. So I can test some stuff in SQL Server (i've found it not possible to override the sql server time).

However because I'm connected to a domain, I believe this is causing the time to be reset to normal a few moments after I try to override it.

I understand that it's probably important for the local and domain time to be insync, but is it possible to temporarily block the clock from being reset?

Disconnecting from the network isn't an option, as I require an internet connection.

If there is a manual way to block the time reset what are the likely reprocutions? I don't want to screw anything up on the network :-)

share|improve this question
1  
Would disabling the Windows Time service be acceptable? –  jscott Feb 2 '12 at 17:55
    
yep disabling time service would do the trick.. –  Cold T Feb 2 '12 at 17:57
    
Just be aware that if the SQL machine's time gets too far out of sync with the DCs, authentication will fail. –  mfinni Feb 2 '12 at 18:21
    
Thanks for the tips –  Alex Key Feb 3 '12 at 10:13
add comment

2 Answers

up vote 4 down vote accepted

Open the registry editor (regedit), navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

Find the REG_SZ value named Type. Edit the value to NoSync. Set it back to Nt5DS when you need to sync with the domain hierarchy again.

You can do this from the command line by calling

reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters /v Type /d NoSync /f
share|improve this answer
    
Thanks, +1 from me –  Alex Key Feb 3 '12 at 10:13
    
Interestingly my type value Type was set to NTP. So perhaps it was actually a NTP server setting which I couldn't see due to a domain policy or something. –  Alex Key Feb 3 '12 at 10:16
    
In some domain configurations, you might want to set the Type to NTP and add a specific DC to your list of NTP Sources, eg. if you have no DC's in your Site, and want to specify a remote DC with better connectivity than you have with the PDC Emulator. –  Mathias R. Jessen Feb 3 '12 at 15:30
add comment

Disable the Windows Time service or block the outbound port 123 on your local firewall.

share|improve this answer
    
Thanks, +1 from me –  Alex Key Feb 3 '12 at 10:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.