PDA

View Full Version : Vista Help: Cannot access PostgreSQL



PoK3rJacK
06-01-2009, 09:24 PM
I've been monkeying with this for HOURS!!! I wanted to remove PostgreSQL, so, I uninstalled it. After you uninstall, the old databases are still there and you have to remove them.

I have vista, so everytime I go to access them to delete them, it tells me Access Denied. I've tried to gain access, but can't. I've started my comp as administrator, still no go. I started in Safe mode, same thing, access denied.

is there anyway I can delete these databases from command prompt? I've searched all over google and can't even find any answer to this. Please halp!!!!

wysiwyg
06-02-2009, 06:55 AM
Assuming the files are not somehow in-use..

Create a .bat file containing the following, adjusting the path to reflect the file you need to delete:


@echo off
takeown /f c:\postgre\example.db
icacls c:\postgre\example.db /grant administrators:F
del /F c:\postgre\example.db
pause


Right click and run as administrator.

If it fails, try it in safe mode. If it still fails, I would personally go the sure-fire route and just boot from a CD (eg. knoppix), mount the drive and delete the files.

Hawaii50
06-02-2009, 03:18 PM
Or do the only thing left to do after the Vista era...switch to Mac.
Sorry for the sarcasm, I am just DONE with all the PC's and Windows issues I have had consistently for the past 3 machines...same stuff, different PC.