Re: Periodic maintenance like sp_delete_backuphistory?

From: Mark Allison (marka_at_no.tinned.meat.mvps.org)
Date: 10/04/04


Date: Mon, 4 Oct 2004 17:49:53 +0100

Michael ,

Have a look at the sizes of your system databases. msdb on one of my servers
is 900MB. That's all down to DTS packages though (mostly). SQL Server does a
pretty good job of clearing up after itself. You may want to have a quick
look in the Logs folder, and if you use replication, the REPLDATA folder.
Also, check that the Windows Event log is big enough - you can size that in
Administrative Tools outside of SQL Server.

The biggest bangs for your buck for your housekeeping expedition might be to
manage your user databases' audit tables - possibly even create a process
where your data gets horizontally partitioned and moved to another
historical database. This will improve performance in your main user
database.

--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
"Michael Bourgon" <bourgon@gmail.com> wrote in message
news:558b578d.0410040819.4df8846f@posting.google.com...
> I'd like to remove any cruft that's built up in the system over the
> last couple of years.  Obviously there's old information no longer
> needed, I'm just not sure what is there.
>
> I've been cleaning up backup history in MSDB with
> sp_delete_backuphistory (leaving the last year's data) - what else is
> there?
>
>
> P.S. to anyone else who needs to use sp_delete_backuphistory - if you
> have a lot of backups, you really need to add some indexes, otherwise
> it'll take days to remove the history.  Go through the SP and figure
> out which tables/fields you need to index, as there are several.  The
> biggies are (in multiple tables) media_set_id, backup_set_id, and
> restore_history_id.


Relevant Pages

  • Re: Move databases between servers
    ... Tell me why you need to move master, msdb, and model? ... When you restore databases on your other server SQL Server adds ... If you have lots of jobs defined you could try restoring MSDB. ...
    (microsoft.public.sqlserver.setup)
  • Re: How to move system databases to new SAN drive in cluster serve
    ... I have moved model, msdb, and tempdb on a cluster ... Moving SQL Server databases to a new location with Detach/Attach ...
    (microsoft.public.sqlserver.clustering)
  • Re: Migrate stand alone sql server to a cluster without downtime
    ... Use backup and restore to create the databases on the new system. ... Run a log backup WITH STANDBY on each database on the old server. ... I support the Professional Association for SQL Server ...
    (microsoft.public.sqlserver.clustering)
  • Re: SPS 2003 Portal change SQL server
    ... select portal site to delete and choose to NOT delete the databases ... server farm, you can just copy them over. ... attach the databases to the new sql server. ...
    (microsoft.public.sharepoint.portalserver)
  • Re: AS2005 ... what is wrong with it?
    ... What I have seen is that the dev server is *faster* than the prod server ... And does your dev server also have all 6 databases with all these roles? ... When I restore the "PROV" i got approx 20 sec. ... Starting from an empty data folder should show if this theory is true ...
    (microsoft.public.sqlserver.olap)