Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a sql database I accidentally deleted. I have a backup of the database with the windows backup that comes with windows 7. Every other file I can go in to previous versions and restore it, however when i get to the mdf and ldf file I get a error You Need Permission from the computers administrator to make changes to this file.

I am a administrator account. I have tried turning off UAC but it still says that. When I open the "previous versions" folder and click on the file to restore and go to security it says You do not have permission to view or edit this object's permission settings

If I go in to advanced it says the same message on permissions, auditing and effective permissions. If I go in to owner it says "Unable to display current owner." if I try to change the owner to me I get Unable to set new owner on Cvti101330_Data. Access is denied

The path of the file i want to restore is \\localhost\E$\@GMT-2010.11.04-08.17.33\101330\Cvti101330_data.mdf is there any kind of command line tool I can run to get my file back?

share|improve this question
    
Can you log in as the owner of the file you are attempting to restore? –  David Nov 5 '10 at 15:14
    
I suggest not using Windows 7 backup. Many people have problems with it. –  harrymc Nov 5 '10 at 15:27
add comment

1 Answer

up vote 1 down vote accepted

You could try this:

Mount the VHD backup file as readonly, then go into that location on the VHD using a tool like Total Commander, running as Administrator, to copy the file to your hard drive. Copying it will take the permissions of the target location.

share|improve this answer
    
How do I mount it? –  Scott Chamberlain Nov 5 '10 at 15:26
    
Using Disk Management under Computer Management. –  user3463 Nov 5 '10 at 15:30
    
I could not find the vhd file to mount but running total commander and pointing it at \\localhost\E$\@GMT-2010.11.04-08.17.33\101330\ worked –  Scott Chamberlain Nov 5 '10 at 15:43
    
Glad Total Commander was able to help. –  user3463 Nov 5 '10 at 16:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.