Posts

Showing posts with the label SQL Server: Troubleshoot

Resolving SQL Server Service Cannot Stop and Stuck in Change Pending State

Image
Sometimes in a busy server and high workload a rare event could happen when you want to stop SQL Service from either SQL Server Configuration Manager or Command Prompt. The SQL Service is stuck in Change Pending state but you can still login to SQL Server. It might look like the picture below. When this kind of thing happens, then login to SSMS with sysadmin role and then execute the following SQL Query Command: SHUTDOWN WITH NOWAIT Then the SQL Server Service will be stopped. After that you can continue to start the SQL Server Service again. This command will do the following: SQL Server exits after attempting to terminate all user processes. When the server restarts, a rollback operation occurs for incomplete transactions. This part of the solution is following Microsoft Documentation:  SQL Server Shutdown And that's all for stopping SQL Server in Change Pending State

Resolving Database with State SUSPECT in AlwaysOn AG Secondary Node

If you notice that there is a database in secondary node in your AlwaysOn Availability Group SQL Server that has state "Not Synchronizing/Suspect" then its data movement is in error state and you might notice the huge growth in log file size either in Secondary or Primary. The thing is, you might need to resolve this issue quickly and after that try to troubleshoot what is the cause of the issue. Here is the step on how to resolve this issue if it happens.

SQL Server Performance Monitor and PAL

Image
Sometimes we want to know the performance of the server that host SQL Server or even check the performance of SQL Server itself for a period of time. One way of doing it is by using the Performance Monitor tool which is available on the Windows Server and we can schedule this tool to capture the data (which is called performance counter) to later be analyzed using PAL tools. For this part, you need to download PAL tool first and install it on your windows: PAL Tool (you can download the PAL 2.8.2.1 installer from the github) Here are the steps that can be followed to setup Performance Monitor and Use PAL Tool.

Troubleshoot SQL Server Connection

Image
Cannot Connect to SQL Server Sometimes after you install/setup SQL Server and trying to connect to the server you might face this problem: A network-related or instance-specific error occured while establishing a connection to SQL Server. The server was not found or was not accessible. This is a very common problem that often occurs and it is related to the user trying to connect to the SQL Server but cannot find the server or it is not accessible from the user's current connection. So on this docs I will show you how to troubleshoot this problem: 1. Check the Instance Name or IP Address Before we proceed further, make sure that you typed the correct SQL Server instance name or IP Address which you are trying to connect to. If it's a typo then everything should just be fine after you input the right name or IP Address 2. Check SQL Server Protocol and Port Go to the Server which host the SQL Server instance, and then go to SQL Server Configuration Manager. Make sure the protocol...