Showing posts with label dump. Show all posts
Showing posts with label dump. Show all posts

Monday, February 13, 2012

Backup w/RETAINDAYS just keeps growin', and growin'

Hi all;

I need to make daily backups to a computer in another domain, where I can't map a drive, so I use the TSQL to create a dump device, which works fine:

EXEC sp_addumpdevice 'disk', 'MyBackupDevice', [ipaddress & directory/file]

Then I schedule a server job which faithfully backs up my database, with one hitch - it never deletes days older than 5 as per the code - it just keeps growing. The command couldn't be much simpler:

BACKUP DATABASE ProductionETC to MyBackupDevice WITH RETAINDAYS = 5

For now, I just create a new backup device every now and then and go back and forth, deleting the oldest one when I create a new one. But it's annoying! Any ideas what I'm doing wrong?

Thanks,

L. Rap

RETAINDAYS only prevents SQL Server from overwriting the file unless the specified number of days have elapsed. It doesn't mean that SQL Server will automatically delete the file or erase the media after the specified number of days. So you will have to delete the files using your own scheduled job or use a database maintainence task (you can create from Enterprise Manager or SSMS).|||

Thanks Umachandar, that's very helpful. I misunderstood the instructions.

Would you happen to know if it is possible to delete the earliest backup from the set using T-SQL or some other preset command, or if I need to schedule an OS job to simply delete the file and start over?

Regards,

L. Rap

Friday, February 10, 2012

Backup to NAS - Permissions

I am trying to backup my database to a NAS device. I have added a dump device
successfully:
[USE master
EXEC sp_addumpdevice 'disk', 'mydb_bu_nas', '\\nas1\dbbackups\mydb_bu.BAK']
...but when I try to run the backup:
[use mydb
BACKUP DATABASE mydb TO mydb_bu_nas]
...I get the error:
[Cannot open backup device 'digitaldraw_bu_nas_2'. Device error or device
off-line. See the SQL Server error log for more details.]
The event log shows the following details:
[18204 :
BackupDiskFile::CreateMedia: Backup device '\\nas1\dbbackups\mydb_bu.BAK'
failed to create. Operating system error = 5(Access is denied.).]
The MSSQLSERVER Service is running under the local system account. I assume
that this is the user that would need permissions to write to the NAS. If I
change the MSSQLSERVER Service to run as a Domain User are there any other
implications that I should be aware of?
Backups are always done under the account that SQL Server service uses and
must have rights to the share on the NAS. You should use a Domain account
that has the minimum permissions to do the things you need done and no more.
Andrew J. Kelly SQL MVP
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:6BE37CF7-54A1-4DE4-A71B-DE5F58A991FD@.microsoft.com...
>I am trying to backup my database to a NAS device. I have added a dump
>device
> successfully:
> [USE master
> EXEC sp_addumpdevice 'disk', 'mydb_bu_nas',
> '\\nas1\dbbackups\mydb_bu.BAK']
> ..but when I try to run the backup:
> [use mydb
> BACKUP DATABASE mydb TO mydb_bu_nas]
> ..I get the error:
> [Cannot open backup device 'digitaldraw_bu_nas_2'. Device error or device
> off-line. See the SQL Server error log for more details.]
> The event log shows the following details:
> [18204 :
> BackupDiskFile::CreateMedia: Backup device '\\nas1\dbbackups\mydb_bu.BAK'
> failed to create. Operating system error = 5(Access is denied.).]
> The MSSQLSERVER Service is running under the local system account. I
> assume
> that this is the user that would need permissions to write to the NAS. If
> I
> change the MSSQLSERVER Service to run as a Domain User are there any other
> implications that I should be aware of?
>
|||HowTo: Backup to UNC name using Database Maintenance Wizard
http://support.microsoft.com/default...b;en-us;555128
The requirements are the same whether you are backing up to a NAS device or
a Windows file share.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:6BE37CF7-54A1-4DE4-A71B-DE5F58A991FD@.microsoft.com...
>I am trying to backup my database to a NAS device. I have added a dump
>device
> successfully:
> [USE master
> EXEC sp_addumpdevice 'disk', 'mydb_bu_nas',
> '\\nas1\dbbackups\mydb_bu.BAK']
> ..but when I try to run the backup:
> [use mydb
> BACKUP DATABASE mydb TO mydb_bu_nas]
> ..I get the error:
> [Cannot open backup device 'digitaldraw_bu_nas_2'. Device error or device
> off-line. See the SQL Server error log for more details.]
> The event log shows the following details:
> [18204 :
> BackupDiskFile::CreateMedia: Backup device '\\nas1\dbbackups\mydb_bu.BAK'
> failed to create. Operating system error = 5(Access is denied.).]
> The MSSQLSERVER Service is running under the local system account. I
> assume
> that this is the user that would need permissions to write to the NAS. If
> I
> change the MSSQLSERVER Service to run as a Domain User are there any other
> implications that I should be aware of?
>

Backup to NAS - Permissions

I am trying to backup my database to a NAS device. I have added a dump devic
e
successfully:
[USE master
EXEC sp_addumpdevice 'disk', 'mydb_bu_nas', '\\nas1\dbbackups\mydb_bu.BAK']
..but when I try to run the backup:
[use mydb
BACKUP DATABASE mydb TO mydb_bu_nas]
..I get the error:
[Cannot open backup device 'digitaldraw_bu_nas_2'. Device error or devic
e
off-line. See the SQL Server error log for more details.]
The event log shows the following details:
[18204 :
BackupDiskFile::CreateMedia: Backup device '\\nas1\dbbackups\mydb_bu.BAK'
failed to create. Operating system error = 5(Access is denied.).]
The MSSQLSERVER Service is running under the local system account. I assume
that this is the user that would need permissions to write to the NAS. If I
change the MSSQLSERVER Service to run as a Domain User are there any other
implications that I should be aware of?Backups are always done under the account that SQL Server service uses and
must have rights to the share on the NAS. You should use a Domain account
that has the minimum permissions to do the things you need done and no more.
Andrew J. Kelly SQL MVP
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:6BE37CF7-54A1-4DE4-A71B-DE5F58A991FD@.microsoft.com...
>I am trying to backup my database to a NAS device. I have added a dump
>device
> successfully:
> [USE master
> EXEC sp_addumpdevice 'disk', 'mydb_bu_nas',
> '\\nas1\dbbackups\mydb_bu.BAK']
> ..but when I try to run the backup:
> [use mydb
> BACKUP DATABASE mydb TO mydb_bu_nas]
> ..I get the error:
> [Cannot open backup device 'digitaldraw_bu_nas_2'. Device error or dev
ice
> off-line. See the SQL Server error log for more details.]
> The event log shows the following details:
> [18204 :
> BackupDiskFile::CreateMedia: Backup device '\\nas1\dbbackups\mydb_bu.BAK'
> failed to create. Operating system error = 5(Access is denied.).]
> The MSSQLSERVER Service is running under the local system account. I
> assume
> that this is the user that would need permissions to write to the NAS. If
> I
> change the MSSQLSERVER Service to run as a Domain User are there any other
> implications that I should be aware of?
>|||HowTo: Backup to UNC name using Database Maintenance Wizard
http://support.microsoft.com/defaul...kb;en-us;555128
The requirements are the same whether you are backing up to a NAS device or
a Windows file share.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:6BE37CF7-54A1-4DE4-A71B-DE5F58A991FD@.microsoft.com...
>I am trying to backup my database to a NAS device. I have added a dump
>device
> successfully:
> [USE master
> EXEC sp_addumpdevice 'disk', 'mydb_bu_nas',
> '\\nas1\dbbackups\mydb_bu.BAK']
> ..but when I try to run the backup:
> [use mydb
> BACKUP DATABASE mydb TO mydb_bu_nas]
> ..I get the error:
> [Cannot open backup device 'digitaldraw_bu_nas_2'. Device error or dev
ice
> off-line. See the SQL Server error log for more details.]
> The event log shows the following details:
> [18204 :
> BackupDiskFile::CreateMedia: Backup device '\\nas1\dbbackups\mydb_bu.BAK'
> failed to create. Operating system error = 5(Access is denied.).]
> The MSSQLSERVER Service is running under the local system account. I
> assume
> that this is the user that would need permissions to write to the NAS. If
> I
> change the MSSQLSERVER Service to run as a Domain User are there any other
> implications that I should be aware of?
>

Backup to NAS - Permissions

I am trying to backup my database to a NAS device. I have added a dump device
successfully:
[USE master
EXEC sp_addumpdevice 'disk', 'mydb_bu_nas', '\\nas1\dbbackups\mydb_bu.BAK']
..but when I try to run the backup:
[use mydb
BACKUP DATABASE mydb TO mydb_bu_nas]
..I get the error:
[Cannot open backup device 'digitaldraw_bu_nas_2'. Device error or device
off-line. See the SQL Server error log for more details.]
The event log shows the following details:
[18204 :
BackupDiskFile::CreateMedia: Backup device '\\nas1\dbbackups\mydb_bu.BAK'
failed to create. Operating system error = 5(Access is denied.).]
The MSSQLSERVER Service is running under the local system account. I assume
that this is the user that would need permissions to write to the NAS. If I
change the MSSQLSERVER Service to run as a Domain User are there any other
implications that I should be aware of?Backups are always done under the account that SQL Server service uses and
must have rights to the share on the NAS. You should use a Domain account
that has the minimum permissions to do the things you need done and no more.
--
Andrew J. Kelly SQL MVP
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:6BE37CF7-54A1-4DE4-A71B-DE5F58A991FD@.microsoft.com...
>I am trying to backup my database to a NAS device. I have added a dump
>device
> successfully:
> [USE master
> EXEC sp_addumpdevice 'disk', 'mydb_bu_nas',
> '\\nas1\dbbackups\mydb_bu.BAK']
> ..but when I try to run the backup:
> [use mydb
> BACKUP DATABASE mydb TO mydb_bu_nas]
> ..I get the error:
> [Cannot open backup device 'digitaldraw_bu_nas_2'. Device error or device
> off-line. See the SQL Server error log for more details.]
> The event log shows the following details:
> [18204 :
> BackupDiskFile::CreateMedia: Backup device '\\nas1\dbbackups\mydb_bu.BAK'
> failed to create. Operating system error = 5(Access is denied.).]
> The MSSQLSERVER Service is running under the local system account. I
> assume
> that this is the user that would need permissions to write to the NAS. If
> I
> change the MSSQLSERVER Service to run as a Domain User are there any other
> implications that I should be aware of?
>|||HowTo: Backup to UNC name using Database Maintenance Wizard
http://support.microsoft.com/default.aspx?scid=kb;en-us;555128
The requirements are the same whether you are backing up to a NAS device or
a Windows file share.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:6BE37CF7-54A1-4DE4-A71B-DE5F58A991FD@.microsoft.com...
>I am trying to backup my database to a NAS device. I have added a dump
>device
> successfully:
> [USE master
> EXEC sp_addumpdevice 'disk', 'mydb_bu_nas',
> '\\nas1\dbbackups\mydb_bu.BAK']
> ..but when I try to run the backup:
> [use mydb
> BACKUP DATABASE mydb TO mydb_bu_nas]
> ..I get the error:
> [Cannot open backup device 'digitaldraw_bu_nas_2'. Device error or device
> off-line. See the SQL Server error log for more details.]
> The event log shows the following details:
> [18204 :
> BackupDiskFile::CreateMedia: Backup device '\\nas1\dbbackups\mydb_bu.BAK'
> failed to create. Operating system error = 5(Access is denied.).]
> The MSSQLSERVER Service is running under the local system account. I
> assume
> that this is the user that would need permissions to write to the NAS. If
> I
> change the MSSQLSERVER Service to run as a Domain User are there any other
> implications that I should be aware of?
>

Backup to dump device

Hello:
I am trying to backup to a dump device using sqlserver 2000 to the local
disk.
I am using retaindays=3. I thought you need to use that with the init
command, but it is failing. So, I am using that alone and the backup is
ignoring the retention policy on the dump device and backing the files up
one after the other without removing those older than 3 days.
I keep getting the error message media has a date that has not expired.
Anybody now what is happening here:
Backup database x to xx
with
retaindays=3,
mediadescription = 'backupxxx'
medianname = 'backupxx'
thanks in advance for your help,
Steve K.The only thing that RETAINDAYS and EXPIREDATE does is that it won't allow yo
u to overwrite before
that date. These option will not, in any way, automate deletion of old files
or anything to that
effect.
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=...ls
erver
"Steve K." <steve@.kitley.com> wrote in message news:OAKHDO86DHA.1632@.TK2MSFTNGP12.phx.gbl...[QUOTE
]
> Hello:
> I am trying to backup to a dump device using sqlserver 2000 to the local
> disk.
> I am using retaindays=3. I thought you need to use that with the init
> command, but it is failing. So, I am using that alone and the backup is
> ignoring the retention policy on the dump device and backing the files up
> one after the other without removing those older than 3 days.
> I keep getting the error message media has a date that has not expired.
> Anybody now what is happening here:
> Backup database x to xx
> with
> retaindays=3,
> mediadescription = 'backupxxx'
> medianname = 'backupxx'
> thanks in advance for your help,
> Steve K.
>[/QUOTE]|||Thanks Tibor!
I used SQL Server 7.0 before and could have sworn I had done that. But,
unfortunately I have lost my code since that time.
I will forget the idea.
thanks,
Steve
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ezo9oq86DHA.1636@.TK2MSFTNGP12.phx.gbl...
quote:

> The only thing that RETAINDAYS and EXPIREDATE does is that it won't allow

you to overwrite before
quote:

> that date. These option will not, in any way, automate deletion of old

files or anything to that
quote:

> effect.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:

http://groups.google.com/groups?oi=...ublic.sqlserver
quote:

>
> "Steve K." <steve@.kitley.com> wrote in message

news:OAKHDO86DHA.1632@.TK2MSFTNGP12.phx.gbl...
quote:

up[QUOTE]
>
|||Sorry to disappoint you, Steve... :-)
You might want to verify in BOL, just to be absolutely certain. Just in case
you haven't seen this,
the Maintenance Wizard does automate deletion of old backup file...
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=...ls
erver
"SteveK" <steve(removethis)@.kitley.com> wrote in message
news:u28ooH96DHA.632@.TK2MSFTNGP12.phx.gbl...
quote:

> Thanks Tibor!
> I used SQL Server 7.0 before and could have sworn I had done that. But,
> unfortunately I have lost my code since that time.
> I will forget the idea.
> thanks,
> Steve
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n
> message news:ezo9oq86DHA.1636@.TK2MSFTNGP12.phx.gbl...
> you to overwrite before
> files or anything to that
> [url]http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver[/url
]
> news:OAKHDO86DHA.1632@.TK2MSFTNGP12.phx.gbl...
> up
>
|||Thanks Tibor,
I will check that out tonight. Great. If it works, then that must have been
the way I did it.
I really appreciate your help.
Best regards & thanks again,
Steve K.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:u%237dsc96DHA.2628@.TK2MSFTNGP10.phx.gbl...
quote:

> Sorry to disappoint you, Steve... :-)
> You might want to verify in BOL, just to be absolutely certain. Just in

case you haven't seen this,
quote:

> the Maintenance Wizard does automate deletion of old backup file...
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:

http://groups.google.com/groups?oi=...ublic.sqlserver
quote:

>
> "SteveK" <steve(removethis)@.kitley.com> wrote in message
> news:u28ooH96DHA.632@.TK2MSFTNGP12.phx.gbl...
in[QUOTE]
allow[QUOTE]
http://groups.google.com/groups?oi=...ublic.sqlserver[QUOTE]
local[QUOTE]
init[QUOTE]
backup is[QUOTE]
files[QUOTE]
expired.[QUOTE]
>
|||The maintenance wizard uses the 'sqlmaint' utility. Look that up in
books online. It is a great tool.
Charles
SteveK wrote:

> Thanks Tibor,
> I will check that out tonight. Great. If it works, then that must have be
en
> the way I did it.
> I really appreciate your help.
> Best regards & thanks again,
> Steve K.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n
> message news:u%237dsc96DHA.2628@.TK2MSFTNGP10.phx.gbl...
>
> case you haven't seen this,
>
> [url]http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver[/url
]
>
> in
>
> allow
>
> [url]http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver[/url
]
>
> local
>
> init
>
> backup is
>
> files
>
> expired.
>
>

Backup to dump device

Hello:
I am trying to backup to a dump device using sqlserver 2000 to the local
disk.
I am using retaindays=3. I thought you need to use that with the init
command, but it is failing. So, I am using that alone and the backup is
ignoring the retention policy on the dump device and backing the files up
one after the other without removing those older than 3 days.
I keep getting the error message media has a date that has not expired.
Anybody now what is happening here:
Backup database x to xx
with
retaindays=3,
mediadescription = 'backupxxx'
medianname = 'backupxx'
thanks in advance for your help,
Steve K.The only thing that RETAINDAYS and EXPIREDATE does is that it won't allow you to overwrite before
that date. These option will not, in any way, automate deletion of old files or anything to that
effect.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Steve K." <steve@.kitley.com> wrote in message news:OAKHDO86DHA.1632@.TK2MSFTNGP12.phx.gbl...
> Hello:
> I am trying to backup to a dump device using sqlserver 2000 to the local
> disk.
> I am using retaindays=3. I thought you need to use that with the init
> command, but it is failing. So, I am using that alone and the backup is
> ignoring the retention policy on the dump device and backing the files up
> one after the other without removing those older than 3 days.
> I keep getting the error message media has a date that has not expired.
> Anybody now what is happening here:
> Backup database x to xx
> with
> retaindays=3,
> mediadescription = 'backupxxx'
> medianname = 'backupxx'
> thanks in advance for your help,
> Steve K.
>|||Thanks Tibor!
I used SQL Server 7.0 before and could have sworn I had done that. But,
unfortunately I have lost my code since that time.
I will forget the idea.
thanks,
Steve
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ezo9oq86DHA.1636@.TK2MSFTNGP12.phx.gbl...
> The only thing that RETAINDAYS and EXPIREDATE does is that it won't allow
you to overwrite before
> that date. These option will not, in any way, automate deletion of old
files or anything to that
> effect.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "Steve K." <steve@.kitley.com> wrote in message
news:OAKHDO86DHA.1632@.TK2MSFTNGP12.phx.gbl...
> > Hello:
> >
> > I am trying to backup to a dump device using sqlserver 2000 to the local
> > disk.
> >
> > I am using retaindays=3. I thought you need to use that with the init
> > command, but it is failing. So, I am using that alone and the backup is
> > ignoring the retention policy on the dump device and backing the files
up
> > one after the other without removing those older than 3 days.
> >
> > I keep getting the error message media has a date that has not expired.
> >
> > Anybody now what is happening here:
> >
> > Backup database x to xx
> > with
> > retaindays=3,
> > mediadescription = 'backupxxx'
> > medianname = 'backupxx'
> >
> > thanks in advance for your help,
> >
> > Steve K.
> >
> >
>|||Sorry to disappoint you, Steve... :-)
You might want to verify in BOL, just to be absolutely certain. Just in case you haven't seen this,
the Maintenance Wizard does automate deletion of old backup file...
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"SteveK" <steve(removethis)@.kitley.com> wrote in message
news:u28ooH96DHA.632@.TK2MSFTNGP12.phx.gbl...
> Thanks Tibor!
> I used SQL Server 7.0 before and could have sworn I had done that. But,
> unfortunately I have lost my code since that time.
> I will forget the idea.
> thanks,
> Steve
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:ezo9oq86DHA.1636@.TK2MSFTNGP12.phx.gbl...
> > The only thing that RETAINDAYS and EXPIREDATE does is that it won't allow
> you to overwrite before
> > that date. These option will not, in any way, automate deletion of old
> files or anything to that
> > effect.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > Archive at:
> http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
> >
> >
> > "Steve K." <steve@.kitley.com> wrote in message
> news:OAKHDO86DHA.1632@.TK2MSFTNGP12.phx.gbl...
> > > Hello:
> > >
> > > I am trying to backup to a dump device using sqlserver 2000 to the local
> > > disk.
> > >
> > > I am using retaindays=3. I thought you need to use that with the init
> > > command, but it is failing. So, I am using that alone and the backup is
> > > ignoring the retention policy on the dump device and backing the files
> up
> > > one after the other without removing those older than 3 days.
> > >
> > > I keep getting the error message media has a date that has not expired.
> > >
> > > Anybody now what is happening here:
> > >
> > > Backup database x to xx
> > > with
> > > retaindays=3,
> > > mediadescription = 'backupxxx'
> > > medianname = 'backupxx'
> > >
> > > thanks in advance for your help,
> > >
> > > Steve K.
> > >
> > >
> >
> >
>|||Thanks Tibor,
I will check that out tonight. Great. If it works, then that must have been
the way I did it.
I really appreciate your help.
Best regards & thanks again,
Steve K.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:u%237dsc96DHA.2628@.TK2MSFTNGP10.phx.gbl...
> Sorry to disappoint you, Steve... :-)
> You might want to verify in BOL, just to be absolutely certain. Just in
case you haven't seen this,
> the Maintenance Wizard does automate deletion of old backup file...
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "SteveK" <steve(removethis)@.kitley.com> wrote in message
> news:u28ooH96DHA.632@.TK2MSFTNGP12.phx.gbl...
> > Thanks Tibor!
> >
> > I used SQL Server 7.0 before and could have sworn I had done that. But,
> > unfortunately I have lost my code since that time.
> >
> > I will forget the idea.
> >
> > thanks,
> >
> > Steve
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> > message news:ezo9oq86DHA.1636@.TK2MSFTNGP12.phx.gbl...
> > > The only thing that RETAINDAYS and EXPIREDATE does is that it won't
allow
> > you to overwrite before
> > > that date. These option will not, in any way, automate deletion of old
> > files or anything to that
> > > effect.
> > >
> > > --
> > > Tibor Karaszi, SQL Server MVP
> > > Archive at:
> >
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
> > >
> > >
> > > "Steve K." <steve@.kitley.com> wrote in message
> > news:OAKHDO86DHA.1632@.TK2MSFTNGP12.phx.gbl...
> > > > Hello:
> > > >
> > > > I am trying to backup to a dump device using sqlserver 2000 to the
local
> > > > disk.
> > > >
> > > > I am using retaindays=3. I thought you need to use that with the
init
> > > > command, but it is failing. So, I am using that alone and the
backup is
> > > > ignoring the retention policy on the dump device and backing the
files
> > up
> > > > one after the other without removing those older than 3 days.
> > > >
> > > > I keep getting the error message media has a date that has not
expired.
> > > >
> > > > Anybody now what is happening here:
> > > >
> > > > Backup database x to xx
> > > > with
> > > > retaindays=3,
> > > > mediadescription = 'backupxxx'
> > > > medianname = 'backupxx'
> > > >
> > > > thanks in advance for your help,
> > > >
> > > > Steve K.
> > > >
> > > >
> > >
> > >
> >
> >
>|||The maintenance wizard uses the 'sqlmaint' utility. Look that up in
books online. It is a great tool.
Charles
SteveK wrote:
> Thanks Tibor,
> I will check that out tonight. Great. If it works, then that must have been
> the way I did it.
> I really appreciate your help.
> Best regards & thanks again,
> Steve K.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:u%237dsc96DHA.2628@.TK2MSFTNGP10.phx.gbl...
>>Sorry to disappoint you, Steve... :-)
>>You might want to verify in BOL, just to be absolutely certain. Just in
> case you haven't seen this,
>>the Maintenance Wizard does automate deletion of old backup file...
>>--
>>Tibor Karaszi, SQL Server MVP
>>Archive at:
> http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>>"SteveK" <steve(removethis)@.kitley.com> wrote in message
>>news:u28ooH96DHA.632@.TK2MSFTNGP12.phx.gbl...
>>Thanks Tibor!
>>I used SQL Server 7.0 before and could have sworn I had done that. But,
>>unfortunately I have lost my code since that time.
>>I will forget the idea.
>>thanks,
>>Steve
>>"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in
>>message news:ezo9oq86DHA.1636@.TK2MSFTNGP12.phx.gbl...
>>The only thing that RETAINDAYS and EXPIREDATE does is that it won't
> allow
>>you to overwrite before
>>that date. These option will not, in any way, automate deletion of old
>>files or anything to that
>>effect.
>>--
>>Tibor Karaszi, SQL Server MVP
>>Archive at:
> http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>>"Steve K." <steve@.kitley.com> wrote in message
>>news:OAKHDO86DHA.1632@.TK2MSFTNGP12.phx.gbl...
>>Hello:
>>I am trying to backup to a dump device using sqlserver 2000 to the
> local
>>disk.
>>I am using retaindays=3. I thought you need to use that with the
> init
>>command, but it is failing. So, I am using that alone and the
> backup is
>>ignoring the retention policy on the dump device and backing the
> files
>>up
>>one after the other without removing those older than 3 days.
>>I keep getting the error message media has a date that has not
> expired.
>>Anybody now what is happening here:
>>Backup database x to xx
>>with
>>retaindays=3,
>>mediadescription = 'backupxxx'
>>medianname = 'backupxx'
>>thanks in advance for your help,
>>Steve K.
>>
>>
>>
>