views:

82

answers:

3

I have a stored procedure, which performs a database backup for a specific database. The problem is, it does work on one server and does not work on another server (the servers are on different machines). The backup drive is a local drive of the server. On the second server I get the exception "BACKUP DATABASE is terminating abnormally."

In the log file there are the following informations:

...     Error: 18204, Severity: 16, State: 1.
...     BackupDiskFile::CreateMedia: Backup device 'D:\XXX.bak' failed to create. Operating system error 5(failed to retrieve text for this error. Reason: 15105).
...     Error: 3041, Severity: 16, State: 1.
...     BACKUP failed to complete the command BACKUP DATABASE XXX. Check the backup application log for detailed messages.

What could be the reason for that and where can I find the mentioned backup application log?

+2  A: 

Sounds like a permission problem.

  • Do you try to backup to a network drive?
  • Does the drive D: really exist?
  • What does the Eventlog tell you? Try the Applicationlog in the Eventlog -> eventvwr.msc

It's just a start...

Yves M.
A: 

Try to create windows login on sql server and map it to a windows user that have write permission on the D drive and make sure that the procedure runs under the security context of this user.

SubPortal
I need it in a WINDOWS FORMS application! So logical way is to embed a WPF fisheye!
uhu
+1  A: 

Try to compile the SP again with "with execute as caller" and run it again.

Elmex