Questions tagged [maintenance-plan]

A Maintenance plan is any variety of scheduled maintenance to an object or item of equipment. In SQL Server a maintenance plan creates a workflow of the tasks required to make sure that the database is optimized, regularly backed up and free of inconsistencies.

105 questions
5
votes
1 answer

Migrating Maintenance Plan from One Sql Server 2008 Instance to Another

I have an extensive maintenence plan on one sql server 2008 instance that I wish to move to 4 other instances. What is the best way to do this other than rebuilding it on each server? Thanks
Josh
  • 16,286
  • 25
  • 113
  • 158
4
votes
1 answer

How SQL Server maintenance plans work in relation with Jobs and DTExec?

How SQL Server maintenance plans work in relation with Jobs and DTExec? I am specially interested in the maintenance plan's local connection which seems to be passed somehow to dtexec. I have read some docs but none of them is clear enough. As I…
IgnacioJ
  • 105
  • 11
4
votes
1 answer

E-mail Operator only on Maintenance Plan Failure

I know you can use Reporting and Logging wizard to setup a report e-mail for a maintenance plan, but is there a way to only send this out if there was a failure? I'm interested in receiving emails on errors for Back Up Database and Check Database…
SeanFromIT
  • 644
  • 1
  • 9
  • 18
4
votes
1 answer

postgres major upgrade (9.5.x to 9.6.x) within same data space

I was trying to upgrade my postgres installation from 9.5.7 to 9.6.5 My postgres database production instance has several databases and consumed ~700 GB space till now. pg_upgrade needs 2 different dir for old and new datadir. pg_upgrade -b…
PiyusG
  • 1,157
  • 16
  • 28
3
votes
1 answer

How to display Maintenance page for my application deployed in Tomcat?

Considering I have multiple applications deployed in Tomcat. I had planned for maintenance for a particular application. So I want to block the request for that particular application and redirect to a static page, informing the users it is in a…
3
votes
1 answer

SQL Server Maintenance Wizard Backup Plans

I used the SQL Server Maintenance wizard (along with a book) to generate both Full and Differentail backups. The Full backup runs on Monday morning and the Differentials run Tuesday through Saturday. The Full backup runs fine and generates the…
Dave Loeb
  • 65
  • 1
  • 4
3
votes
1 answer

Changing maintenance plan in SQL Server Management Studio

I have a maintenance plan that is set up to back up all of my 5 DB's every day. I do not need to backup them all, only part of them. I don't want to create a new job as my website is old and I don't want to make significant changes (moreover, I am…
erap129
  • 910
  • 1
  • 8
  • 17
3
votes
2 answers

MS SQL query slow because of bad plan or fragmented indexes

I have a stored procedure which usually runs pretty quickly (hardly a few seconds), but then there are odd days where the same proc with the same parameters takes minutes to execute. But if I defrag the indexes at this point, it starts running…
3
votes
1 answer

SQL Maintenance Plan - End Task

Is there any way to stop a maintenance plan after it has been triggered? I have one that is running in Production and need to stop is ASAP. Appreciate any suggestions/ideas. Thanks!
slayernoah
  • 4,382
  • 11
  • 42
  • 73
3
votes
1 answer

How running a program or PowerShell script, after the "SQL Server Maintenance" plan ended?

I need to execute/launch a PowerShell script after my maintenance plan did some work on my database. Is this possible?
scmbgx
  • 71
  • 1
  • 11
3
votes
1 answer

Notify operator task vs. notify if job fails

In a maintenance plan, I can create a Notify Operator task to run on the success or failure of any task in my maintenance plan. There is also the option to notify if an SQL Server Agent job fails, so I can enable this on the job connected to the…
johnmcp
  • 891
  • 1
  • 10
  • 17
2
votes
2 answers

SQL Server Maintenance Suggestions?

I run an online photography community and it seems that the site draws to a crawl on database access, sometimes hitting timeouts. I consider myself to be fairly compentent writing SQL queries and designing tables, but am by no means a DBA... hence…
klkitchens
  • 1,202
  • 2
  • 16
  • 39
2
votes
3 answers

Upon creating a Maintenace Plan in SSMS 17.6, SSMS automatially restarts upon attempting to schedule the task to run

The architecture is Server 2016 with SQL 2016 Standard. SSMS has been set to run as administrator. SSMS 17.6 has been installed and re-installed. All Microsoft updates have been installed to the serer and the application. Creating a Maintenance…
Kurwin
  • 21
  • 2
2
votes
0 answers

What routine maintenance do you run on your Azure servers?

I'm part of a team that maintains 20+ Azure servers. Most of the servers are running 24-7 so we do not have weekly scheduled maintenance or anything. Most virtual machines are Windows Server 2012, we have a few fairly active database servers…
joelp2600
  • 41
  • 2
2
votes
1 answer

SQL Server Maintenance plan history check for success or failure

When users log into a my application which connects to a Microsoft SQL Server database, I want to add an alert which checks if their nightly maintenance plan failed or did not run. Using SQL, how can I check when a given maintenance plan was last…
Moon
  • 1,141
  • 2
  • 11
  • 25