Friday, February 10, 2012

Backup to Flash Drive

I have a utility I wrote which can backup/restore my database as well
as schedule backups. This has always worked pretty well except when I
try to backup to a USB Flash Disk. When I use one of these the backup
fails. If I backup to the C:/ drive then copy it over to the disk it
works fine but when SQL Server tries to do it, it can't.
I am simply doing the following:

BACKUP DATABASE MyDatabase TO DISK = 'E:/backup.dat_bak' WITH INIT

Anyone know what could be going wrong?"Ray Lavelle" <bostonpartykid@.yahoo.com> wrote in message
news:d8653140.0309032311.36f02596@.posting.google.c om...
> I have a utility I wrote which can backup/restore my database as well
> as schedule backups. This has always worked pretty well except when I
> try to backup to a USB Flash Disk. When I use one of these the backup
> fails. If I backup to the C:/ drive then copy it over to the disk it
> works fine but when SQL Server tries to do it, it can't.
> I am simply doing the following:
> BACKUP DATABASE MyDatabase TO DISK = 'E:/backup.dat_bak' WITH INIT
> Anyone know what could be going wrong?

Have LocalSystem account (or account for SQL Server) privileges to access
flash disk?|||bostonpartykid@.yahoo.com (Ray Lavelle) wrote in message news:<d8653140.0309032311.36f02596@.posting.google.com>...
> I have a utility I wrote which can backup/restore my database as well
> as schedule backups. This has always worked pretty well except when I
> try to backup to a USB Flash Disk. When I use one of these the backup
> fails. If I backup to the C:/ drive then copy it over to the disk it
> works fine but when SQL Server tries to do it, it can't.
> I am simply doing the following:
> BACKUP DATABASE MyDatabase TO DISK = 'E:/backup.dat_bak' WITH INIT
> Anyone know what could be going wrong?

You might be seeing this issue:

http://support.microsoft.com/defaul...kb;en-us;281345

Otherwise, can you clarify what you mean by the backup "fails"? Is
there an error message? Presumably the USB drive appears in Windows as
a local drive? And what result do you get if you execute this query:

exec master..xp_cmdshell 'dir e:\'

Simon|||It turned out that the problem was that backing up to a USB disk is a
lot slower so the command timed out. Simply increasing the
commandTimeout solved the problem.

sql@.hayes.ch (Simon Hayes) wrote in message news:<60cd0137.0309040634.7b13ab50@.posting.google.com>...
> bostonpartykid@.yahoo.com (Ray Lavelle) wrote in message news:<d8653140.0309032311.36f02596@.posting.google.com>...
> > I have a utility I wrote which can backup/restore my database as well
> > as schedule backups. This has always worked pretty well except when I
> > try to backup to a USB Flash Disk. When I use one of these the backup
> > fails. If I backup to the C:/ drive then copy it over to the disk it
> > works fine but when SQL Server tries to do it, it can't.
> > I am simply doing the following:
> > BACKUP DATABASE MyDatabase TO DISK = 'E:/backup.dat_bak' WITH INIT
> > Anyone know what could be going wrong?
> You might be seeing this issue:
> http://support.microsoft.com/defaul...kb;en-us;281345
> Otherwise, can you clarify what you mean by the backup "fails"? Is
> there an error message? Presumably the USB drive appears in Windows as
> a local drive? And what result do you get if you execute this query:
> exec master..xp_cmdshell 'dir e:\'
> Simon

No comments:

Post a Comment