Server Pc Clock Is Delayed - clock

I have a Windows 2012 Server and client PS's get clock data from the server but server clock delays like 5 mins in 6 months. How can I fix that?

Related

Azure Server Database: error: 0 - The wait operation timed out

We use Azure Databases to hold our data for our web app.
All of a sudden as of 8pm Central Time on 10/12/2021, I am seeing this error:
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.) (Microsoft SQL Server, Error: 258)
We are seeing this via SQL Server Management Studio and also when I debug within VS 2019.
This doesn't appear to happen with everyone on our team.
Is anyone else seeing issues with Azure database service?
Ping the Azure SQL database server to get the current IP address of the server.
C:\>ping <myserver>.database.windows.net
Pinging data.sn1-1.database.windows.net [65.55.74.144] with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for 65.55.74.144: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)
Once you get the IP, run a tracert to find out on what hop the communication gets timed out or has noticeable latency.
C:\>tracert 65.55.74.144
Tracing route to 65.55.74.144 over a maximum of 30 hops
1 2 ms 1 ms 1 ms 192.168.0.1
2 6 ms 5 ms 5 ms 10.33.34.50
3 5 ms 4 ms 5 ms 4-1-753.DLLSTX-LCR-07.verizon-gni.net [130.81.107.26]
4 8 ms 5 ms 5 ms so-6-2-0-0.DFW01-BB-RTR1.verizon-gni.net [130.81.28.208]
5 44 ms 43 ms 44 ms so-11-0-0-0.LCC1-RES-BB-RTR1-RE1.verizon-gni.net [130.81.17.40]
6 49 ms 44 ms 44 ms so-6-0-0-0.ASH-PEER-RTR1-re1.verizon-gni.net [130.81.10.90]
Sometimes you experience this when you are trying to get connected to SQL Azure using a VPN software on the corporate network, but when you get connected from home you are fine.
It appears that this issue was due to my home network ISP.
I assume the ISP accidently changed a setting for port 1433. I called the ISP, they reconfigured my modem, I rebooted and it still didn't work.
Then about 30 minutes to 45 minutes later, it started working perfect, without any issues within my local debug session in VS 2019 OR with trying to access the Azure database via SSMS.
We also had another developer that was seeing the same issue and he had the same ISP provider since he lives about 15 minutes from me.
All other developers were working fine because they had different ISPs

Recurring SQL Error 17189

Problem:
One of our clients has SQL Server 2005 running on a Windows 2008 R2 Standard machine. Every once in a while, the server fails with the following error:
SQL Server failed with error code 0xc0000000 to spawn a thread to process a new login or connection. Check the SQL Server error log and the Windows event logs for information about possible related problems. [CLIENT: <local machine>]
The error occurs at a rate of about once per second, with the value for CLIENT: being the only thing that changes (sometimes, instead of <local machine> it shows the IP of the machine or the IP of other machines belonging to the client) and until the SQL Server is restarted, no connections can be made to it. After the restart, it works fine.
The problem happens about once or twice per month. There are no windows logs for the previous occurrence; I've since increased the max size for the Application log.
Machine configuration:
OS: Windows 2008 R2 Standard SP1 (x64)
SQL: Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86) Nov 24 2008 13:01:59 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition on Windows NT 6.1 (Build 7601: Service Pack 1)
CPU: Intel Xeon E5430 # 2.66GHz
RAM: 32 GB
Paging file: 32 GB on drive E (System managed), None on all other drives (including drive C)
More info:
The server has 2 databases that are actively used:
One database is used for replication (1 Publication with about 450 subscribers, most of which synchronize daily, usually more than once per day). The same database is also used by a web application that has about 150 subscribers that use it actively during the day.
Both of the databases also have frequent jobs running that mainly do file imports and transfers from one db to the other.
Update:
While checking the logs once again, I've noticed that the AppDomain gets marked for unload due to memory pressure, unloaded and recreated at a rate of about once every 30 minutes. During the last 2 occurences of the stated problem, the AppDomain went up to 250 and 264, respectively. Could this be a related issue?
This error could be due to a max worker threads setting that is too low. You can set this as:
EXEC sp_configure 'max worker threads',0
GO
RECONFIGURE WITH OVERRIDE
GO
to raise the limit.
It's entirely possible that you are getting the error due to having too many connections open, in other words the error is the symptom rather than the cause. You should review your application(s) for proper closing of connections.
You can inspect all open connections in SQL Server using sp_who:
Provides information about current users, sessions, and processes in an instance of the Microsoft SQL Server Database Engine. The information can be filtered to return only those processes that are not idle, that belong to a specific user, or that belong to a specific session.
More information on how to inspect open connections, read this thread on SO.

SQL query is running 10 times faster on local desktop SQL Server Express than on SQL Server in Azure

We are currently running two instances of SQL Server. For development purposes, we run a local DB on a desktop PC in our office.
The PC has following stats:
8 GB Ram
AMD Athlon 5350 APU with Radeon(tm) R3 2.05 GZ
64 Bit Windows 8.1
Microsoft SQL Server 2014 - 12.0.2000.8 (X64) Express Edition (64-bit)
HDD Seagate ST1000DM003 1 TB
The server is located in Azure as VM Standard-Tier A3 running the pre-provided Windows Server 2012 R2 Datacenter image
Now we are facing a problem that the exact same query is running locally on the desktop 10 times faster than the on the server.
I connect to the pc with a local installed Management Studio via TCP/IP over our local network. When I connect to the server I use Remote Desktop connection and start a local instance of management studio on the server.
I have changed already the connection mode from default to TCP/IP on the server which brings me to the factor 10 times slower with default connection it will be 20 times slower. Even changing to named pipes the performance is worse.
Also rewriting the query and using different approaches, always the express version is much faster than the server. We did not do any configuration or tuning on the installation of the express version so on the server side.
Any comments a very appreciated!
Best
Simon
You should add the following at the top of the query to see where the differences are:
SET STATISTICS TIME ON
SET STATISTICS IO ON
Is your Local machine have SSD ? If it's the case, it's normal.
Try to rebuild indexes used.
Update the Database/Table statistics. The Execution Plan can be the same, but with bad stats, I've often saw very low performance. Especially if you make a lot of insert/delete.
You can see if something is wrong with SET STATISTICS IO ON. Look at the logical reads on tables, the orders of workfill tables, etc. Check if it's different from the local server.

Windows server 2008 uptime

I am deploying a critical care client-server application on Windows server 2008. We have a requirement saying the server must be running without restart for atleast 6 months. Although we ensure this reliability on the software which we are developing, I am not sure if windows server 2008 promises this uptime. Can anybody here help me on the following questions:
1) Can windows server 2008 R2 run without restart for 6 months?
2) If it can run for 6 months, is there any know resources penalty?
3) Is there any stranded mitigation provided by Win server 2008 to ensure this (some kind of OS handle leaks cleanup, memory cleanup etc?
4) What is the best way to enusre high availability on win server 2008.
Well please note some of the constrains:
1) I cant move to any other OS as Win server 2008 is part of our requirement.
2) Techniques like a additional standby/backup server is not feasible
I know of at least on Win2008 machine which has been running since
2008 (not production!)
There are no resource penalties in Win2008 itself
Buggy apps will do buggy things. Its arguable that the OS should not
do anything about leaks.
Don't put buggy apps on them.
Note if you want 100% uptime, you can also never apply Windows Updates. Set a reasonable limit which allows some hours downtime a year: 9 hours downtime/year is 99.99% uptime. Not bad.

MAXDOP is set to 0, however, all transactions run in serial

The server setting for MAXDOP is set to 0 and the threshold is default of 5.
All transactions run against the server run in serial and not against multiple cores/cpus (Virtual Machine and it has 8 CPUs).
Server is Windows Server 2008 R2 Enterprise x64 and SQL Server 2008 R2 Enterprise x64.
There is also a "default" and an "internal" workload group on the machine but both resource governors are not enabled and even disabled, they have MAXDOP setting of 0.
I've confirmed that SQL Server has the CPU affinity across all cores/cpus.
I'm kind of lost as to why this server refuses to run transactions in parallel as opposed to all the other machines at this location. I came in noticing that many of the servers here had long CXPACKET wait times and many processes were causing wasted CPU overhead. Then the DBA said after reading my evaluation There is nothing wrong with MAXDOP 0 and threshold of 5 because XXXX server never runs in parallel like you say.
I believe my evaluation of the site is still correct, but this darn server is debunking my evaluation.
I am open to all suggestions as to why this server is not configured and should run in parallel but it doesn't.