Showing posts with label maintenance. Show all posts
Showing posts with label maintenance. Show all posts

Tuesday, March 27, 2012

deleting old backups/trn files.

i have a maintenance plan running on my database, in which I told the wizard, on creation, to "remove files older than 4 week" and yet it doesn't seem to be doing so, as on checking this morning, diskspace was getting low, due to over 300gb of backups and trn' dating back to september.

Anyone have ny problems with maintenance plans not cleaning up when told?

ano because I do not use them. I create my own jobs.|||Maintenance plans are nothing but wizards that create SQL Agent jobs. If the job is modified, the maintenance plan has no clue that anything has changed, and if the maintenance plan is re-edited it will overwrite any other changes made to the jobs.
Maintenance plans are top candidates for the most confusing and misleading functionality within SQL server. I avoid them, except as a means of defining groups of databases for administrative purposes.
Open up the job in SQL Agent and check the code that is being run. It should be something like "EXEC xp_sqlmaint '-PlanID 02A52657-D546-11D1-9D8A-00A0C9054212...".
Post it here.|||here you go...

EXECUTE master.dbo.xp_sqlmaint N'-PlanID 2A998DBD-3F5D-4685-ACCA-70354638C8C5 -Rpt "D:\mssql\REPORTS\live DB Maintenance4.txt" -WriteHistory -VrfyBackup -BkUpOnlyIfClean -CkDBRepair -BkUpMedia DISK -BkUpDB "D:\mssql\BACKUP" -DelBkUps 4WEEKS -CrBkSubDir -BkExt "BAK"'|||There is an additional parameter for specifying deletion of reports, and for some reason this parameter is left out of the sql_maint documentation in Books Online. I am thinking it is "-DelRpts 4WEEKS", but I am not sure. I will look it up for you once I get back to my office.

Deleting Old .BAK file Problem

Hello,
My Backup Maintenance Plan is scheduled to delete old
backup (.BAK) files but for some odd reason it cannot
delete two old files. When i go in to delete them manually
or check the security settings ,but give me an access
denied prompt. I am logged in as Administrator w/ full
rights, but only these files are giving me denied access.
Please help
Thanks in advance
ATHi,
Stop SQL Agent service and try deleting the file.
Thanks
Hari
MCDBA
"AT" <anonymous@.discussions.microsoft.com> wrote in message
news:dfa701c3f0a2$5230bd80$a301280a@.phx.gbl...
> Hello,
> My Backup Maintenance Plan is scheduled to delete old
> backup (.BAK) files but for some odd reason it cannot
> delete two old files. When i go in to delete them manually
> or check the security settings ,but give me an access
> denied prompt. I am logged in as Administrator w/ full
> rights, but only these files are giving me denied access.
> Please help
> Thanks in advance
> AT|||thanks hari, are there any contingencies incase this does
net work?
thanks
AT
>--Original Message--
>Hi,
>Stop SQL Agent service and try deleting the file.
>Thanks
>Hari
>MCDBA
>"AT" <anonymous@.discussions.microsoft.com> wrote in
message
>news:dfa701c3f0a2$5230bd80$a301280a@.phx.gbl...
>> Hello,
>> My Backup Maintenance Plan is scheduled to delete old
>> backup (.BAK) files but for some odd reason it cannot
>> delete two old files. When i go in to delete them
manually
>> or check the security settings ,but give me an access
>> denied prompt. I am logged in as Administrator w/ full
>> rights, but only these files are giving me denied
access.
>> Please help
>> Thanks in advance
>> AT
>
>.
>|||Hi,
Incase if this fail, check any other process uses this file. Mostly it will
be some backup processes (tape / disk copy).
Thanks
Hari
MCDBA
"AT" <anonymous@.discussions.microsoft.com> wrote in message
news:eb1101c3f0a9$58c30160$a601280a@.phx.gbl...
> thanks hari, are there any contingencies incase this does
> net work?
> thanks
> AT
> >--Original Message--
> >Hi,
> >
> >Stop SQL Agent service and try deleting the file.
> >
> >Thanks
> >Hari
> >MCDBA
> >
> >"AT" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:dfa701c3f0a2$5230bd80$a301280a@.phx.gbl...
> >> Hello,
> >>
> >> My Backup Maintenance Plan is scheduled to delete old
> >> backup (.BAK) files but for some odd reason it cannot
> >> delete two old files. When i go in to delete them
> manually
> >> or check the security settings ,but give me an access
> >> denied prompt. I am logged in as Administrator w/ full
> >> rights, but only these files are giving me denied
> access.
> >> Please help
> >>
> >> Thanks in advance
> >>
> >> AT
> >
> >
> >.
> >|||Hey thanks Hari for the replies...
But I was able to resolve the problem by doing a simple
sys reboot..
thanks again for your help..
AT
>--Original Message--
>Hi,
>Incase if this fail, check any other process uses this
file. Mostly it will
>be some backup processes (tape / disk copy).
>Thanks
>Hari
>MCDBA
>"AT" <anonymous@.discussions.microsoft.com> wrote in
message
>news:eb1101c3f0a9$58c30160$a601280a@.phx.gbl...
>> thanks hari, are there any contingencies incase this
does
>> net work?
>> thanks
>> AT
>> >--Original Message--
>> >Hi,
>> >
>> >Stop SQL Agent service and try deleting the file.
>> >
>> >Thanks
>> >Hari
>> >MCDBA
>> >
>> >"AT" <anonymous@.discussions.microsoft.com> wrote in
>> message
>> >news:dfa701c3f0a2$5230bd80$a301280a@.phx.gbl...
>> >> Hello,
>> >>
>> >> My Backup Maintenance Plan is scheduled to delete old
>> >> backup (.BAK) files but for some odd reason it cannot
>> >> delete two old files. When i go in to delete them
>> manually
>> >> or check the security settings ,but give me an access
>> >> denied prompt. I am logged in as Administrator w/
full
>> >> rights, but only these files are giving me denied
>> access.
>> >> Please help
>> >>
>> >> Thanks in advance
>> >>
>> >> AT
>> >
>> >
>> >.
>> >
>
>.
>

Deleting Old .BAK file Problem

Hello,
My Backup Maintenance Plan is scheduled to delete old
backup (.BAK) files but for some odd reason it cannot
delete two old files. When i go in to delete them manually
or check the security settings ,but give me an access
denied prompt. I am logged in as Administrator w/ full
rights, but only these files are giving me denied access.
Please help
Thanks in advance
ATHi,
Stop SQL Agent service and try deleting the file.
Thanks
Hari
MCDBA
"AT" <anonymous@.discussions.microsoft.com> wrote in message
news:dfa701c3f0a2$5230bd80$a301280a@.phx.gbl...
> Hello,
> My Backup Maintenance Plan is scheduled to delete old
> backup (.BAK) files but for some odd reason it cannot
> delete two old files. When i go in to delete them manually
> or check the security settings ,but give me an access
> denied prompt. I am logged in as Administrator w/ full
> rights, but only these files are giving me denied access.
> Please help
> Thanks in advance
> AT|||thanks hari, are there any contingencies incase this does
net work?
thanks
AT
>--Original Message--
>Hi,
>Stop SQL Agent service and try deleting the file.
>Thanks
>Hari
>MCDBA
>"AT" <anonymous@.discussions.microsoft.com> wrote in
message
>news:dfa701c3f0a2$5230bd80$a301280a@.phx.gbl...
manually
access.
>
>.
>|||Hi,
Incase if this fail, check any other process uses this file. Mostly it will
be some backup processes (tape / disk copy).
Thanks
Hari
MCDBA
"AT" <anonymous@.discussions.microsoft.com> wrote in message
news:eb1101c3f0a9$58c30160$a601280a@.phx.gbl...
> thanks hari, are there any contingencies incase this does
> net work?
> thanks
> AT
> message
> manually
> access.|||Hey thanks Hari for the replies...
But I was able to resolve the problem by doing a simple
sys reboot..
thanks again for your help..
AT
>--Original Message--
>Hi,
>Incase if this fail, check any other process uses this
file. Mostly it will
>be some backup processes (tape / disk copy).
>Thanks
>Hari
>MCDBA
>"AT" <anonymous@.discussions.microsoft.com> wrote in
message
>news:eb1101c3f0a9$58c30160$a601280a@.phx.gbl...
does
full
>
>.
>

Sunday, March 25, 2012

Deleting maintenance plan

How do I delete an old maintenance plan that is causing errors in my event
viewer?
EM, Management, Database Maintenance Plans.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"kmd" <kmd@.hotmail.com> wrote in message news:eAyEMCJhEHA.1724@.tk2msftngp13.phx.gbl...
> How do I delete an old maintenance plan that is causing errors in my event
> viewer?
>

Deleting legacy maintenance plans - 2005

I am unable to delete my SQL Server 2005 legacy database mainenance plans. Here are the steps taken in SQL Server Management Studio:

- Expand Management | Legacy | Database Maintenace Plans

- Right click one of the maintenance plans

- Select "Delete"

A Delete Object window is displayed. I click the OK button, and the Management Studio no longer displays the maintenance plan. But after refreshing the view, the maintenance plan reappears. It wasn't really deleted.

I also tried another way of deleting it. In the Delete Object window, I selected "Script Action to new Query window", then ran the query. It did not delete the maint plan.

Any suggestions?

Thanks,

JackS

Still no responses. Have any of you experienced the same problem?

Thank you,

JackS

|||I will follow up with our team and get back to you on this. You can reach me at gdwarak at microsoft dot com(not to get spammers attention) in case i do not get back in couple of days.|||

That is right this is a bug and is planned to get addressed in next service pack.

Gops Dwarak, Microsoft.

|||

Hi Gops!

I (we) 've got the same problem with a lot of customers running SAP on MSSQL.

Therefore there's a lot of trouble about this issue.

Do you or anybody elsing reading this, have a workaround killing these legacy plans.

I mean: it just looks like an annoying thing, but these plans do run. And for example if you have got planned lot's of backups with maint plans it is "more than annoying".

Thanks in advance.

Carsten Loeffler

|||install SP2 problem solved

Deleting legacy maintenance plans - 2005

I am unable to delete my SQL Server 2005 legacy database mainenance plans. Here are the steps taken in SQL Server Management Studio:

- Expand Management | Legacy | Database Maintenace Plans

- Right click one of the maintenance plans

- Select "Delete"

A Delete Object window is displayed. I click the OK button, and the Management Studio no longer displays the maintenance plan. But after refreshing the view, the maintenance plan reappears. It wasn't really deleted.

I also tried another way of deleting it. In the Delete Object window, I selected "Script Action to new Query window", then ran the query. It did not delete the maint plan.

Any suggestions?

Thanks,

JackS

Still no responses. Have any of you experienced the same problem?

Thank you,

JackS

|||I will follow up with our team and get back to you on this. You can reach me at gdwarak at microsoft dot com(not to get spammers attention) in case i do not get back in couple of days.|||

That is right this is a bug and is planned to get addressed in next service pack.

Gops Dwarak, Microsoft.

|||

Hi Gops!

I (we) 've got the same problem with a lot of customers running SAP on MSSQL.

Therefore there's a lot of trouble about this issue.

Do you or anybody elsing reading this, have a workaround killing these legacy plans.

I mean: it just looks like an annoying thing, but these plans do run. And for example if you have got planned lot's of backups with maint plans it is "more than annoying".

Thanks in advance.

Carsten Loeffler

|||install SP2 problem solvedsql

Deleting legacy maintenance plans - 2005

I am unable to delete my SQL Server 2005 legacy database mainenance plans. Here are the steps taken in SQL Server Management Studio:

- Expand Management | Legacy | Database Maintenace Plans

- Right click one of the maintenance plans

- Select "Delete"

A Delete Object window is displayed. I click the OK button, and the Management Studio no longer displays the maintenance plan. But after refreshing the view, the maintenance plan reappears. It wasn't really deleted.

I also tried another way of deleting it. In the Delete Object window, I selected "Script Action to new Query window", then ran the query. It did not delete the maint plan.

Any suggestions?

Thanks,

JackS

Still no responses. Have any of you experienced the same problem?

Thank you,

JackS

|||I will follow up with our team and get back to you on this. You can reach me at gdwarak at microsoft dot com(not to get spammers attention) in case i do not get back in couple of days.|||

That is right this is a bug and is planned to get addressed in next service pack.

Gops Dwarak, Microsoft.

|||

Hi Gops!

I (we) 've got the same problem with a lot of customers running SAP on MSSQL.

Therefore there's a lot of trouble about this issue.

Do you or anybody elsing reading this, have a workaround killing these legacy plans.

I mean: it just looks like an annoying thing, but these plans do run. And for example if you have got planned lot's of backups with maint plans it is "more than annoying".

Thanks in advance.

Carsten Loeffler

|||install SP2 problem solved

Deleting Legacy maintenance plans

Hi,
I am not able to delete the Legacy maintenance plans created:
for example I created a maintenance plan: "MyPlan" with:
master.dbo.xp_sqlmaint
and the plan created at:
Management\Legacy\Database Maintenance Plans\MyPlan

After this I tryed to delete this using SQL Server Management Studio, it is
deleted (right click on the plan and select delete menu item)
But when I refresh the server, the "MyPlan" is back again.

Any idea how to delete Legacy Maintenance plans?

Thanks,
Venkat

What service pack level are you on? This is something that could potentially have been resolved in SP2. Or even SP1 if you are on RTM. At any rate here are a couple

At any rate here are a couple links that might point you in the right direction... http://mssqltips.com/tip.asp?tip=1137 that article explains where these plans are stored (you can also run profiler while you drill into that section - note it gets populated before you click on maintenance plans, so start your trace before you even click the plus before Legacy.. It may stay cached so maybe just start Management Studio from scracth. That trace should confirm above and show a query towards the tables indicated. This will not be supported and should be tested thoroughly first but you should be able to delete from the tables referenced once you understand the information for the plan you are discussing.

Here is another forum article of someone who also had issues and there results..

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=454044&SiteID=1

|||

Hi,

i am using the following SQL 2005 software:

Microsoft SQL Server Management Studio 9.00.1399.00
Microsoft Analysis Services Client Tools 2005.090.1399.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 6.0.2900.2180
Microsoft .NET Framework 2.0.50727.42
Operating System 5.1.2600

I resolved the problem by explicitly depeting the records from the maintenance plan tables.Looks like the deletion from UI has some serious problem, it says deleted, but when i reopne the SQL Server management studio, i can still see my plans.

Any way the problem was solved, hopefully this will get fixed by MS in later service packs.

Thanks,

Venkat

|||

So it sounds like the links to the tables helped you out then.


Just a quick point, you say you hope this will be fixed in a later service pack.. You are not currently on the latest version of SQL Server 2005. You might want to try and upgrade first and see if it is fixed in a "later" service pack.

Wednesday, March 21, 2012

deleting backups older than X days?

Hello,
I've written a number of scripts for custom maintenance and backups on our
server, the last problem I have is I don't know how to delete backup files o
lder
than x amount of days. Can anyone tell me how to do this?
Thanks,
Craig.Why don't you use database maintenance plans? They do this (delete old
files) for you...
--
Carlos E. Rojas
SQL Server MVP
Co-Author SQL Server 2000 programming by Example
"Craig H." <spam@.[at]thehurley.[dot]com> wrote in message
news:O7PJ2aTBEHA.2768@.tk2msftngp13.phx.gbl...
> Hello,
> I've written a number of scripts for custom maintenance and backups on our
> server, the last problem I have is I don't know how to delete backup files
older
> than x amount of days. Can anyone tell me how to do this?
> Thanks,
> Craig.|||If you have a look at the delete code in this proc it should give you the
right idea
http://www.sql-server-performance.c...sp?TOPIC_ID=864
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Craig H." <spam@.[at]thehurley.[dot]com> wrote in message
news:O7PJ2aTBEHA.2768@.tk2msftngp13.phx.gbl...
> Hello,
> I've written a number of scripts for custom maintenance and backups on our
> server, the last problem I have is I don't know how to delete backup files
older
> than x amount of days. Can anyone tell me how to do this?
> Thanks,
> Craig.|||Which should cause you to go stright for the Maint. Plan Wizard
Neil MacMurchy
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:OwfUuAUBEHA.1236@.TK2MSFTNGP11.phx.gbl...
> If you have a look at the delete code in this proc it should give you the
> right idea
> http://www.sql-server-performance.c...sp?TOPIC_ID=864
> --
> HTH
> Jasper Smith (SQL Server MVP)
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
>
> "Craig H." <spam@.[at]thehurley.[dot]com> wrote in message
> news:O7PJ2aTBEHA.2768@.tk2msftngp13.phx.gbl...
our
files
> older
>|||It's not pretty is it, what was I thinking :-)
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Neil MacMurchy" <neilmcse@.hotmail.com> wrote in message
news:%23CzFYMUBEHA.1700@.TK2MSFTNGP12.phx.gbl...
> Which should cause you to go stright for the Maint. Plan Wizard
> Neil MacMurchy
> "Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
> news:OwfUuAUBEHA.1236@.TK2MSFTNGP11.phx.gbl...
the
> our
> files
>|||Thanks for that link Jasper... but I think I'll stick with the maintenance p
lan
wizard for backups.
Jasper Smith wrote:

> If you have a look at the delete code in this proc it should give you the
> right idea
> http://www.sql-server-performance.c...sp?TOPIC_ID=864
>|||I KNEW IT! I must be an Oracle (ooooo bad pun....)
;-)
Neil
"Craig H." <spam@.[at]thehurley.[dot]com> wrote in message
news:eFrTuvUBEHA.3748@.TK2MSFTNGP11.phx.gbl...
> Thanks for that link Jasper... but I think I'll stick with the maintenance
plan
> wizard for backups.
>
> Jasper Smith wrote:
>
the|||It does look scary but rest assured we have been running this in production
for a long time and its got tens of thousands of backups under its belt. It
is getting to be a bit of a monster procedure though :-)
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Craig H." <spam@.[at]thehurley.[dot]com> wrote in message
news:eFrTuvUBEHA.3748@.TK2MSFTNGP11.phx.gbl...
> Thanks for that link Jasper... but I think I'll stick with the maintenance
plan
> wizard for backups.
>
> Jasper Smith wrote:
>
the

Sunday, March 11, 2012

Deleteing SQL Aent Jobs in SQL2005

Hi,
I have a situation where I had created a maintenance plan and edited the
resulting job. I had to delete the maintenance plan and job. In SQL2000 I
would delete the job first then the maintenance plan. I tried this is
SQL2005 and had errors. It referred to the DELETE statement conflicted with
REFERENCE constraint "FK_subplan_job_id". The conflict occurred in msdb
table dbo.sysmaintplan_subplans", column 'job_id'.
I could not delete the maintenance plan either. In the end I renamed the job
then I could delete the maintenance plan.
This is on SQL2005 SP1.
Thanks
ChrisI have same problem. Did you ever get a reply? If so, what do I do? I hav
e
several orphan jobs I cannot delete. Thanks for any info.|||DaveK,
I mentioned in my post how I fixed this. Nobody else replied.
Chris
"DaveK" <DaveK@.discussions.microsoft.com> wrote in message
news:79B9F73B-C3E3-47AB-8CCB-3AEA8EC02062@.microsoft.com...
>I have same problem. Did you ever get a reply? If so, what do I do? I
>have
> several orphan jobs I cannot delete. Thanks for any info.

Deleteing SQL Aent Jobs in SQL2005

Hi,
I have a situation where I had created a maintenance plan and edited the
resulting job. I had to delete the maintenance plan and job. In SQL2000 I
would delete the job first then the maintenance plan. I tried this is
SQL2005 and had errors. It referred to the DELETE statement conflicted with
REFERENCE constraint "FK_subplan_job_id". The conflict occurred in msdb
table dbo.sysmaintplan_subplans", column 'job_id'.
I could not delete the maintenance plan either. In the end I renamed the job
then I could delete the maintenance plan.
This is on SQL2005 SP1.
Thanks
Chris
I have same problem. Did you ever get a reply? If so, what do I do? I have
several orphan jobs I cannot delete. Thanks for any info.
|||DaveK,
I mentioned in my post how I fixed this. Nobody else replied.
Chris
"DaveK" <DaveK@.discussions.microsoft.com> wrote in message
news:79B9F73B-C3E3-47AB-8CCB-3AEA8EC02062@.microsoft.com...
>I have same problem. Did you ever get a reply? If so, what do I do? I
>have
> several orphan jobs I cannot delete. Thanks for any info.

Deleteing SQL Aent Jobs in SQL2005

Hi,
I have a situation where I had created a maintenance plan and edited the
resulting job. I had to delete the maintenance plan and job. In SQL2000 I
would delete the job first then the maintenance plan. I tried this is
SQL2005 and had errors. It referred to the DELETE statement conflicted with
REFERENCE constraint "FK_subplan_job_id". The conflict occurred in msdb
table dbo.sysmaintplan_subplans", column 'job_id'.
I could not delete the maintenance plan either. In the end I renamed the job
then I could delete the maintenance plan.
This is on SQL2005 SP1.
Thanks
Chris
I have same problem. Did you ever get a reply? If so, what do I do? I have
several orphan jobs I cannot delete. Thanks for any info.
|||DaveK,
I mentioned in my post how I fixed this. Nobody else replied.
Chris
"DaveK" <DaveK@.discussions.microsoft.com> wrote in message
news:79B9F73B-C3E3-47AB-8CCB-3AEA8EC02062@.microsoft.com...
>I have same problem. Did you ever get a reply? If so, what do I do? I
>have
> several orphan jobs I cannot delete. Thanks for any info.

Deleteing SQL Aent Jobs in SQL2005

Hi,
I have a situation where I had created a maintenance plan and edited the
resulting job. I had to delete the maintenance plan and job. In SQL2000 I
would delete the job first then the maintenance plan. I tried this is
SQL2005 and had errors. It referred to the DELETE statement conflicted with
REFERENCE constraint "FK_subplan_job_id". The conflict occurred in msdb
table dbo.sysmaintplan_subplans", column 'job_id'.
I could not delete the maintenance plan either. In the end I renamed the job
then I could delete the maintenance plan.
This is on SQL2005 SP1.
Thanks
ChrisI have same problem. Did you ever get a reply? If so, what do I do? I have
several orphan jobs I cannot delete. Thanks for any info.|||DaveK,
I mentioned in my post how I fixed this. Nobody else replied.
Chris
"DaveK" <DaveK@.discussions.microsoft.com> wrote in message
news:79B9F73B-C3E3-47AB-8CCB-3AEA8EC02062@.microsoft.com...
>I have same problem. Did you ever get a reply? If so, what do I do? I
>have
> several orphan jobs I cannot delete. Thanks for any info.

Friday, February 24, 2012

delete remnants of log shipping

I deleted all the maintenance plans but somehow the log shipping monitor
showing the log shipping pair still remains. How can i clear all the log
shipping ?
Log shipping can be removed from the Maintenance Wizard. Is that where you
removed log shipping? Run the wizard and when you get to the Log Shipping
tab, click on Remove Log Shipping.
To remove a Log Shipping pair from the monitor, use
sp_delete_log_shipping_monitor_info. This is discussed in detail in BOL so
do a search and you'll find all you need.
joe.
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:eLoO1N4UFHA.3292@.TK2MSFTNGP14.phx.gbl...
>I deleted all the maintenance plans but somehow the log shipping monitor
> showing the log shipping pair still remains. How can i clear all the log
> shipping ?
>
|||Not that MS supports hacking system tables, but msdb..log_shipping_monitor is
where this info is stored.
If the stored proc doesn't work, I've had to restort to cleaning this out
manually.
DO this at your own risk.
<standard disclaimer inserted here>
Donna Lambert
"Joe Yong" wrote:

> Log shipping can be removed from the Maintenance Wizard. Is that where you
> removed log shipping? Run the wizard and when you get to the Log Shipping
> tab, click on Remove Log Shipping.
> To remove a Log Shipping pair from the monitor, use
> sp_delete_log_shipping_monitor_info. This is discussed in detail in BOL so
> do a search and you'll find all you need.
>
> joe.
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:eLoO1N4UFHA.3292@.TK2MSFTNGP14.phx.gbl...
>
>

delete remnants of log shipping

I deleted all the maintenance plans but somehow the log shipping monitor
showing the log shipping pair still remains. How can i clear all the log
shipping ?Log shipping can be removed from the Maintenance Wizard. Is that where you
removed log shipping? Run the wizard and when you get to the Log Shipping
tab, click on Remove Log Shipping.
To remove a Log Shipping pair from the monitor, use
sp_delete_log_shipping_monitor_info. This is discussed in detail in BOL so
do a search and you'll find all you need.
joe.
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:eLoO1N4UFHA.3292@.TK2MSFTNGP14.phx.gbl...
>I deleted all the maintenance plans but somehow the log shipping monitor
> showing the log shipping pair still remains. How can i clear all the log
> shipping ?
>|||Not that MS supports hacking system tables, but msdb..log_shipping_monitor is
where this info is stored.
If the stored proc doesn't work, I've had to restort to cleaning this out
manually.
DO this at your own risk.
<standard disclaimer inserted here>
Donna Lambert
"Joe Yong" wrote:
> Log shipping can be removed from the Maintenance Wizard. Is that where you
> removed log shipping? Run the wizard and when you get to the Log Shipping
> tab, click on Remove Log Shipping.
> To remove a Log Shipping pair from the monitor, use
> sp_delete_log_shipping_monitor_info. This is discussed in detail in BOL so
> do a search and you'll find all you need.
>
> joe.
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:eLoO1N4UFHA.3292@.TK2MSFTNGP14.phx.gbl...
> >I deleted all the maintenance plans but somehow the log shipping monitor
> > showing the log shipping pair still remains. How can i clear all the log
> > shipping ?
> >
> >
>
>

Sunday, February 19, 2012

delete remnants of log shipping

I deleted all the maintenance plans but somehow the log shipping monitor
showing the log shipping pair still remains. How can i clear all the log
shipping ?Log shipping can be removed from the Maintenance Wizard. Is that where you
removed log shipping? Run the wizard and when you get to the Log Shipping
tab, click on Remove Log Shipping.
To remove a Log Shipping pair from the monitor, use
sp_delete_log_shipping_monitor_info. This is discussed in detail in BOL so
do a search and you'll find all you need.
joe.
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:eLoO1N4UFHA.3292@.TK2MSFTNGP14.phx.gbl...
>I deleted all the maintenance plans but somehow the log shipping monitor
> showing the log shipping pair still remains. How can i clear all the log
> shipping ?
>|||Not that MS supports hacking system tables, but msdb..log_shipping_monitor i
s
where this info is stored.
If the stored proc doesn't work, I've had to restort to cleaning this out
manually.
DO this at your own risk.
<standard disclaimer inserted here>
Donna Lambert
"Joe Yong" wrote:

> Log shipping can be removed from the Maintenance Wizard. Is that where you
> removed log shipping? Run the wizard and when you get to the Log Shipping
> tab, click on Remove Log Shipping.
> To remove a Log Shipping pair from the monitor, use
> sp_delete_log_shipping_monitor_info. This is discussed in detail in BOL so
> do a search and you'll find all you need.
>
> joe.
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:eLoO1N4UFHA.3292@.TK2MSFTNGP14.phx.gbl...
>
>

Tuesday, February 14, 2012

delete old backup files

Hi, I am running SQL 2000 and have setup a daily
maintenance plan to backup the data and log files. I have
also set it up to delete files that are older than 1 day
so that it won't take up all the free disk space. The
problem is that the files are still there and there is no
sign that they have been deleted by the maintenance plan.
What is wrong? Can somepone please help ? Thanks.You probably do not have enough room for all the files to be created and
then deleted. You would have to have over twice the disk space of the
databases and backups to accomplish this. You may want to either try
and separate the jobs or use another scheduler (Windows Tasks) to delete
the old backups.
Bill
Seing wrote:
> Hi, I am running SQL 2000 and have setup a daily
> maintenance plan to backup the data and log files. I have
> also set it up to delete files that are older than 1 day
> so that it won't take up all the free disk space. The
> problem is that the files are still there and there is no
> sign that they have been deleted by the maintenance plan.
> What is wrong? Can somepone please help ? Thanks.|||Pretty sure I have enough disk space though...any other
suggestions?
>--Original Message--
>You probably do not have enough room for all the files to
be created and
>then deleted. You would have to have over twice the disk
space of the
>databases and backups to accomplish this. You may want
to either try
>and separate the jobs or use another scheduler (Windows
Tasks) to delete
>the old backups.
>Bill
>Seing wrote:
>> Hi, I am running SQL 2000 and have setup a daily
>> maintenance plan to backup the data and log files. I
have
>> also set it up to delete files that are older than 1 day
>> so that it won't take up all the free disk space. The
>> problem is that the files are still there and there is
no
>> sign that they have been deleted by the maintenance
plan.
>> What is wrong? Can somepone please help ? Thanks.
>.
>|||Then the only other suggestion I have is to verify the job history and
the step histories for any error messages that can help in your
troubleshooting.
Sorry
Bill
Seing wrote:
> Pretty sure I have enough disk space though...any other
> suggestions?
> >--Original Message--
> >You probably do not have enough room for all the files to
> be created and
> >then deleted. You would have to have over twice the disk
> space of the
> >databases and backups to accomplish this. You may want
> to either try
> >and separate the jobs or use another scheduler (Windows
> Tasks) to delete
> >the old backups.
> >
> >Bill
> >
> >Seing wrote:
> >>
> >> Hi, I am running SQL 2000 and have setup a daily
> >> maintenance plan to backup the data and log files. I
> have
> >> also set it up to delete files that are older than 1 day
> >> so that it won't take up all the free disk space. The
> >> problem is that the files are still there and there is
> no
> >> sign that they have been deleted by the maintenance
> plan.
> >> What is wrong? Can somepone please help ? Thanks.
> >.
> >|||Below KB might help:
http://support.microsoft.com/default.aspx?scid=kb;en-us;303292&Product=sql2k
Also, check out below great troubleshooting suggestions from Bill H at MS:
-- Log files don't delete --
This is likely to be either a permissions problem or a sharing violation
problem. The maintenance plan is run as a job, and jobs are run by the
SQLServerAgent service.
Permissions:
1. Determine the startup account for the SQLServerAgent service
(Start|Programs|Administrative tools|Services|SQLServerAgent|Startup). This
account is the security context for jobs, and thus the maintenance plan.
2. If SQLServerAgent is started using LocalSystem (as opposed to a domain
account) then skip step 3.
3. On that box, log onto NT as that account. Using Explorer, attempt to
delete an expired backup. If that succeeds then go to Sharing Violation
section.
4. Log onto NT with an account that is an administrator and use Explorer to
look at the Properties|Security of the folder (where the backups reside)
and ensure the SQLServerAgent startup account has Full Control. If the
SQLServerAgent startup account is LocalSystem, then the account to consider
is SYSTEM.
5. In NT, if an account is a member of an NT group, and if that group has
Access is Denied, then that account will have Access is Denied, even if
that account is also a member of the Administrators group. Thus you may
need to check group permissions (if the Startup Account is a member of a
group).
6. Keep in mind that permissions (by default) are inherited from a parent
folder. Thus, if the backups are stored in C:\bak, and if someone had
denied permission to the SQLServerAgent startup account for C:\, then
C:\bak will inherit access is denied.
Sharing violation:
This is likely to be rooted in a timing issue, with the most likely cause
being another scheduled process (such as NT Backup or Anti-Virus software)
having the backup file open at the time when the SQLServerAgent (i.e., the
maintenance plan job) tried to delete it.
1. Download filemon and handle from www.sysinternals.com.
2. I am not sure whether filemon can be scheduled, or you might be able to
use NT scheduling services to start filemon just before the maintenance
plan job is started, but the filemon log can become very large, so it would
be best to start it some short time before the maintenance plan starts.
3. Inspect the filemon log for another process that has that backup file
open (if your lucky enough to have started filemon before this other
process grabs the backup folder), and inspect the log for the results when
the SQLServerAgent agent attempts to open that same file.
4. Schedule the job or that other process to do their work at different
times.
5. You can use the handle utility if you are around at the time when the
job is scheduled to run.
If the backup files are going to a \\share or a mapped drive (as opposed to
local drive), then you will need to modify the above (with respect to where
the tests and utilities are run).
Finally, inspection of the maintenance plan's history report might be
useful.
Thanks,
Bill Hollinshead
Microsoft, SQL Server
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Seing" <anonymous@.discussions.microsoft.com> wrote in message
news:005801c3c8b4$5c223500$a401280a@.phx.gbl...
> Hi, I am running SQL 2000 and have setup a daily
> maintenance plan to backup the data and log files. I have
> also set it up to delete files that are older than 1 day
> so that it won't take up all the free disk space. The
> problem is that the files are still there and there is no
> sign that they have been deleted by the maintenance plan.
> What is wrong? Can somepone please help ? Thanks.