I have a job that backs up all my databases. The problems
is that I have it set to delete .BAK files older than 3
days, but it is not. Does anyone know why this could be?
If you have any suggestions please let me know.
Thanks.Make sure the SQL Agent login has the correct permissions on the files.
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Shawn Ferguson" <sfergus2@.cscc.edu> wrote in message
news:0a7d01c3cedd$85e94f20$a101280a@.phx.gbl...
> I have a job that backs up all my databases. The problems
> is that I have it set to delete .BAK files older than 3
> days, but it is not. Does anyone know why this could be?
> If you have any suggestions please let me know.
> Thanks.|||By the time the delete starts, it has not been 3 days
yet ?. If this is scheduled through the maintenance plan
and your database backup is taking shorter time than
before, it will not delete the old backup files. You may
want to delete the files manually or setup a batch job (or
separate cmd job) to delete it......
>--Original Message--
>I have a job that backs up all my databases. The
problems
>is that I have it set to delete .BAK files older than 3
>days, but it is not. Does anyone know why this could
be?
>If you have any suggestions please let me know.
>Thanks.
>.
>|||Shawn
Looks like you are using database maintenance plan.
Check if you set 'attempt to repaire any minor problems' ,sometime it
causes to SQL Server to be set with single user mode.
"Shawn Ferguson" <sfergus2@.cscc.edu> wrote in message
news:0a7d01c3cedd$85e94f20$a101280a@.phx.gbl...
> I have a job that backs up all my databases. The problems
> is that I have it set to delete .BAK files older than 3
> days, but it is not. Does anyone know why this could be?
> If you have any suggestions please let me know.
> Thanks.|||This is very helpful article
http://www.sql-server-performance.com/ak_inside_sql_server_maintenance_plans
.asp
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:#GjdvLuzDHA.2412@.TK2MSFTNGP10.phx.gbl...
> Shawn
> Looks like you are using database maintenance plan.
> Check if you set 'attempt to repaire any minor problems' ,sometime it
> causes to SQL Server to be set with single user mode.
>
>
> "Shawn Ferguson" <sfergus2@.cscc.edu> wrote in message
> news:0a7d01c3cedd$85e94f20$a101280a@.phx.gbl...
> > I have a job that backs up all my databases. The problems
> > is that I have it set to delete .BAK files older than 3
> > days, but it is not. Does anyone know why this could be?
> > If you have any suggestions please let me know.
> >
> > Thanks.
>
Showing posts with label bak. Show all posts
Showing posts with label bak. Show all posts
Tuesday, March 27, 2012
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
>> >
>> >
>> >.
>> >
>
>.
>
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
>
>.
>
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
>
>.
>
Wednesday, March 21, 2012
Deleting BAK and TRN files
I have a mentanence plan set to backup .trn and .bak files daily and then
delete the ones over 3 days old.
The problem is that they don't delete after 3 days....they just build up
and up!!!
Is this a known issue? or am i doing something wrong?
Any response is much appreciated!!!
Cheers,
Alex
Below KB might help:
http://support.microsoft.com/default...&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
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"alexbax" <alexbax@.discussions.microsoft.com> wrote in message
news:80006EA9-9286-4D4B-AEFF-2983A4C0CD5C@.microsoft.com...
>I have a mentanence plan set to backup .trn and .bak files daily and then
> delete the ones over 3 days old.
> The problem is that they don't delete after 3 days....they just build up
> and up!!!
> Is this a known issue? or am i doing something wrong?
> Any response is much appreciated!!!
> Cheers,
> Alex
>
|||Thats great! ive made a few changes and will check to see if it works in a
few days!!
Thanks,
Alex
"Tibor Karaszi" wrote:
> Below KB might help:
> http://support.microsoft.com/default...&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
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "alexbax" <alexbax@.discussions.microsoft.com> wrote in message
> news:80006EA9-9286-4D4B-AEFF-2983A4C0CD5C@.microsoft.com...
>
>
sql
delete the ones over 3 days old.
The problem is that they don't delete after 3 days....they just build up
and up!!!
Is this a known issue? or am i doing something wrong?
Any response is much appreciated!!!
Cheers,
Alex
Below KB might help:
http://support.microsoft.com/default...&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
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"alexbax" <alexbax@.discussions.microsoft.com> wrote in message
news:80006EA9-9286-4D4B-AEFF-2983A4C0CD5C@.microsoft.com...
>I have a mentanence plan set to backup .trn and .bak files daily and then
> delete the ones over 3 days old.
> The problem is that they don't delete after 3 days....they just build up
> and up!!!
> Is this a known issue? or am i doing something wrong?
> Any response is much appreciated!!!
> Cheers,
> Alex
>
|||Thats great! ive made a few changes and will check to see if it works in a
few days!!
Thanks,
Alex
"Tibor Karaszi" wrote:
> Below KB might help:
> http://support.microsoft.com/default...&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
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "alexbax" <alexbax@.discussions.microsoft.com> wrote in message
> news:80006EA9-9286-4D4B-AEFF-2983A4C0CD5C@.microsoft.com...
>
>
sql
Deleting BAK and TRN files
I have a mentanence plan set to backup .trn and .bak files daily and then
delete the ones over 3 days old.
The problem is that they don't delete after 3 days....they just build up
and up!!!
Is this a known issue? or am i doing something wrong'
Any response is much appreciated!!!
Cheers,
AlexBelow 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
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"alexbax" <alexbax@.discussions.microsoft.com> wrote in message
news:80006EA9-9286-4D4B-AEFF-2983A4C0CD5C@.microsoft.com...
>I have a mentanence plan set to backup .trn and .bak files daily and then
> delete the ones over 3 days old.
> The problem is that they don't delete after 3 days....they just build up
> and up!!!
> Is this a known issue? or am i doing something wrong'
> Any response is much appreciated!!!
> Cheers,
> Alex
>|||Thats great! ive made a few changes and will check to see if it works in a
few days!!
Thanks,
Alex
"Tibor Karaszi" wrote:
> 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
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "alexbax" <alexbax@.discussions.microsoft.com> wrote in message
> news:80006EA9-9286-4D4B-AEFF-2983A4C0CD5C@.microsoft.com...
> >I have a mentanence plan set to backup .trn and .bak files daily and then
> > delete the ones over 3 days old.
> > The problem is that they don't delete after 3 days....they just build up
> > and up!!!
> >
> > Is this a known issue? or am i doing something wrong'
> >
> > Any response is much appreciated!!!
> >
> > Cheers,
> >
> > Alex
> >
> >
>
>
delete the ones over 3 days old.
The problem is that they don't delete after 3 days....they just build up
and up!!!
Is this a known issue? or am i doing something wrong'
Any response is much appreciated!!!
Cheers,
AlexBelow 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
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"alexbax" <alexbax@.discussions.microsoft.com> wrote in message
news:80006EA9-9286-4D4B-AEFF-2983A4C0CD5C@.microsoft.com...
>I have a mentanence plan set to backup .trn and .bak files daily and then
> delete the ones over 3 days old.
> The problem is that they don't delete after 3 days....they just build up
> and up!!!
> Is this a known issue? or am i doing something wrong'
> Any response is much appreciated!!!
> Cheers,
> Alex
>|||Thats great! ive made a few changes and will check to see if it works in a
few days!!
Thanks,
Alex
"Tibor Karaszi" wrote:
> 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
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "alexbax" <alexbax@.discussions.microsoft.com> wrote in message
> news:80006EA9-9286-4D4B-AEFF-2983A4C0CD5C@.microsoft.com...
> >I have a mentanence plan set to backup .trn and .bak files daily and then
> > delete the ones over 3 days old.
> > The problem is that they don't delete after 3 days....they just build up
> > and up!!!
> >
> > Is this a known issue? or am i doing something wrong'
> >
> > Any response is much appreciated!!!
> >
> > Cheers,
> >
> > Alex
> >
> >
>
>
Deleting BAK and TRN files
I have a mentanence plan set to backup .trn and .bak files daily and then
delete the ones over 3 days old.
The problem is that they don't delete after 3 days....they just build up
and up!!!
Is this a known issue? or am i doing something wrong'
Any response is much appreciated!!!
Cheers,
AlexBelow KB might help:
http://support.microsoft.com/defaul...2&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
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"alexbax" <alexbax@.discussions.microsoft.com> wrote in message
news:80006EA9-9286-4D4B-AEFF-2983A4C0CD5C@.microsoft.com...
>I have a mentanence plan set to backup .trn and .bak files daily and then
> delete the ones over 3 days old.
> The problem is that they don't delete after 3 days....they just build up
> and up!!!
> Is this a known issue? or am i doing something wrong'
> Any response is much appreciated!!!
> Cheers,
> Alex
>|||Thats great! ive made a few changes and will check to see if it works in a
few days!!
Thanks,
Alex
"Tibor Karaszi" wrote:
> Below KB might help:
> http://support.microsoft.com/defaul...sinternals.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 woul
d
> 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 t
o
> local drive), then you will need to modify the above (with respect to wher
e
> 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
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "alexbax" <alexbax@.discussions.microsoft.com> wrote in message
> news:80006EA9-9286-4D4B-AEFF-2983A4C0CD5C@.microsoft.com...
>
>
delete the ones over 3 days old.
The problem is that they don't delete after 3 days....they just build up
and up!!!
Is this a known issue? or am i doing something wrong'
Any response is much appreciated!!!
Cheers,
AlexBelow KB might help:
http://support.microsoft.com/defaul...2&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
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"alexbax" <alexbax@.discussions.microsoft.com> wrote in message
news:80006EA9-9286-4D4B-AEFF-2983A4C0CD5C@.microsoft.com...
>I have a mentanence plan set to backup .trn and .bak files daily and then
> delete the ones over 3 days old.
> The problem is that they don't delete after 3 days....they just build up
> and up!!!
> Is this a known issue? or am i doing something wrong'
> Any response is much appreciated!!!
> Cheers,
> Alex
>|||Thats great! ive made a few changes and will check to see if it works in a
few days!!
Thanks,
Alex
"Tibor Karaszi" wrote:
> Below KB might help:
> http://support.microsoft.com/defaul...sinternals.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 woul
d
> 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 t
o
> local drive), then you will need to modify the above (with respect to wher
e
> 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
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "alexbax" <alexbax@.discussions.microsoft.com> wrote in message
> news:80006EA9-9286-4D4B-AEFF-2983A4C0CD5C@.microsoft.com...
>
>
Friday, March 9, 2012
Deleted logfile
Hi,
I have detach my sql database and deleted the transaction logfile.
Now i cannot attach the database bak to SQL.
The logfile is completly gone.
How can i reattach this database (don't want to use the backup)
Can u help me
regards
Steven
Hi
Look at sp_attach_single_file_db stored procedure.
For more details please refer to BOL
"Tjina" <stjinaton@.nagico.com> wrote in message
news:OPJz1f2uEHA.612@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I have detach my sql database and deleted the transaction logfile.
> Now i cannot attach the database bak to SQL.
> The logfile is completly gone.
> How can i reattach this database (don't want to use the backup)
> Can u help me
> regards
> Steven
>
|||As far as I know with SQL2K you can re-attach the database without the log
file. SQL Server should notify you that the log file was not found and will
ask you if you want a new log file to be created.
Sasan Saidi, MSc in CS
"I saw it work in a cartoon once so I am pretty sure I can do it."
"Tjina" wrote:
> Hi,
> I have detach my sql database and deleted the transaction logfile.
> Now i cannot attach the database bak to SQL.
> The logfile is completly gone.
> How can i reattach this database (don't want to use the backup)
> Can u help me
> regards
> Steven
>
>
|||Have you tried using sp_attach_single_file_db? You can find more
information on using this in books online.
-Sue
On Tue, 26 Oct 2004 10:27:41 -0400, "Tjina" <stjinaton@.nagico.com>
wrote:
>Hi,
>I have detach my sql database and deleted the transaction logfile.
>Now i cannot attach the database bak to SQL.
>The logfile is completly gone.
>How can i reattach this database (don't want to use the backup)
>Can u help me
>regards
>Steven
>
|||> As far as I know with SQL2K you can re-attach the database without the log
> file.
Not in all cases...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sasan Saidi" <SasanSaidi@.discussions.microsoft.com> wrote in message
news:942597C9-6CED-4A33-8A27-9F73475A4D0C@.microsoft.com...[vbcol=seagreen]
> As far as I know with SQL2K you can re-attach the database without the log
> file. SQL Server should notify you that the log file was not found and will
> ask you if you want a new log file to be created.
> --
> Sasan Saidi, MSc in CS
> "I saw it work in a cartoon once so I am pretty sure I can do it."
>
> "Tjina" wrote:
I have detach my sql database and deleted the transaction logfile.
Now i cannot attach the database bak to SQL.
The logfile is completly gone.
How can i reattach this database (don't want to use the backup)
Can u help me
regards
Steven
Hi
Look at sp_attach_single_file_db stored procedure.
For more details please refer to BOL
"Tjina" <stjinaton@.nagico.com> wrote in message
news:OPJz1f2uEHA.612@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I have detach my sql database and deleted the transaction logfile.
> Now i cannot attach the database bak to SQL.
> The logfile is completly gone.
> How can i reattach this database (don't want to use the backup)
> Can u help me
> regards
> Steven
>
|||As far as I know with SQL2K you can re-attach the database without the log
file. SQL Server should notify you that the log file was not found and will
ask you if you want a new log file to be created.
Sasan Saidi, MSc in CS
"I saw it work in a cartoon once so I am pretty sure I can do it."
"Tjina" wrote:
> Hi,
> I have detach my sql database and deleted the transaction logfile.
> Now i cannot attach the database bak to SQL.
> The logfile is completly gone.
> How can i reattach this database (don't want to use the backup)
> Can u help me
> regards
> Steven
>
>
|||Have you tried using sp_attach_single_file_db? You can find more
information on using this in books online.
-Sue
On Tue, 26 Oct 2004 10:27:41 -0400, "Tjina" <stjinaton@.nagico.com>
wrote:
>Hi,
>I have detach my sql database and deleted the transaction logfile.
>Now i cannot attach the database bak to SQL.
>The logfile is completly gone.
>How can i reattach this database (don't want to use the backup)
>Can u help me
>regards
>Steven
>
|||> As far as I know with SQL2K you can re-attach the database without the log
> file.
Not in all cases...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sasan Saidi" <SasanSaidi@.discussions.microsoft.com> wrote in message
news:942597C9-6CED-4A33-8A27-9F73475A4D0C@.microsoft.com...[vbcol=seagreen]
> As far as I know with SQL2K you can re-attach the database without the log
> file. SQL Server should notify you that the log file was not found and will
> ask you if you want a new log file to be created.
> --
> Sasan Saidi, MSc in CS
> "I saw it work in a cartoon once so I am pretty sure I can do it."
>
> "Tjina" wrote:
Deleted logfile
Hi,
I have detach my sql database and deleted the transaction logfile.
Now i cannot attach the database bak to SQL.
The logfile is completly gone.
How can i reattach this database (don't want to use the backup)
Can u help me
regards
StevenHi
Look at sp_attach_single_file_db stored procedure.
For more details please refer to BOL
"Tjina" <stjinaton@.nagico.com> wrote in message
news:OPJz1f2uEHA.612@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I have detach my sql database and deleted the transaction logfile.
> Now i cannot attach the database bak to SQL.
> The logfile is completly gone.
> How can i reattach this database (don't want to use the backup)
> Can u help me
> regards
> Steven
>|||As far as I know with SQL2K you can re-attach the database without the log
file. SQL Server should notify you that the log file was not found and will
ask you if you want a new log file to be created.
--
Sasan Saidi, MSc in CS
"I saw it work in a cartoon once so I am pretty sure I can do it."
"Tjina" wrote:
> Hi,
> I have detach my sql database and deleted the transaction logfile.
> Now i cannot attach the database bak to SQL.
> The logfile is completly gone.
> How can i reattach this database (don't want to use the backup)
> Can u help me
> regards
> Steven
>
>|||Have you tried using sp_attach_single_file_db? You can find more
information on using this in books online.
-Sue
On Tue, 26 Oct 2004 10:27:41 -0400, "Tjina" <stjinaton@.nagico.com>
wrote:
>Hi,
>I have detach my sql database and deleted the transaction logfile.
>Now i cannot attach the database bak to SQL.
>The logfile is completly gone.
>How can i reattach this database (don't want to use the backup)
>Can u help me
>regards
>Steven
>|||> As far as I know with SQL2K you can re-attach the database without the log
> file.
Not in all cases...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sasan Saidi" <SasanSaidi@.discussions.microsoft.com> wrote in message
news:942597C9-6CED-4A33-8A27-9F73475A4D0C@.microsoft.com...
> As far as I know with SQL2K you can re-attach the database without the log
> file. SQL Server should notify you that the log file was not found and will
> ask you if you want a new log file to be created.
> --
> Sasan Saidi, MSc in CS
> "I saw it work in a cartoon once so I am pretty sure I can do it."
>
> "Tjina" wrote:
>> Hi,
>> I have detach my sql database and deleted the transaction logfile.
>> Now i cannot attach the database bak to SQL.
>> The logfile is completly gone.
>> How can i reattach this database (don't want to use the backup)
>> Can u help me
>> regards
>> Steven
>>
I have detach my sql database and deleted the transaction logfile.
Now i cannot attach the database bak to SQL.
The logfile is completly gone.
How can i reattach this database (don't want to use the backup)
Can u help me
regards
StevenHi
Look at sp_attach_single_file_db stored procedure.
For more details please refer to BOL
"Tjina" <stjinaton@.nagico.com> wrote in message
news:OPJz1f2uEHA.612@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I have detach my sql database and deleted the transaction logfile.
> Now i cannot attach the database bak to SQL.
> The logfile is completly gone.
> How can i reattach this database (don't want to use the backup)
> Can u help me
> regards
> Steven
>|||As far as I know with SQL2K you can re-attach the database without the log
file. SQL Server should notify you that the log file was not found and will
ask you if you want a new log file to be created.
--
Sasan Saidi, MSc in CS
"I saw it work in a cartoon once so I am pretty sure I can do it."
"Tjina" wrote:
> Hi,
> I have detach my sql database and deleted the transaction logfile.
> Now i cannot attach the database bak to SQL.
> The logfile is completly gone.
> How can i reattach this database (don't want to use the backup)
> Can u help me
> regards
> Steven
>
>|||Have you tried using sp_attach_single_file_db? You can find more
information on using this in books online.
-Sue
On Tue, 26 Oct 2004 10:27:41 -0400, "Tjina" <stjinaton@.nagico.com>
wrote:
>Hi,
>I have detach my sql database and deleted the transaction logfile.
>Now i cannot attach the database bak to SQL.
>The logfile is completly gone.
>How can i reattach this database (don't want to use the backup)
>Can u help me
>regards
>Steven
>|||> As far as I know with SQL2K you can re-attach the database without the log
> file.
Not in all cases...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sasan Saidi" <SasanSaidi@.discussions.microsoft.com> wrote in message
news:942597C9-6CED-4A33-8A27-9F73475A4D0C@.microsoft.com...
> As far as I know with SQL2K you can re-attach the database without the log
> file. SQL Server should notify you that the log file was not found and will
> ask you if you want a new log file to be created.
> --
> Sasan Saidi, MSc in CS
> "I saw it work in a cartoon once so I am pretty sure I can do it."
>
> "Tjina" wrote:
>> Hi,
>> I have detach my sql database and deleted the transaction logfile.
>> Now i cannot attach the database bak to SQL.
>> The logfile is completly gone.
>> How can i reattach this database (don't want to use the backup)
>> Can u help me
>> regards
>> Steven
>>
Deleted logfile
Hi,
I have detach my sql database and deleted the transaction logfile.
Now i cannot attach the database bak to SQL.
The logfile is completly gone.
How can i reattach this database (don't want to use the backup)
Can u help me
regards
StevenHi
Look at sp_attach_single_file_db stored procedure.
For more details please refer to BOL
"Tjina" <stjinaton@.nagico.com> wrote in message
news:OPJz1f2uEHA.612@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I have detach my sql database and deleted the transaction logfile.
> Now i cannot attach the database bak to SQL.
> The logfile is completly gone.
> How can i reattach this database (don't want to use the backup)
> Can u help me
> regards
> Steven
>|||As far as I know with SQL2K you can re-attach the database without the log
file. SQL Server should notify you that the log file was not found and will
ask you if you want a new log file to be created.
Sasan Saidi, MSc in CS
"I saw it work in a cartoon once so I am pretty sure I can do it."
"Tjina" wrote:
> Hi,
> I have detach my sql database and deleted the transaction logfile.
> Now i cannot attach the database bak to SQL.
> The logfile is completly gone.
> How can i reattach this database (don't want to use the backup)
> Can u help me
> regards
> Steven
>
>|||Have you tried using sp_attach_single_file_db? You can find more
information on using this in books online.
-Sue
On Tue, 26 Oct 2004 10:27:41 -0400, "Tjina" <stjinaton@.nagico.com>
wrote:
>Hi,
>I have detach my sql database and deleted the transaction logfile.
>Now i cannot attach the database bak to SQL.
>The logfile is completly gone.
>How can i reattach this database (don't want to use the backup)
>Can u help me
>regards
>Steven
>|||> As far as I know with SQL2K you can re-attach the database without the log
> file.
Not in all cases...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sasan Saidi" <SasanSaidi@.discussions.microsoft.com> wrote in message
news:942597C9-6CED-4A33-8A27-9F73475A4D0C@.microsoft.com...[vbcol=seagreen]
> As far as I know with SQL2K you can re-attach the database without the log
> file. SQL Server should notify you that the log file was not found and wil
l
> ask you if you want a new log file to be created.
> --
> Sasan Saidi, MSc in CS
> "I saw it work in a cartoon once so I am pretty sure I can do it."
>
> "Tjina" wrote:
>
I have detach my sql database and deleted the transaction logfile.
Now i cannot attach the database bak to SQL.
The logfile is completly gone.
How can i reattach this database (don't want to use the backup)
Can u help me
regards
StevenHi
Look at sp_attach_single_file_db stored procedure.
For more details please refer to BOL
"Tjina" <stjinaton@.nagico.com> wrote in message
news:OPJz1f2uEHA.612@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I have detach my sql database and deleted the transaction logfile.
> Now i cannot attach the database bak to SQL.
> The logfile is completly gone.
> How can i reattach this database (don't want to use the backup)
> Can u help me
> regards
> Steven
>|||As far as I know with SQL2K you can re-attach the database without the log
file. SQL Server should notify you that the log file was not found and will
ask you if you want a new log file to be created.
Sasan Saidi, MSc in CS
"I saw it work in a cartoon once so I am pretty sure I can do it."
"Tjina" wrote:
> Hi,
> I have detach my sql database and deleted the transaction logfile.
> Now i cannot attach the database bak to SQL.
> The logfile is completly gone.
> How can i reattach this database (don't want to use the backup)
> Can u help me
> regards
> Steven
>
>|||Have you tried using sp_attach_single_file_db? You can find more
information on using this in books online.
-Sue
On Tue, 26 Oct 2004 10:27:41 -0400, "Tjina" <stjinaton@.nagico.com>
wrote:
>Hi,
>I have detach my sql database and deleted the transaction logfile.
>Now i cannot attach the database bak to SQL.
>The logfile is completly gone.
>How can i reattach this database (don't want to use the backup)
>Can u help me
>regards
>Steven
>|||> As far as I know with SQL2K you can re-attach the database without the log
> file.
Not in all cases...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sasan Saidi" <SasanSaidi@.discussions.microsoft.com> wrote in message
news:942597C9-6CED-4A33-8A27-9F73475A4D0C@.microsoft.com...[vbcol=seagreen]
> As far as I know with SQL2K you can re-attach the database without the log
> file. SQL Server should notify you that the log file was not found and wil
l
> ask you if you want a new log file to be created.
> --
> Sasan Saidi, MSc in CS
> "I saw it work in a cartoon once so I am pretty sure I can do it."
>
> "Tjina" wrote:
>
Subscribe to:
Posts (Atom)