Solved

SQL Server Maintenance Jobs

Posted on 2012-03-20
3
162 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 40

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 40

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
converting integer data type to time data type in sql 4 44
sql query help 15 51
How can I get the entire database script? 7 24
find SQL job run average duration 24 54
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

763 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