Solved

checklist Sql server

Posted on 2016-09-14
5
37 Views
Last Modified: 2016-09-17
good evening

 someone would have some Sql script server to make a checklist to check on the health of the instance and the databases ?

 thank you
0
Comment
Question by:Alex
  • 2
5 Comments
 
LVL 45

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 167 total points
ID: 41799307
Too check the health of the databases run a DBCC CHECKDB command every day.
For the instances there's not much to do but monitoring the resources usage (CPU, RAM and Storage).
0
 
LVL 18

Accepted Solution

by:
Pawan Kumar Khowal earned 333 total points
ID: 41799312
There is sometimes the need to do a quick SQL Server healthcheck. Usually this is needed before a maintenance or a migration takes place or after a problem has been resolved. The time given to you for this typical healthcheck is usually short, so let’s see how you can do this in a quick and efficient manner:

 

Eventviewer

The Eventviewer tool is the first place you should look for Operating System level issues. Don’t waste too much time on the Application log, as the SQL Server messages you will find there, are duplicates of the messages you will also see at the SQL Server ERRORLOG. The System log is where you should put the focus on. I usually filter the log so that it shows only the Errors and Warnings – Information messages are useful for troubleshooting specialized issues and not for generic healthchecks. Error and Warning event sources that usually draw my attention are:

  NTFS

(possible NTFS corruption messages)

  Disk

(possible Storage issues)

  EventLog

(Unexpected shutdowns)

  Microsoft-Windows-WER-SystemErrorReporting

(Unexpected shutdowns)

  Microsoft-Windows-Kernel-Power

(Unexpected shutdowns)

 

ERRORLOG

These error log files are usually found here:

C:\Program Files\Microsoft SQL Server\<instance_name>\MSSQL\Log

They can be accessed from inside SQL Server Management Studio if you prefer so.

Messages that usually draw my attention are:

  All kinds of Errors (except login errors, which are usually spammed in the ERRORLOG)

  Any enabled trace flags (you will see them appear in this format: -TXXXX, where XXXX is a number)

  Any database corruption messages

Also these messages:

  A significant part of sql server memory has been paged out

(incorrect memory configuration)

  SQL Server has encountered x occurrence(s) of I/O requests taking longer than 15 seconds to complete on file

(storage performance issues)

  SQL Server is starting at high priority base

(priority needs to be changed back to normal)

  Deadlock encountered …. Printing deadlock information

(deadlock)

  deadlock-list

(deadlock)

 

Perfmon

You can use these steps to quickly check if your SQL Server has any performance issues:

http://blogs.msdn.com/b/john_daskalakis/archive/2013/10/14/how-to-troubleshoot-sql-server-performance-issues-with-simple-tools-part-2-how-to-analyze-the-perfmon-trace-and-detect-io-bottlenecks.aspx

 

The above checks should not take more than 30-40 minutes to complete.
0
 
LVL 18

Assisted Solution

by:Pawan Kumar Khowal
Pawan Kumar Khowal earned 333 total points
ID: 41799315
This is quite a large topic. You have to monitor lots of performance counters, as well as other information like wait and file stats from inside SQL to really get a good server "health check".

If by a health check, you mean checking the consistency of the database. Then you would need to run a DBCC CHECKDB against the database. This would definitely affect performance if the database is a highly transactional database due to kind of locks the consistency check needs to acquire while performing the operation and also the IO done on the database would increase.

Normally when I perform a health check I usually do a number of things. You can get a good start by running the SQL Server Best Practice Analyzer : against your servers.

In case you want to check the performance metrics for the database. Eg. The most expensive queries executed against the database w.r.t. to I/O or CPU or Duration. Then you could use Performance Dashboard.
0
 

Author Closing Comment

by:Alex
ID: 41802949
thank's
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now