postgresql 在 Windows 上执行 pg_dump 时出现“访问被拒绝”错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3316364/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Getting "Access is denied" error when executing pg_dump on Windows
提问by goh
I'm trying to execute pg_dump
for one of my PostgreSQL databases, but I am having permission problems.
我正在尝试为pg_dump
我的一个 PostgreSQL 数据库执行,但我遇到了权限问题。
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?
任何人都可以启蒙吗?
回答by goh
I apologise for taking up your time. It was due to that there is no write permission to the directory i was writing to.
我很抱歉占用了您的时间。这是因为我正在写入的目录没有写权限。
回答by mctuna
Or you can run the cmd as administrator. In my situation that solved the problem too. I know it is a bit late answer but I thought, it would help someone else maybe
或者您可以以管理员身份运行 cmd。在我的情况下也解决了这个问题。我知道这是一个有点晚的答案,但我想,这可能会帮助别人