Showing posts with label deleting. Show all posts
Showing posts with label deleting. Show all posts

Wednesday, March 7, 2012

Maintenance plans not deleting old transaction log backups

I'm the dba for a large company and have setup many maintenance plans for our sql servers. One of the options I have set is to delete old backups of databases and transaction logs after 2 days. For some reason, the old database backups are being deleted, but the old transaction logs backups are not. I have them being put in the same directory. Anybody have any ideas why this is happening and what if any fix is available?

Those are separate items that you check off in the options for each step - are you sure you asked the wizard to do that? If possible, drop the old plans and recreate them, checking that section to make sure you select that option.

Other than missing the check box, I don't know what else might cause this. Both delete operations use the same delete stored procedure, so if one works, the other one should.

If you do change your plans and this happens again, check the event logs and the SQL Server error logs.

Saturday, February 25, 2012

Maintenance Plans - Restrict users from deleting or editing

Hi,
Is it possible to restrict users that use Enterprise Manager from deleting
maintenance plans? Could anyone please point me to a good URL that talks
about this.
thanks a lot,1) Try placing strict security on the msdb tables related to jobs/plans?
2) Not sure if you can do this but possibly triggers on same tables to check
login and rollback if appropriate.
TheSQLGuru
President
Indicium Resources, Inc.
"Uday" <Uday@.discussions.microsoft.com> wrote in message
news:60A6EF35-0306-428E-993B-04A76B9484B8@.microsoft.com...
> Hi,
> Is it possible to restrict users that use Enterprise Manager from deleting
> maintenance plans? Could anyone please point me to a good URL that talks
> about this.
>
> thanks a lot,
>

Maintenance Plans - Restrict users from deleting or editing

Hi,
Is it possible to restrict users that use Enterprise Manager from deleting
maintenance plans? Could anyone please point me to a good URL that talks
about this.
thanks a lot,
1) Try placing strict security on the msdb tables related to jobs/plans?
2) Not sure if you can do this but possibly triggers on same tables to check
login and rollback if appropriate.
TheSQLGuru
President
Indicium Resources, Inc.
"Uday" <Uday@.discussions.microsoft.com> wrote in message
news:60A6EF35-0306-428E-993B-04A76B9484B8@.microsoft.com...
> Hi,
> Is it possible to restrict users that use Enterprise Manager from deleting
> maintenance plans? Could anyone please point me to a good URL that talks
> about this.
>
> thanks a lot,
>

Maintenance Plans - Restrict users from deleting or editing

Hi,
Is it possible to restrict users that use Enterprise Manager from deleting
maintenance plans? Could anyone please point me to a good URL that talks
about this.
thanks a lot,1) Try placing strict security on the msdb tables related to jobs/plans?
2) Not sure if you can do this but possibly triggers on same tables to check
login and rollback if appropriate.
--
TheSQLGuru
President
Indicium Resources, Inc.
"Uday" <Uday@.discussions.microsoft.com> wrote in message
news:60A6EF35-0306-428E-993B-04A76B9484B8@.microsoft.com...
> Hi,
> Is it possible to restrict users that use Enterprise Manager from deleting
> maintenance plans? Could anyone please point me to a good URL that talks
> about this.
>
> thanks a lot,
>

Maintenance Plans

We just started using DPM 2007 to backup our 2005 DB's so I am deleting the
backups in the maintenance plans. Should I go back in and have any regular
maintenance on DB's like Shrink or Reorganize or is just backing up using DPM
ok?
DPM only does backups and AFAIK it also takes care of the retention period
as well. But it does not handle any other routine database functions such as
CHECKDB's, Reindexing etc. so you still have to do that yourself. And
shrinking should not be one of them.
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Robert" <Robert@.discussions.microsoft.com> wrote in message
news:ED8523CE-150E-4576-AFF0-0D9AD6B89EAB@.microsoft.com...
> We just started using DPM 2007 to backup our 2005 DB's so I am deleting
> the
> backups in the maintenance plans. Should I go back in and have any regular
> maintenance on DB's like Shrink or Reorganize or is just backing up using
> DPM
> ok?
>
|||Thanks Andrew. What is typical for a maintenance plan, there are many options
in the Admin. Studio.
I just set one up to:
Check Integrity
Reorg Index
Update Stats
Clean up history
Maintenance Cleanup
"Andrew J. Kelly" wrote:

> DPM only does backups and AFAIK it also takes care of the retention period
> as well. But it does not handle any other routine database functions such as
> CHECKDB's, Reindexing etc. so you still have to do that yourself. And
> shrinking should not be one of them.
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Andrew J. Kelly SQL MVP
> Solid Quality Mentors
>
> "Robert" <Robert@.discussions.microsoft.com> wrote in message
> news:ED8523CE-150E-4576-AFF0-0D9AD6B89EAB@.microsoft.com...
>
|||Thanks Tibor. I will get to reading to better understand what each does.
"Tibor Karaszi" wrote:

> By understanding what each option do, you can decide which options are suitable for a particular
> installation.
> For instance, Maint Cleanup can be critical if you also do backup and don't have other means to
> remove old backup files.
> Or, Reorg can be important to reduce fragmentation, but since the maint plan's reorg is stupid and
> don't take into account initial fragmentation one might want to skip this step and do it yourself
> (smarter). Or perhaps not at all, if fragmentation don't cost you.
> etc...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Robert" <Robert@.discussions.microsoft.com> wrote in message
> news:29C1FCC7-A476-4474-AB91-541A8CC16C00@.microsoft.com...
>

Maintenance Plans

We just started using DPM 2007 to backup our 2005 DB's so I am deleting the
backups in the maintenance plans. Should I go back in and have any regular
maintenance on DB's like Shrink or Reorganize or is just backing up using DPM
ok?DPM only does backups and AFAIK it also takes care of the retention period
as well. But it does not handle any other routine database functions such as
CHECKDB's, Reindexing etc. so you still have to do that yourself. And
shrinking should not be one of them.
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Robert" <Robert@.discussions.microsoft.com> wrote in message
news:ED8523CE-150E-4576-AFF0-0D9AD6B89EAB@.microsoft.com...
> We just started using DPM 2007 to backup our 2005 DB's so I am deleting
> the
> backups in the maintenance plans. Should I go back in and have any regular
> maintenance on DB's like Shrink or Reorganize or is just backing up using
> DPM
> ok?
>|||Thanks Andrew. What is typical for a maintenance plan, there are many options
in the Admin. Studio.
I just set one up to:
Check Integrity
Reorg Index
Update Stats
Clean up history
Maintenance Cleanup
"Andrew J. Kelly" wrote:
> DPM only does backups and AFAIK it also takes care of the retention period
> as well. But it does not handle any other routine database functions such as
> CHECKDB's, Reindexing etc. so you still have to do that yourself. And
> shrinking should not be one of them.
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Andrew J. Kelly SQL MVP
> Solid Quality Mentors
>
> "Robert" <Robert@.discussions.microsoft.com> wrote in message
> news:ED8523CE-150E-4576-AFF0-0D9AD6B89EAB@.microsoft.com...
> > We just started using DPM 2007 to backup our 2005 DB's so I am deleting
> > the
> > backups in the maintenance plans. Should I go back in and have any regular
> > maintenance on DB's like Shrink or Reorganize or is just backing up using
> > DPM
> > ok?
> >
> >
>|||By understanding what each option do, you can decide which options are suitable for a particular
installation.
For instance, Maint Cleanup can be critical if you also do backup and don't have other means to
remove old backup files.
Or, Reorg can be important to reduce fragmentation, but since the maint plan's reorg is stupid and
don't take into account initial fragmentation one might want to skip this step and do it yourself
(smarter). Or perhaps not at all, if fragmentation don't cost you.
etc...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Robert" <Robert@.discussions.microsoft.com> wrote in message
news:29C1FCC7-A476-4474-AB91-541A8CC16C00@.microsoft.com...
> Thanks Andrew. What is typical for a maintenance plan, there are many options
> in the Admin. Studio.
> I just set one up to:
> Check Integrity
> Reorg Index
> Update Stats
> Clean up history
> Maintenance Cleanup
>
>
> "Andrew J. Kelly" wrote:
>> DPM only does backups and AFAIK it also takes care of the retention period
>> as well. But it does not handle any other routine database functions such as
>> CHECKDB's, Reindexing etc. so you still have to do that yourself. And
>> shrinking should not be one of them.
>> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
>> --
>> Andrew J. Kelly SQL MVP
>> Solid Quality Mentors
>>
>> "Robert" <Robert@.discussions.microsoft.com> wrote in message
>> news:ED8523CE-150E-4576-AFF0-0D9AD6B89EAB@.microsoft.com...
>> > We just started using DPM 2007 to backup our 2005 DB's so I am deleting
>> > the
>> > backups in the maintenance plans. Should I go back in and have any regular
>> > maintenance on DB's like Shrink or Reorganize or is just backing up using
>> > DPM
>> > ok?
>> >
>> >
>>|||Thanks Tibor. I will get to reading to better understand what each does.
"Tibor Karaszi" wrote:
> By understanding what each option do, you can decide which options are suitable for a particular
> installation.
> For instance, Maint Cleanup can be critical if you also do backup and don't have other means to
> remove old backup files.
> Or, Reorg can be important to reduce fragmentation, but since the maint plan's reorg is stupid and
> don't take into account initial fragmentation one might want to skip this step and do it yourself
> (smarter). Or perhaps not at all, if fragmentation don't cost you.
> etc...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Robert" <Robert@.discussions.microsoft.com> wrote in message
> news:29C1FCC7-A476-4474-AB91-541A8CC16C00@.microsoft.com...
> > Thanks Andrew. What is typical for a maintenance plan, there are many options
> > in the Admin. Studio.
> >
> > I just set one up to:
> > Check Integrity
> > Reorg Index
> > Update Stats
> > Clean up history
> > Maintenance Cleanup
> >
> >
> >
> >
> >
> > "Andrew J. Kelly" wrote:
> >
> >> DPM only does backups and AFAIK it also takes care of the retention period
> >> as well. But it does not handle any other routine database functions such as
> >> CHECKDB's, Reindexing etc. so you still have to do that yourself. And
> >> shrinking should not be one of them.
> >> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> >>
> >> --
> >> Andrew J. Kelly SQL MVP
> >> Solid Quality Mentors
> >>
> >>
> >> "Robert" <Robert@.discussions.microsoft.com> wrote in message
> >> news:ED8523CE-150E-4576-AFF0-0D9AD6B89EAB@.microsoft.com...
> >> > We just started using DPM 2007 to backup our 2005 DB's so I am deleting
> >> > the
> >> > backups in the maintenance plans. Should I go back in and have any regular
> >> > maintenance on DB's like Shrink or Reorganize or is just backing up using
> >> > DPM
> >> > ok?
> >> >
> >> >
> >>
> >>
>