In the context of a database, maintenance describes routine operational tasks around a database system, such as monitoring, tuning and backup procedures.

learn more… | top users | synonyms

4
votes
1answer
263 views

Reindexing plan [closed]

I have a reindexing plan failing with error message: Refresh failed for PhysicalPartition '1' (Details: SQL Server Enterprise edition running in cluster.) Searching through BOL and other ...
2
votes
1answer
447 views

Disadvantages of reorganizing all tables nightly

I consider scheduling a SQL Server job that reorganizes all tables nightly. We don't have enterprise, so we cannot rebuild online (this means we need to reorganize). We also don't want to invest too ...
5
votes
1answer
2k views

How can I fix “Cannot perform a differential backup … a current database backup doesn't exist”?

We recently switched to the FULL recovery model, with full backups being done every weekend, and differentials being taken every day. The problem is, the differential backups don't always seem to ...
3
votes
2answers
3k views

Shrink database operation in maintenance plan failed

See updates below I have a nightly DB maintenance plan and it's causing some strange behaviour. About 1 out of 10 runs it causes the DB to not response to queries. It takes about 5 minutes for the ...
5
votes
2answers
144 views

Thought about this SQL Server backup plan?

I just started a new job, and I'm reviewing the database maintenance plan. I've got quite a bit of experience writing SQL, but not much experience with DB administration. My last job was at a large ...
2
votes
2answers
5k views

Do I need to RUNSTATS after a REORG in DB2?

The REORG documentation says: BUILD Builds indexes. Updates index statistics. But I have always heard REORG/RUNSTATS as if they should be paired. Can anyone verify that "Updates index ...
1
vote
1answer
1k views

Use of Shrink after rebuilding Indexes in sql server 2005

I need to create a weekly database plan for my company's databases (5.8Gb), now I want to rebuild the Indexes, and then want to trigger a Shrink operation. Now I know Shrink creates Index ...
5
votes
3answers
466 views

Database Indexing - Maintenance Jobs

I have created a script that runs every night to rebuild & re-organize indexes based on the fragmentation, Indexes with Fragmentation > 30% are rebuilt, Indexes with Fragmentation 10% - 30% are ...
2
votes
1answer
499 views

Database design with different user roles connected by different relationships to one organizaiton table

An user is connected to an organization by some role. Lets say there are 2 roles freelancer and employee. One employee can only be a part of one organization and if he is an employee then he can't be ...
0
votes
2answers
957 views

Can you set up a SQL server maintenance plan to restore a database?

I am looking to setup a maintenance plan that makes a backup of a database (Database1) and then restores to another database (Database2) to confirm that it is able to restore successfully. Can I do ...
0
votes
0answers
641 views

Unable to view “Maintenance Plan” folder under Maintenance in SQL Server 2008 R2 Standard Edition

SQL Server version is as follows : Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86) Copyright (c) Microsoft Corporation Standard Edition on Windows NT 5.2 (Build 3790: Service ...
6
votes
1answer
451 views

Can I “Execute T-SQL Statement Task” against all user databases?

I'm setting up a maintenance plan on Sql Server. I want to add an Execute T-SQL Statement Task to the plan, however I do not see any way to set this task to run in every [user|system|all] database as ...
2
votes
1answer
4k views

SQL Server 2008 - Run the Check Database Integrity Task with the PHYSICAL_ONLY option?

As part of our nightly maintenance, we include the Check Database Integrity Task which is an encapsulation of the DBCC CHECKDB command. It's beginning to take a considerable amount of time due to the ...
2
votes
2answers
544 views

Reorganize Indexes T-SQL

I'm moving a database to SQL Azure and with that I lose the maintenance plans so I am going to use a Worker Role to schedule them. When I open the properties of the Rebuild Index Task and click on ...
2
votes
0answers
516 views

How to do automated archiving for a SQL Server database based on interpretation of database metadata?

I am looking for a solution giving me automated archiving of SQL Server databases based on a smart interpretation of table relationships that is able to archive records from related tables minimizing ...
4
votes
3answers
1k views

Should we need to use Barriers on a production database (MySQL/InnoDB)?

Even though we are using a journaling filesystem (EXT3) with barrier enabled, is this still safer and recommended? e.g mount -o barrier=1 /dev/sda /mntpnt Reference: ...
3
votes
1answer
921 views

Daily database maintenance using SQL Server 2008 and a stored procedure

I have created a database maintenance plan using wizard though that link for SQL Server 2005. I have created a Maintenance Plan for SQL Server 2008 and it works fine. Now I required to complete the ...
11
votes
2answers
15k views

When To Update Statistics?

I've inherited a Maintenance Plans that does the following: Cleanup old data Checks DB integrity Performs Database and Transaction Log Backups Reorganizes Our indexes Updates Statistics Delete old ...
3
votes
1answer
2k views

Executing the query “UPDATE STATISTICS [dbo].[Contact] WITH FULLSCAN …” failed

My maintenance plan fails with the following error on one of my databases does anyone know how I can fix this problem? is is a corrupt table? Executing the query UPDATE STATISTICS [dbo].[Contact] ...
3
votes
1answer
803 views

Need advice for a 'tag' table design

My website has different content types. All content types should be tag-able (except if specified in the model, whatever). I can think of 2 options for my design: 2 tables option : 1 table for the ...
2
votes
2answers
227 views

Is it possible to retrieve the specific databases selected in a maintenance plan step?

I would like to use a tsql query to retrieve the databases involved in one of the steps in a database backup plan I've created. From a previous question, I understand that somehow, the data is ...
1
vote
1answer
207 views

How to know there is a maintenance job running on a postgresql database

I have a python script on postgresql database which is fetching records from sql server database and inserting it to postgresql DB after some filtering. this jobs is running by cron every two minutes. ...
3
votes
1answer
132 views

Thoughts about Oracle backup procedure for 11.2 (beginner question)

Two days ago we "found out" that our old, not taken care of, horribly neglected, Oracle DB server was extremely important to our business. The only person who knew anything about this server was ...
18
votes
4answers
17k views

When is it OK to shrink a Database?

I know shrink is the devil: It reverses page order and is responsible for skin cancer, data fragmentation, and global warming. The list goes on... That being said, say I have a 100 GB database and I ...
1
vote
2answers
799 views

Backup database and clean old backup question

Right now we have a maintenance plan which looks like this: backup all databases clean old backups (> 24 hours) This job runs every day. Every now and then this script crashes during backup step ...
1
vote
1answer
76 views

Log Custom SQL Results During Maintenance Plan

I would like the last step of my Maintenance Plan to execute a simple custom SQL script (SELECT * FROM <SomeTable> WHERE <Condition>), and save the results to a file (Text, CSV, etc). Is ...
2
votes
1answer
505 views

Maintenance Plan Takes Too Long - Locks Tables - Indexing To Blame

System: I have a Maintenance Plan that Rebuilds Indexes for Several Tables (10 tables, 50M records total). Issue: During the Index Rebuild (~20 minutes), we fail to insert data into the DB ...
0
votes
0answers
569 views

Update Statistics Maintenance Plan - Ambiguous column name error

Microsoft SQL Server 2008 R2 Web Edition (RTM) - 10.50.1600.1 (Intel X86) Windows 2003 R2 SP2 I am in the process of setting up a maintenance plan to update statistics on a daily basis for all user ...
1
vote
1answer
77 views

Where and with what should I be looking for a good hardware backup tool?

Until now, I was doing my SQL Backups using USB Hard disk, and copying that to my local computer. After that, I went zipping and burning onto DVDs. Now I want to push that on more professional and ...
1
vote
4answers
653 views

Maintenance Plan for all Online databases doesn't execute for all databases

Using SQL Server 2008 R2, I have a maintenance plan that has a basic Backup All Databases (ignore offline) task, and clean up after 7 days. However, I note that sometimes I lack backups for ...
7
votes
2answers
1k views

Defragmentation - Rebuilding Indexes SQL Server 2005

I'm researching defragmenting databases and it seems the following SQL statement is what I'm looking for: ALTER INDEX ALL ON mytablename REBUILD WITH(ONLINE = ON) When I pull the info from ...
6
votes
4answers
2k views

How does SQL Server reduce index fragmentation?

If a user never runs REBUILD or REORGANIZE on their database, does SQL Server still somehow defragment the indexes? MSDN suggests that if an index is over 30% fragmented, it is recommended to run ...
9
votes
1answer
5k views

PostgreSQL Database Data File Integrity Check

When running a PostgreSQL database system how do I know my database as a whole has 100% integrity? Basically how do I know if my data files and pages are all 100% good with no corruption? In the ...
-2
votes
1answer
186 views

SQL Server reports for management

I have been placed in charged of overseeing our DB and web servers (SQL Server 2005/2008.) Not being a technical person, what reports should I request on a weekly/monthly basis to asses the health of ...
1
vote
1answer
913 views

How often should I run integrity and consistency checks on SQL Server 2008?

Before updates of our application, I run some checks on the database like CheckAllocations and CheckCatalog, so I know the database is in good shape before the update scripts get executed. What is ...
7
votes
1answer
2k views

Compact Large Objects in Reorganize Index task

I'm setting up a maintenance plan in SQL Server 2008 R2. On the Reorganize Index Task it has an option for "Compact Large Objects". What does that mean and do I want to turn it on?
5
votes
4answers
4k views

SQL Rebuild Index, Recovery Model, and db log filesize?

I have a database that we currently run transaction log backups throughout the day, every 30 minutes to be exact, and we run a full backup each day at 2am. Every Saturday at 3am, we have a job setup ...
2
votes
1answer
1k views

Maintenance Plan fails but the query it generates Runs

I have an SQL Server 2005 Enterprise Edition whose Maintenance plan fails constantly with the error: backup MYSERVER (MYSERVER) Backup Database on MYSERVER Databases that have a compatibility level ...
13
votes
5answers
7k views

Does restarting SQL Server speed it up?

I have noticed that some DBAs restart SQL Server very frequently, sometimes even nightly. I believe they do it to free up some memory, or perhaps to speed up queries too. I know that after a restart ...
8
votes
2answers
7k views

Difference Between Row Level and Page Level Locking and Consequences

When attempting to run my Maintenance Plan, I receive the following error: Executing the query "" failed with the following error: "The index "" (partition 1) on table "" cannot be reorganized ...
9
votes
5answers
521 views

SQL Server Backups - A couple of questions

We run our weekly backup job at 9pm on Fridays and we are experiencing a couple of issues with regard to disk space (which gets perilously low at times) and performance. We're looking at ...
0
votes
0answers
219 views

changing fill factor on msrepl_command db in distribution

I can't think of any reason why you couldn't change the fill factor on the table without any issues, but I've never change the fill factor on a system table before and would like to know if anyone has ...
10
votes
6answers
3k views

SQL Server Checklists

Following up from my other question, I would like to start thinking about what I should take a look at on daily/weekly/monthly bases in terms of alerts. I am hoping to be able to see problems coming ...
10
votes
3answers
5k views

What does a best-practice SQL Server maintenance plan look like? [closed]

I am a student from Fontys University in Eindhoven, and I am currently carrying out a series of interviews to help with the development of a SQL Server tool and I would like to get feedback from the ...
17
votes
4answers
12k views

When should I rebuild indexes?

When should I rebuild the indexes in my relational database (e.g. SQL Server)? Is there a case for rebuilding indexes on a regular basis?
2
votes
4answers
9k views

No Maintenance Plans Folder in SQL Studio 2008 R2 [closed]

A client has SQL Server 2008 R2 installed on a Windows 2003 R2 32-bit server. Under Management in SQL Studio 2008 R2, there is no maintenance plans folder. It is not under Management --> Legacy ...
7
votes
3answers
412 views

What are best practices for safely permanently deleting a database?

We have an "organic" environment, meaning people piled code on code for ten years with minimal oversight or documentation. The server I use has several databases which I believe are no longer being ...
3
votes
1answer
1k views

In MS SQL how do I find out what tables have not been queried or updated in a long time?

I'm maintaining a database that is being shared by a few systems. Over the years a few of those systems have been deprecated and lots of the tables are actually orphaned. Is there a query I can run to ...
17
votes
4answers
45k views

Sql Server Maintenance Plan - Best Practices on Tasks and Scheduling

I am tasked with devising a maintenance plan for our Sql Server 2005 databases. I know for backups I want to do a daily full database backup and transactional log backups every 15 minutes. My problem ...
2
votes
1answer
3k views

Location of Maintenance Plan's Back Up Database Tasks information (SQL Server 2005)

I would like to know where in the database or on the file system the information about Back Up Database Task in the Maintenance Plans Tasks. I can find the Job in msdb.dbo.sysjobs I can find the ...