Showing posts with label backups. Show all posts
Showing posts with label backups. Show all posts

Friday, March 23, 2012

On demand backups

Have a client that needs to do an "on demand" back up of a database. How
can this be done ?
The database in question is used by the accounting department and the
application uses the SA login to access the database.
Any insight would be greatful.
TIAThis is a multi-part message in MIME format.
--=_NextPart_000_0013_01C361A3.29261130
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Ok... after looking at the SQL server, it appears that the accounting =app is using a Login ID, that in turn is the dbo for the accounting =database, so I have given that ID the Backup DB permission on the =server. Now what can I do to place a short cut on the desktops so that =the database is backed up when click (thus on demand). Is there a =script file that I need to write or a command line to be entered ?
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message =news:us9V7HcYDHA.656@.tk2msftngp13.phx.gbl...
An app with the sa password is like a 3-yr old with a .357 magnum. =Your accounting app should not have sysadmin rights. You can grant =BACKUP DATABASE to any login and that's all you would need for that.
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"_M_" <here@.gone.com> wrote in message =news:#KbMuEcYDHA.2464@.TK2MSFTNGP09.phx.gbl...
Have a client that needs to do an "on demand" back up of a database. =How
can this be done ?
The database in question is used by the accounting department and the
application uses the SA login to access the database.
Any insight would be greatful.
TIA
--=_NextPart_000_0013_01C361A3.29261130
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Ok... after looking at the SQL server, =it appears that the accounting app is using a Login ID, that in turn is =the dbo for the accounting database, so I have given that ID the Backup DB =permission on the server. Now what can I do to place a short cut on the =desktops so that the database is backed up when click (thus on demand). Is =there a script file that I need to write or a command line to be entered ?
"Tom Moreau" = wrote in message news:us9V7HcYDHA.656@.t=k2msftngp13.phx.gbl...
An app with the sa password is like =a 3-yr old with a .357 magnum. Your accounting app should not have sysadmin = rights. You can grant BACKUP DATABASE to any login and that's =all you would need for that.
-- Tom

=---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql


"_M_" =wrote in message news:#KbMuEcYDHA.2464=@.TK2MSFTNGP09.phx.gbl...Have a client that needs to do an "on demand" back up of a database. Howcan this be done ?The database in question is used by =the accounting department and theapplication uses the SA login to =access the database.Any insight would be greatful.TIA

--=_NextPart_000_0013_01C361A3.29261130--|||This is a multi-part message in MIME format.
--=_NextPart_000_0338_01C361A5.7026B970
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
You can create a little .CMD file that has the following:
osql -SMyServer -E -Q"backup database MyDB to disk =3D 'C:\MyDB.bak'"
or
osql -SMyServer -UMyLogin -PMyPassword -Q"backup database MyDB to disk ==3D 'C:\MyDB.bak'"
Ideally, use Windows authentication as shown in the first example, so =that no one can see the password. Alternatively, you can write the =second one as:
osql -SMyServer -UMyLogin -Q"backup database MyDB to disk =3D ='C:\MyDB.bak'"
It will then prompt the user for the password.
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"_M_" <here@.gone.com> wrote in message =news:O7KcoScYDHA.888@.TK2MSFTNGP10.phx.gbl...
Ok... after looking at the SQL server, it appears that the accounting =app is using a Login ID, that in turn is the dbo for the accounting =database, so I have given that ID the Backup DB permission on the =server. Now what can I do to place a short cut on the desktops so that =the database is backed up when click (thus on demand). Is there a =script file that I need to write or a command line to be entered ?
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message =news:us9V7HcYDHA.656@.tk2msftngp13.phx.gbl...
An app with the sa password is like a 3-yr old with a .357 magnum. =Your accounting app should not have sysadmin rights. You can grant =BACKUP DATABASE to any login and that's all you would need for that.
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"_M_" <here@.gone.com> wrote in message =news:#KbMuEcYDHA.2464@.TK2MSFTNGP09.phx.gbl...
Have a client that needs to do an "on demand" back up of a database. =How
can this be done ?
The database in question is used by the accounting department and the
application uses the SA login to access the database.
Any insight would be greatful.
TIA
--=_NextPart_000_0338_01C361A5.7026B970
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

You can create a little .CMD file that =has the following:
osql -SMyServer -E -Q"backup =database MyDB to disk =3D 'C:\MyDB.bak'"
or
osql -SMyServer -UMyLogin -PMyPassword -Q"backup database MyDB to disk =3D ='C:\MyDB.bak'"
Ideally, use Windows authentication as shown in the first example, =so that no one can see the password. Alternatively, you can write the =second one as:
osql -SMyServer =-UMyLogin -Q"backup database MyDB to disk =3D 'C:\MyDB.bak'"
It will then prompt the user for the =password.
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"_M_" =wrote in message news:O7KcoScYDHA.888@.T=K2MSFTNGP10.phx.gbl...
Ok... after looking at the SQL server, =it appears that the accounting app is using a Login ID, that in turn is =the dbo for the accounting database, so I have given that ID the Backup DB =permission on the server. Now what can I do to place a short cut on the =desktops so that the database is backed up when click (thus on demand). Is =there a script file that I need to write or a command line to be entered ?
"Tom Moreau" = wrote in message news:us9V7HcYDHA.656@.t=k2msftngp13.phx.gbl...
An app with the sa password is like =a 3-yr old with a .357 magnum. Your accounting app should not have sysadmin = rights. You can grant BACKUP DATABASE to any login and that's =all you would need for that.
-- Tom

=---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql


"_M_" =wrote in message news:#KbMuEcYDHA.2464=@.TK2MSFTNGP09.phx.gbl...Have a client that needs to do an "on demand" back up of a database. Howcan this be done ?The database in question is used by =the accounting department and theapplication uses the SA login to =access the database.Any insight would be greatful.TIA

--=_NextPart_000_0338_01C361A5.7026B970--|||Dbo does not have to have backup database permission. A dbo can do anything
to the database that he/she owns..
Here is something short I did
1. create this proc ( you need to adjust the db name)
create proc dbo.bu as
declare @.fname varchar(128)
select @.fname = 'c:\' +
db_name() + '_DB_' + convert(varchar(100), getdate(),112)
+ datename(hh,getdate()) + datename(mi,getdate())
--select @.fname
backup database northwind to disk = @.fname
create a dos batch job like this
OSQL -Ulogin -Ppassword -Q"exec dbname.dbo.bu"
when the job is run the backup occurs...
Then put a shortcut to the job on their desktop
I would create a new login for the database which has ONLY backup
permissions, since the login and password are easily found...
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 its
community of SQL Server professionals.
www.sqlpass.org
"_M_" <here@.gone.com> wrote in message
news:#KbMuEcYDHA.2464@.TK2MSFTNGP09.phx.gbl...
> Have a client that needs to do an "on demand" back up of a database. How
> can this be done ?
> The database in question is used by the accounting department and the
> application uses the SA login to access the database.
> Any insight would be greatful.
> TIA
>|||I like both yours and Tom's responses... Can yours be modified to use
Windows Authentication or can Tom's be modified to save each backup in the
time-date file name like yours ?
I'm sort of new to this SQL server stuff but I have had a semester of DB in
college...
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:OVu5IfcYDHA.2524@.TK2MSFTNGP09.phx.gbl...
> Dbo does not have to have backup database permission. A dbo can do
anything
> to the database that he/she owns..
> Here is something short I did
> 1. create this proc ( you need to adjust the db name)
> create proc dbo.bu as
> declare @.fname varchar(128)
> select @.fname = 'c:\' +
> db_name() + '_DB_' + convert(varchar(100), getdate(),112)
> + datename(hh,getdate()) + datename(mi,getdate())
> --select @.fname
> backup database northwind to disk = @.fname
> create a dos batch job like this
> OSQL -Ulogin -Ppassword -Q"exec dbname.dbo.bu"
> when the job is run the backup occurs...
> Then put a shortcut to the job on their desktop
> I would create a new login for the database which has ONLY backup
> permissions, since the login and password are easily found...
>
> --
> 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 its
> community of SQL Server professionals.
> www.sqlpass.org
>
> "_M_" <here@.gone.com> wrote in message
> news:#KbMuEcYDHA.2464@.TK2MSFTNGP09.phx.gbl...
> > Have a client that needs to do an "on demand" back up of a database.
How
> > can this be done ?
> >
> > The database in question is used by the accounting department and the
> > application uses the SA login to access the database.
> >
> > Any insight would be greatful.
> >
> > TIA
> >
> >
>|||This is a multi-part message in MIME format.
--=_NextPart_000_03C3_01C361AA.859BF130
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Tom's can be modified. ;-) Just have it execute the proc instead of =the raw BACKUP:
osql -SMyServer -E -Q"exec MyBackupProc"
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"_M_" <here@.gone.com> wrote in message =news:uofpKqcYDHA.2448@.TK2MSFTNGP09.phx.gbl...
I like both yours and Tom's responses... Can yours be modified to use
Windows Authentication or can Tom's be modified to save each backup in =the
time-date file name like yours ?
I'm sort of new to this SQL server stuff but I have had a semester of DB =in
college...
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:OVu5IfcYDHA.2524@.TK2MSFTNGP09.phx.gbl...
> Dbo does not have to have backup database permission. A dbo can do
anything
> to the database that he/she owns..
> Here is something short I did
> 1. create this proc ( you need to adjust the db name)
> create proc dbo.bu as
> declare @.fname varchar(128)
> select @.fname =3D 'c:\' +
> db_name() + '_DB_' + convert(varchar(100), getdate(),112)
> + datename(hh,getdate()) + datename(mi,getdate())
> --select @.fname
> backup database northwind to disk =3D @.fname
> create a dos batch job like this
> OSQL -Ulogin -Ppassword -Q"exec dbname.dbo.bu"
> when the job is run the backup occurs...
> Then put a shortcut to the job on their desktop
> I would create a new login for the database which has ONLY backup
> permissions, since the login and password are easily found...
>
> --
> 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 its
> community of SQL Server professionals.
> www.sqlpass.org
>
> "_M_" <here@.gone.com> wrote in message
> news:#KbMuEcYDHA.2464@.TK2MSFTNGP09.phx.gbl...
> > Have a client that needs to do an "on demand" back up of a database.
How
> > can this be done ?
> >
> > The database in question is used by the accounting department and =the
> > application uses the SA login to access the database.
> >
> > Any insight would be greatful.
> >
> > TIA
> >
> >
>
--=_NextPart_000_03C3_01C361AA.859BF130
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Tom's can be modified. ;-) =Just have it execute the proc instead of the raw BACKUP:
osql -SMyServer -E -Q"exec MyBackupProc"
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"_M_" =wrote in message news:uofpKqcYDHA.2448=@.TK2MSFTNGP09.phx.gbl...I like both yours and Tom's responses... Can yours be modified to useWindows Authentication or can Tom's be modified to save each =backup in thetime-date file name like yours ?I'm sort of new to this =SQL server stuff but I have had a semester of DB =incollege..."Wayne Snyder" wrote in messagenews:OVu5IfcYDHA.2524=@.TK2MSFTNGP09.phx.gbl...> Dbo does not have to have backup database permission. A dbo can doanything> to the database that he/she =owns..>> Here is something short I did> 1. create this proc ( you need to =adjust the db name)> create proc dbo.bu as> declare @.fname =varchar(128)> select @.fname =3D 'c:\' +> db_name() + '_DB_' + =convert(varchar(100), getdate(),112)> + datename(hh,getdate()) + datename(mi,getdate())> --select @.fname> backup database =northwind to disk =3D @.fname>> create a dos batch job like =this> OSQL -Ulogin -Ppassword -Q"exec dbname.dbo.bu">> when the job =is run the backup occurs...>> Then put a shortcut to the job on =their desktop>> I would create a new login for the database =which has ONLY backup> permissions, since the login and password are easily =found...>>> --> Wayne Snyder, MCDBA, SQL =Server MVP> Computer Education Services Corporation (CESC), Charlotte, NC>http://www.computeredservices.com">www.computeredservices.com=> (Please respond only to the newsgroups.)>> I support the Professional Association of SQL Server (PASS) and its> community =of SQL Server professionals.>>&g=">http://www.sqlpass.org">www.sqlpass.org>>&g=t; "_M_" wrote in message> news:#KbMuEcYDHA.2464=@.TK2MSFTNGP09.phx.gbl...> > Have a client that needs to do an "on demand" back up of a database.How> > can this be done ?> >> => The database in question is used by the accounting department and =the> > application uses the SA login to access the database.> =>> > Any insight would be greatful.> >> > TIA> >> >>>

--=_NextPart_000_03C3_01C361AA.859BF130--|||Tried to create the procedure as listed by Wayne... I get an error message
(Invalid syntax at or around backup"
I did do a cut and paste as well as completely re-typing it myself. The
server is SQL 2000 if that matters...
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:OVu5IfcYDHA.2524@.TK2MSFTNGP09.phx.gbl...
> Dbo does not have to have backup database permission. A dbo can do
anything
> to the database that he/she owns..
> Here is something short I did
> 1. create this proc ( you need to adjust the db name)
> create proc dbo.bu as
> declare @.fname varchar(128)
> select @.fname = 'c:\' +
> db_name() + '_DB_' + convert(varchar(100), getdate(),112)
> + datename(hh,getdate()) + datename(mi,getdate())
> --select @.fname
> backup database northwind to disk = @.fname
> create a dos batch job like this
> OSQL -Ulogin -Ppassword -Q"exec dbname.dbo.bu"
> when the job is run the backup occurs...
> Then put a shortcut to the job on their desktop
> I would create a new login for the database which has ONLY backup
> permissions, since the login and password are easily found...
>
> --
> 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 its
> community of SQL Server professionals.
> www.sqlpass.org
>
> "_M_" <here@.gone.com> wrote in message
> news:#KbMuEcYDHA.2464@.TK2MSFTNGP09.phx.gbl...
> > Have a client that needs to do an "on demand" back up of a database.
How
> > can this be done ?
> >
> > The database in question is used by the accounting department and the
> > application uses the SA login to access the database.
> >
> > Any insight would be greatful.
> >
> > TIA
> >
> >
>sql

Monday, February 20, 2012

Old Backups not being deleted

We are having a consistent problem here with the archived backups not being
deleted like is defined in the maintenance plans.
We have the maintenance plan set to backup all user databases and keep the
past 7 days worth. But after the 7th day it is NOT deleting the older
backups. So the first time we found this out was when the server ran out of
disk space and we found a full months worth of backups in the SQL Server
backup directory!
Any idea why this is happen and how to fix it so that maint plan works as
its being told to work?
Thanks,
John Gundrum
There are some knowledge base articles regarding this issue. Have you checked
those? One of them refers to the transaction log backup being part of the
plan but one of the databases being backed up having SIMPLE as the recovery
method.
"John Gundrum" wrote:

> We are having a consistent problem here with the archived backups not being
> deleted like is defined in the maintenance plans.
> We have the maintenance plan set to backup all user databases and keep the
> past 7 days worth. But after the 7th day it is NOT deleting the older
> backups. So the first time we found this out was when the server ran out of
> disk space and we found a full months worth of backups in the SQL Server
> backup directory!
> Any idea why this is happen and how to fix it so that maint plan works as
> its being told to work?
> Thanks,
> John Gundrum
|||Yes, we've looked into that and the transaction log is not part of the plan.
The back plan has been recreated once again for the user databases and we'll
start to see if old backups are being deleted later this week.
John Gundrum
"Charles Allen" wrote:
[vbcol=seagreen]
> There are some knowledge base articles regarding this issue. Have you checked
> those? One of them refers to the transaction log backup being part of the
> plan but one of the databases being backed up having SIMPLE as the recovery
> method.
> "John Gundrum" wrote:

Old Backups not being deleted

We are having a consistent problem here with the archived backups not being
deleted like is defined in the maintenance plans.
We have the maintenance plan set to backup all user databases and keep the
past 7 days worth. But after the 7th day it is NOT deleting the older
backups. So the first time we found this out was when the server ran out of
disk space and we found a full months worth of backups in the SQL Server
backup directory!
Any idea why this is happen and how to fix it so that maint plan works as
its being told to work?
Thanks,
John Gundrum
> Any idea why this is happen and how to fix it so that maint plan works as
> its being told to work?
I had maintenance plans set up to delete backups more than two days old, and
it was leaving 4 or 5 days, depending on if it was over the weekend or not.
I've heard many reports of maintenance plans having similarly weird
behavior.
Instead of trying to investigate and fix the nonsense, I wrote a standalone
app that deleted backups older than 2 days.
|||Take a look at:
BUG: Expired Transaction Log Backups May Not Be Deleted by Maintenance Plan
http://support.microsoft.com/default...&Product=sql2k
"I saw it work in a cartoon once so I am pretty sure I can do it."
"Aaron [SQL Server MVP]" wrote:

> I had maintenance plans set up to delete backups more than two days old, and
> it was leaving 4 or 5 days, depending on if it was over the weekend or not.
> I've heard many reports of maintenance plans having similarly weird
> behavior.
> Instead of trying to investigate and fix the nonsense, I wrote a standalone
> app that deleted backups older than 2 days.
>
>

Old Backups not being deleted

We are having a consistent problem here with the archived backups not being
deleted like is defined in the maintenance plans.
We have the maintenance plan set to backup all user databases and keep the
past 7 days worth. But after the 7th day it is NOT deleting the older
backups. So the first time we found this out was when the server ran out of
disk space and we found a full months worth of backups in the SQL Server
backup directory!
Any idea why this is happen and how to fix it so that maint plan works as
its being told to work?
Thanks,
John Gundrum> Any idea why this is happen and how to fix it so that maint plan works as
> its being told to work?
I had maintenance plans set up to delete backups more than two days old, and
it was leaving 4 or 5 days, depending on if it was over the weekend or not.
I've heard many reports of maintenance plans having similarly weird
behavior.
Instead of trying to investigate and fix the nonsense, I wrote a standalone
app that deleted backups older than 2 days.|||Take a look at:
BUG: Expired Transaction Log Backups May Not Be Deleted by Maintenance Plan
http://support.microsoft.com/default.aspx?scid=kb;en-us;303292&Product=sql2k
--
"I saw it work in a cartoon once so I am pretty sure I can do it."
"Aaron [SQL Server MVP]" wrote:
> > Any idea why this is happen and how to fix it so that maint plan works as
> > its being told to work?
> I had maintenance plans set up to delete backups more than two days old, and
> it was leaving 4 or 5 days, depending on if it was over the weekend or not.
> I've heard many reports of maintenance plans having similarly weird
> behavior.
> Instead of trying to investigate and fix the nonsense, I wrote a standalone
> app that deleted backups older than 2 days.
>
>

Old Backups not being deleted

We are having a consistent problem here with the archived backups not being
deleted like is defined in the maintenance plans.
We have the maintenance plan set to backup all user databases and keep the
past 7 days worth. But after the 7th day it is NOT deleting the older
backups. So the first time we found this out was when the server ran out of
disk space and we found a full months worth of backups in the SQL Server
backup directory!
Any idea why this is happen and how to fix it so that maint plan works as
its being told to work?
Thanks,
John Gundrum> Any idea why this is happen and how to fix it so that maint plan works as
> its being told to work?
I had maintenance plans set up to delete backups more than two days old, and
it was leaving 4 or 5 days, depending on if it was over the weekend or not.
I've heard many reports of maintenance plans having similarly weird
behavior.
Instead of trying to investigate and fix the nonsense, I wrote a standalone
app that deleted backups older than 2 days.|||Take a look at:
BUG: Expired Transaction Log Backups May Not Be Deleted by Maintenance Plan
http://support.microsoft.com/defaul...2&Product=sql2k
"I saw it work in a cartoon once so I am pretty sure I can do it."
"Aaron [SQL Server MVP]" wrote:

> I had maintenance plans set up to delete backups more than two days old, a
nd
> it was leaving 4 or 5 days, depending on if it was over the weekend or not
.
> I've heard many reports of maintenance plans having similarly weird
> behavior.
> Instead of trying to investigate and fix the nonsense, I wrote a standalon
e
> app that deleted backups older than 2 days.
>
>

Old backups are not deleted

Hi guys,
I find out that if you use DMP and change the backup path from default and
set the settings to delete old backup , say after 3 days, it doesnt really
delete them. IS it a bug? Is there any fix for it? It happens in SQL2000 as
well as in SQL2005
TIAWait one more day, you need to check the clock it will delte it on the 4th
day only. We are also using DMP and specified "Use This Directory",
Remove files older that 3 days , and provided "backup file extension" as
"BAK" same as i provided for backup's... You have not mentioned that in you
r
configuration list. Try "backup file extension" and see. Let me know if it
works? Check MSSQL/ErrorLog also and see if there is something unusal.
Thanks,
Sree
"rupart" wrote:

> Hi guys,
> I find out that if you use DMP and change the backup path from default and
> set the settings to delete old backup , say after 3 days, it doesnt really
> delete them. IS it a bug? Is there any fix for it? It happens in SQL2000 a
s
> well as in SQL2005
>
> TIA|||hi Sreejit,
Yes i have specified .bak or .trn. But i saw there are files more than 4
days. SOme are even 1 mth back. CLose to the day we started to backup.
"Sreejith G" wrote:
[vbcol=seagreen]
> Wait one more day, you need to check the clock it will delte it on the 4th
> day only. We are also using DMP and specified "Use This Directory",
> Remove files older that 3 days , and provided "backup file extension" as
> "BAK" same as i provided for backup's... You have not mentioned that in y
our
> configuration list. Try "backup file extension" and see. Let me know if it
> works? Check MSSQL/ErrorLog also and see if there is something unusal.
> Thanks,
> Sree
>
> "rupart" wrote:
>

Old backups are not deleted

Hi guys,
I find out that if you use DMP and change the backup path from default and
set the settings to delete old backup , say after 3 days, it doesnt really
delete them. IS it a bug? Is there any fix for it? It happens in SQL2000 as
well as in SQL2005
TIA
Wait one more day, you need to check the clock it will delte it on the 4th
day only. We are also using DMP and specified "Use This Directory",
Remove files older that 3 days , and provided "backup file extension" as
"BAK" same as i provided for backup's... You have not mentioned that in your
configuration list. Try "backup file extension" and see. Let me know if it
works? Check MSSQL/ErrorLog also and see if there is something unusal.
Thanks,
Sree
"rupart" wrote:

> Hi guys,
> I find out that if you use DMP and change the backup path from default and
> set the settings to delete old backup , say after 3 days, it doesnt really
> delete them. IS it a bug? Is there any fix for it? It happens in SQL2000 as
> well as in SQL2005
>
> TIA
|||hi Sreejit,
Yes i have specified .bak or .trn. But i saw there are files more than 4
days. SOme are even 1 mth back. CLose to the day we started to backup.
"Sreejith G" wrote:
[vbcol=seagreen]
> Wait one more day, you need to check the clock it will delte it on the 4th
> day only. We are also using DMP and specified "Use This Directory",
> Remove files older that 3 days , and provided "backup file extension" as
> "BAK" same as i provided for backup's... You have not mentioned that in your
> configuration list. Try "backup file extension" and see. Let me know if it
> works? Check MSSQL/ErrorLog also and see if there is something unusal.
> Thanks,
> Sree
>
> "rupart" wrote:

Old backups are not deleted

Hi guys,
I find out that if you use DMP and change the backup path from default and
set the settings to delete old backup , say after 3 days, it doesnt really
delete them. IS it a bug? Is there any fix for it? It happens in SQL2000 as
well as in SQL2005
TIAWait one more day, you need to check the clock it will delte it on the 4th
day only. We are also using DMP and specified "Use This Directory",
Remove files older that 3 days , and provided "backup file extension" as
"BAK" same as i provided for backup's... You have not mentioned that in your
configuration list. Try "backup file extension" and see. Let me know if it
works? Check MSSQL/ErrorLog also and see if there is something unusal.
Thanks,
Sree
"rupart" wrote:
> Hi guys,
> I find out that if you use DMP and change the backup path from default and
> set the settings to delete old backup , say after 3 days, it doesnt really
> delete them. IS it a bug? Is there any fix for it? It happens in SQL2000 as
> well as in SQL2005
>
> TIA|||hi Sreejit,
Yes i have specified .bak or .trn. But i saw there are files more than 4
days. SOme are even 1 mth back. CLose to the day we started to backup.
"Sreejith G" wrote:
> Wait one more day, you need to check the clock it will delte it on the 4th
> day only. We are also using DMP and specified "Use This Directory",
> Remove files older that 3 days , and provided "backup file extension" as
> "BAK" same as i provided for backup's... You have not mentioned that in your
> configuration list. Try "backup file extension" and see. Let me know if it
> works? Check MSSQL/ErrorLog also and see if there is something unusal.
> Thanks,
> Sree
>
> "rupart" wrote:
> > Hi guys,
> > I find out that if you use DMP and change the backup path from default and
> > set the settings to delete old backup , say after 3 days, it doesnt really
> > delete them. IS it a bug? Is there any fix for it? It happens in SQL2000 as
> > well as in SQL2005
> >
> >
> > TIA

Old backup are not delete

I have setup a maintenance plan to do a daily backup of my 10 SQL BD. The
backups are running perfectly.
I also checked in the database maintenance plan to the "Remove files older
than: 1 day"
But if I check in the directory were my backups reside, I still see the last
5 daily backup?
Is there something that I forgot?
Thanks
JPJP
Have you checked that an account under SQL Server Agent runs has appropriate
permissions to delete these files?
"JP Breton" <jpbreton@.videotron.ca> wrote in message
news:%23CcnHHZSFHA.3088@.TK2MSFTNGP15.phx.gbl...
> I have setup a maintenance plan to do a daily backup of my 10 SQL BD. The
> backups are running perfectly.
> I also checked in the database maintenance plan to the "Remove files older
> than: 1 day"
> But if I check in the directory were my backups reside, I still see the
last
> 5 daily backup?
> Is there something that I forgot?
> Thanks
> JP
>
>|||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/
"JP Breton" <jpbreton@.videotron.ca> wrote in message news:%23CcnHHZSFHA.3088@.TK2MSFTNGP15.phx.gbl...
>I have setup a maintenance plan to do a daily backup of my 10 SQL BD. The backups are running
>perfectly.
> I also checked in the database maintenance plan to the "Remove files older than: 1 day"
> But if I check in the directory were my backups reside, I still see the last 5 daily backup?
> Is there something that I forgot?
> Thanks
> JP
>
>|||Thanks Uri, thanks Tibor,
The SQL agent is ruuning with domain admin rights (I know it should not be
that way)
But I will still verify to make sure that the account can delete files.
Regards
JP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23fxRENZSFHA.3336@.TK2MSFTNGP10.phx.gbl...
> 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/
>
> "JP Breton" <jpbreton@.videotron.ca> wrote in message
> news:%23CcnHHZSFHA.3088@.TK2MSFTNGP15.phx.gbl...
>>I have setup a maintenance plan to do a daily backup of my 10 SQL BD. The
>>backups are running perfectly.
>> I also checked in the database maintenance plan to the "Remove files
>> older than: 1 day"
>> But if I check in the directory were my backups reside, I still see the
>> last 5 daily backup?
>> Is there something that I forgot?
>> Thanks
>> JP
>>
>