Harry Sarshogh
Harry Sarshogh

Reputation: 2197

GETDATE() Function SQL Server 2008 R2 has difference with windows server time

I have Windows Server 2008 and SQL Server 2008 R2.

When I get date with SELECT GETDATE() from SQL Server, it shows the current date and time, but with 6 minutes less than Windows server watch (time) .

I checked location, time and Active Directory but I don't understand why my SQL Server GetDate function returns 6 minutes difference compared to my Windows server time.

Can anybody help me ?

Upvotes: 2

Views: 1389

Answers (2)

Harry Sarshogh
Harry Sarshogh

Reputation: 2197

I found solution at Active Directory setting and master server that databases placed on . problem may be from below items :

Getting group policy updates and may have issues authenticating (but that can be fixed with a time reset and reboot)

will have to: sync time to a nonexistent timesource see Windows Time Service Tools and Settings ( http://technet.microsoft.com/en-us/library/cc773263%28WS.10%29.aspx)

this will prevent the domain from automatically repairing the time , change the time manually.

and read other best link be in below :

http://www.techrepublic.com/blog/datacenter/configure-a-time-server-for-active-directory-domain-controllers/3690

http://technet.microsoft.com/en-us/library/cc773354%28v=ws.10%29.aspx

Upvotes: 2

SQLGuru
SQLGuru

Reputation: 108

From SSMS run this statement:

SELECT  SERVERPROPERTY('ComputerNamePhysicalNetBios') ComputerNamePhysicalNetBios,GETDATE() DateTime

Then RDP to this machine and make sure time displayed is same as displayed in SSMS.

Upvotes: 1

Related Questions