Network Management
Gracefully restart SQL service for Orion Database
This article provides steps on how to gracefully restart the SQL service hosting Orion DB, NTA DB or Orion Log DB
First published date
Last published date
Overview
This article provides steps on how to perform this maintenance activity.
Product section
Cause
- SQL DB Maintenance or SQL Server patching requiring reboot or restart of the SQL service
Resolution
1. If you have Solarwinds High Availability, then Disable HA (Customers who don't have High Availability should skip this step)
2. Shutdown all Solarwinds Orion Services including dependencies on Additional Pollers, Additional Web Servers and Main Pollers. Either via RDP to each server OR via Web console > All Settings > Product Specific Settings > Orion Service Manager.
Note: If you were accessing the web console via an Additional Web Server or Main poller, you will lose connectivity if you stop them first, so leave them for the end.
3. Restart the SQL service or reboot the SQL server. For details, refer to MS Documentation for SQL server maintenance. When the SQL server is back online - verify Orion DB / NTA DB / Orion Log DB are not in the Recovery state. They should all be online and ready.
Note: Customers who do not have all 3 databases can skip the relevant DB check part and if they are hosted on separate SQL server(s) then do the same checks to make sure the DB is showing online.
General best practices for SQL Server service restart:
Just make sure that you don't have any long-running transactions. Best is to restart SQL server using console or shutdown command during a low/minimum activity period also called maintenance window to minimize the impact on your business.
If you have any DR setup and you don't want to be down, the best is to failover and then restart the passive or secondary node.
Clean Shutdown SQL Server occurs in the below scenarios :
- Stop SQL server using Services console.
- Shutting down your server
- Running SHUTDOWN command in SSMS
In above all situations, SQL server will cleanly shutdown all its databases and then terminates the service which involves committing or rolling back all the transactions, writing all dirty pages to disk and then writing an entry into the transaction log.
Improper shutdown of sql server:
- Shutdown with nowait
- Pulling power cable from your server (if you have access).
- Killing sqlserver.exe from task manager
- Drive failure on which SQL server binaries, executables and system databases reside or Windows system drive(C:\) failure.
- Overheating of the server causes it to shutdown (should rarely happen !!)
SQL Server will always try to do a clean shutdown unless you do something improper as stated above.
Some really good reading links on what happens behind the scenes during the recovery phase :
- Understanding Logging and Recovery in SQL Server
- Understanding How Restore and Recovery of Backups Work in SQL Server
4. Start the Orion Services back on the Main poller first and then on each of the Additional poller(s), Additional Web Servers if you have them via Orion Service Manager.
5. Enable HA backNote: On NTA 4.4 and later, NTA / Flow DB is also hosted on SQL box, either on the same or different SQL server depending on your implementation.