我有一个服务不启动PostgreSQL。若要查看错误日志,可以使用以下命令(不超过管理员):
C:\ Files\PostgreSQL\9.3\bin>runas /user:postgres "C:\Program \PostgreSQL\9.3\bin\postgres -D "C:\Program \PostgreSQL\9.3\data“
但是,在输入此命令错误后,将出现:
RUNAS [ [/noprofile | /profile] [/env] [/savecred | /netonly] ]
/user:<username> <program>
RUNAS [ [/noprofile | /profile] [/env] [/savecred] ]
/smartcard [/user:<username>] <program>
RUNAS /trustlevel:<trustlevel> <program>
/noprofile <...>
/profile <...>
<...>你能告诉我怎么写这个命令吗?
发布于 2014-11-28 19:25:55
看起来您的命令末尾有额外的空格,这可能会使事情变得一团糟,我相信您必须指定用户帐户存在的主机名或域。试试这个:runas /user:hostname\postgres "C:\Program Files\PostgreSQL\9.3\bin\postgres -D C:\Program Files\PostgreSQL\9.3\data"
发布于 2014-11-29 02:25:07
如this Super User thread中所示,RUNAS中的嵌套引号应该用反斜杠转义。因此,您的命令应该如下所示:
runas /user:postgres "C:\Program Files\PostgreSQL\9.3\bin\postgres -D \"C:\Program Files\PostgreSQL\9.3\data\""https://stackoverflow.com/questions/27190262
复制相似问题