问题描述
我在互联网上搜索有关此问题的信息.但是找不到正确的答案.此链接有点更接近解决方案,但对我而言不起作用.
I search in the internet about this issue. But couldn't find a proper answer. This link is bit closer to the solution, but it is not worked for me.
我在pgadmin中安排了工作.但是由于无法获得与数据库的连接"错误,作业总是失败.使用PGAdmin创建作业时,最初会询问其名称,作业类别,主机代理等.在第一阶段,我将主机代理"字段留空. (我的日程安排每时每刻都在起作用)PGAdmin右侧面板上有一个名为统计"的选项卡.一分钟一分钟地更新为失败".
I scheduled a job in pgadmin. but the job is always got failed due to "couldn't get a connection to the database" error. When creating a job using PGAdmin, initially it is asked name, job class, host agent etc... In first stage I left blank for the field "Host Agent". (My schedule works in every minute) PGAdmin right side panel has a tab called "Statistics". Minute by minute it is updated as "failed".
然后我将主机代理更改为postgres. (登录用户)
Then i changed host agent to postgres. (login user)
仍然无法正常工作. (更改主机代理后,即使失败状态也不会记录)步骤有一个简单的插入查询.查询没有问题.
Still the job is not working properly. (even failed status also not logged after changing host agent)Step has a simple insert query. Query does not have an issue.
任何人都可以告诉我这样做的方向吗?
Anyone can show me a direction for doing this?
推荐答案
在步骤"中选择连接类型为远程",并浏览服务器和数据库名称.默认情况下,它仅给出下面的部分.
Select connection type as "Remote" in Step and brows for server and db name.Default it is giving only below part.
user=<username> host=localhost port=5433 dbname=<dbname>
我们应该必须手动添加密码.
We should have to add password manually.
password=postgres
最终连接字符串如下.
user=<username> host=localhost port=5433 dbname=<dbname> password=<my password>
这对我有用.....
This works for me.....
这篇关于无法连接到数据库-已发布Postgres Job Scheduling(基于Windows的计算机)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!