Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 restore backup problem

Author  Topic 

fabianus76
Posting Yak Master

191 Posts

Posted - 2006-06-15 : 14:31:34
Hello!

Wehn I try to restor a backup like this :

RESTORE DATABASE mydb
FROM DISK = 'C:\test.bak'

I get the following error :
"Cannot open backup device 'C:\test.bak'. Operating system error 5 (access denied)"

But the file exists and is not in use...

Thank you very much for any help!

Regards,
Fabian


my favorit hoster is ASPnix : www.aspnix.com !

mfemenel
Professor Frink

1421 Posts

Posted - 2006-06-15 : 14:46:08
Do you have permissions to the C drive?

Mike
"oh, that monkey is going to pay"
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-06-15 : 14:54:56
Does C:\test.bak exist on the database server or on your client machine?

Tara Kizer
aka tduggan
Go to Top of Page

fabianus76
Posting Yak Master

191 Posts

Posted - 2006-06-15 : 17:20:50
Hello mfemenel and tkizer,

yes the file exists and it's on my local machine where I have administrator rights. When you say "you", you mean the user with which I am loged on Windows (XP) or the user in SQL-Server 2005 Express?

Thank you for any further help !

Regards,
Fabian

my favorit hoster is ASPnix : www.aspnix.com !
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-06-15 : 17:22:42
So the file is on your local machine. But where is the SQL Server. Same box or on another one?

Tara Kizer
aka tduggan
Go to Top of Page

fabianus76
Posting Yak Master

191 Posts

Posted - 2006-06-15 : 17:31:02
quote:
Originally posted by tkizer

So the file is on your local machine. But where is the SQL Server. Same box or on another one?

Tara Kizer
aka tduggan



Same box :-)

Regards,
Fabian

my favorit hoster is ASPnix : www.aspnix.com !
Go to Top of Page

fabianus76
Posting Yak Master

191 Posts

Posted - 2006-06-15 : 18:07:32
I tried it with another bak-file and it worked fine...
Could it be that the bak-file that does not work has a password?

Regards,
Fabian

my favorit hoster is ASPnix : www.aspnix.com !
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-06-15 : 18:53:38
My guess is that the file is in fact in use. Reboot the box and try that file again.

Tara Kizer
aka tduggan
Go to Top of Page

fabianus76
Posting Yak Master

191 Posts

Posted - 2006-06-15 : 19:09:11
Hello Tara,

iin fact I did this - but still have this problem. Anyway, I got a new .bat file and now everything works fine ... (?)

Thank you for your help!

Regards,
Fabian

my favorit hoster is ASPnix : www.aspnix.com !
Go to Top of Page
   

- Advertisement -