Getting "Access is denied" error when executing pg_dump on Windows

goh picture goh · Jul 23, 2010 · Viewed 14.9k times · Source

I'm trying to execute pg_dump for one of my PostgreSQL databases, but I am having permission problems.

C:\Windows\system32>pg_dump -U postgres -p 1863 -O social_sense > C:\\Program Files\\PostgreSQL\\8.4\\data\\social_sense.sql


I am getting the following error:

Access is denied


Can anyone enlighten?

Answer

goh picture goh · Jul 23, 2010

I apologise for taking up your time. It was due to that there is no write permission to the directory i was writing to.