dbTalk Databases Forums  

Re: Backup Job Fails, but Command Works in Query Analyzer

microsoft.public.sqlserver.clustering microsoft.public.sqlserver.clustering


Discuss Re: Backup Job Fails, but Command Works in Query Analyzer in the microsoft.public.sqlserver.clustering forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nobody
 
Posts: n/a

Default Re: Backup Job Fails, but Command Works in Query Analyzer - 04-16-2004 , 04:27 PM






Michael,

One thing that is different between the two environments are the privileges.
For instance, you may have a mapped drive accessible to you in Query
Analyzer but not to the account that runs scheduled jobs.

May be worth looking into.

Farid


"michael [multnomah]" <wewill (AT) reclaimourfuture (DOT) net> wrote

Quote:
Hello. I am completely stuck as to why my backup job is failing. I
have a job which backs up all user databases. All of the user databases
get backed up no problem, except for one. That one fails with:

BackupDiskFile::OpenMedia: Backup device
'D:\BACKUP\EMPMART_PRD\EMPMART_PRD_db_200404161121 .BAK' failed to open.
Operating system error = 32(The process cannot access the file because
it is being used by another process.).

BUT, if I run the same exact command that failed in Query Analyzer:

BACKUP DATABASE [EMPMART_PRD] TO DISK =
N'D:\BACKUP\EMPMART_PRD\EMPMART_PRD_db_20040416112 5.BAK' WITH INIT ,
NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT

The backup succeeds every time. What is causing the backup job to fail,
but not the command when run separate from a scheduled job? There is no
anti-virus or other software that might be locking the file. It is not
a drive space or permissions issue because the same command works in
Query Analyzer. I am stuck???



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.