Solved

SQL Server Maintenance Jobs

Posted on 2012-03-20
3
154 Views
Last Modified: 2012-04-10
Hi,
I have new SQL server systems. I am looking for all kind of maintenance procedures one can add to make it work better or prevent any issues.

Things like
- Truncating log files every night
- Rotaing SQL server logs each night

Could someone with hands on Sql experience list them here?

Thanks
0
Comment
Question by:crazywolf2010
  • 2
3 Comments
 
LVL 39

Assisted Solution

by:lcohan
lcohan earned 500 total points
ID: 37744762
SQL Maintenance task I would perform every night:

FULL DB backup - all db's
T-log backups - all DB's - this should relese used T-Log space as well
REINDEX and update STATS all DB's

Weekly/Monthly
I would run a DBCC CHECKDB on all DB's
0
 

Author Comment

by:crazywolf2010
ID: 37746236
Hi,
Would you able to share any scripts for
- REINDEX and update STATS all DB's
- DBCC CHECKDB on all DB's
0
 
LVL 39

Accepted Solution

by:
lcohan earned 500 total points
ID: 37747419
Sure - please see code from http://sqlfool.com/2011/06/index-defrag-script-v4-1/
for the reindex and as far as DBCC CHECKDB goes that could be done in a SQL job one step at a time per database and the command is just like that:


DBCC CHECKDB (your_db_name_here)
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 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

17 Experts available now in Live!

Get 1:1 Help Now