Hello all I have this T-SQL string.
Use master
Exec sp_addumpdevice 'disk', 'dbEvents_backup',
'\\pmafiles\X$\SQL\TMS\dbEvents\eventsbackup'
Backup Database dbEvents to dbEvents_backup
Exec sp_dropdevice 'dbEvents_backup'
I have two questions
When the backup runs it isn't writing over the existing backup. It
seems to be appending the information.
Secondly, is it this an effective approach in:
adding the dumpdevice
backing it up
and then deleting the device
thanksvncntj@.hotmail.com wrote:
> Hello all I have this T-SQL string.
>
> Use master
> Exec sp_addumpdevice 'disk', 'dbEvents_backup',
> '\\pmafiles\X$\SQL\TMS\dbEvents\eventsbackup'
> Backup Database dbEvents to dbEvents_backup
> Exec sp_dropdevice 'dbEvents_backup'
>
> I have two questions
> When the backup runs it isn't writing over the existing backup. It
> seems to be appending the information.
> Secondly, is it this an effective approach in:
> adding the dumpdevice
> backing it up
> and then deleting the device
> thanks
>
You can skip the creation/deletion of the backup device by using TO DISK
in your backup command. To overwrite the existing backup, add WITH INIT
to the backup command. See Books Online for details.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||This is a multi-part message in MIME format.
--020001090101040705090406
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
vncntj@.hotmail.com wrote:
> Hello all I have this T-SQL string.
>
> Use master
> Exec sp_addumpdevice 'disk', 'dbEvents_backup',
> '\\pmafiles\X$\SQL\TMS\dbEvents\eventsbackup'
> Backup Database dbEvents to dbEvents_backup
> Exec sp_dropdevice 'dbEvents_backup'
>
> I have two questions
> When the backup runs it isn't writing over the existing backup. It
> seems to be appending the information.
> Secondly, is it this an effective approach in:
> adding the dumpdevice
> backing it up
> and then deleting the device
> thanks
>
Hi
Like mentioned by Tracy, you can skip creation of the device by backing
up to disk, but I wonder why you drop the device after every backup if
it's the same device you add again next time?
Regards
Steen Schlüter Persson
Databaseadministrator / Systemadministrator
--020001090101040705090406
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:vncntj@.hotmail.com">vncntj@.hotmail.com</a> wrote:
<blockquote
cite="mid1152217677.737502.210350@.m73g2000cwd.googlegroups.com"
type="cite">
<pre wrap="">Hello all I have this T-SQL string.
Use master
Exec sp_addumpdevice 'disk', 'dbEvents_backup',
'\\pmafiles\X$\SQL\TMS\dbEvents\eventsbackup'
Backup Database dbEvents to dbEvents_backup
Exec sp_dropdevice 'dbEvents_backup'
I have two questions
When the backup runs it isn't writing over the existing backup. It
seems to be appending the information.
Secondly, is it this an effective approach in:
adding the dumpdevice
backing it up
and then deleting the device
thanks
</pre>
</blockquote>
<font size="-1"><font face="Arial">Hi<br>
<br>
Like mentioned by Tracy, you can skip creation of the device by backing
up to disk, but I wonder why you drop the device after every backup if
it's the same device you add again next time?<br>
<br>
<br>
-- <br>
Regards<br>
Steen Schlüter Persson<br>
Databaseadministrator / Systemadministrator<br>
</font></font>
</body>
</html>
--020001090101040705090406--|||YOU GUYS ROCK!!!!!!!!!!
Steen Persson (DK) wrote:
> vncntj@.hotmail.com wrote:
> > Hello all I have this T-SQL string.
> >
> >
> > Use master
> > Exec sp_addumpdevice 'disk', 'dbEvents_backup',
> > '\\pmafiles\X$\SQL\TMS\dbEvents\eventsbackup'
> > Backup Database dbEvents to dbEvents_backup
> > Exec sp_dropdevice 'dbEvents_backup'
> >
> >
> > I have two questions
> > When the backup runs it isn't writing over the existing backup. It
> > seems to be appending the information.
> >
> > Secondly, is it this an effective approach in:
> >
> > adding the dumpdevice
> > backing it up
> > and then deleting the device
> >
> > thanks
> >
> >
> Hi
> Like mentioned by Tracy, you can skip creation of the device by backing
> up to disk, but I wonder why you drop the device after every backup if
> it's the same device you add again next time?
>
> --
> Regards
> Steen Schl=FCter Persson
> Databaseadministrator / Systemadministrator
> --020001090101040705090406
> Content-Type: text/html; charset=3DISO-8859-1
> X-Google-AttachSize: 1287
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <meta content=3D"text/html;charset=3DISO-8859-1" http-equiv=3D"Content-=Type">
> </head>
> <body bgcolor=3D"#ffffff" text=3D"#000000">
> <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:vncntj@.hotmail.com">=vncntj@.hotmail.com</a> wrote:
> <blockquote
> cite=3D"mid1152217677.737502.210350@.m73g2000cwd.googlegroups.com"
> type=3D"cite">
> <pre wrap=3D"">Hello all I have this T-SQL string.
>
> Use master
> Exec sp_addumpdevice 'disk', 'dbEvents_backup',
> '\\pmafiles\X$\SQL\TMS\dbEvents\eventsbackup'
> Backup Database dbEvents to dbEvents_backup
> Exec sp_dropdevice 'dbEvents_backup'
>
> I have two questions
> When the backup runs it isn't writing over the existing backup. It
> seems to be appending the information.
> Secondly, is it this an effective approach in:
> adding the dumpdevice
> backing it up
> and then deleting the device
> thanks
> </pre>
> </blockquote>
> <font size=3D"-1"><font face=3D"Arial">Hi<br>
> <br>
> Like mentioned by Tracy, you can skip creation of the device by backing
> up to disk, but I wonder why you drop the device after every backup if
> it's the same device you add again next time?<br>
> <br>
> <br>
> -- <br>
> Regards<br>
> Steen Schlüter Persson<br>
> Databaseadministrator / Systemadministrator<br>
> </font></font>
> </body>
> </html>
> > --020001090101040705090406--
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment