如何在windows上安装pgAgent服务

时间:2023-01-12 14:30:50

I am new in postgreSQL database , I recently found that postgreSQL support SQL Job by pgAgent. I am using windows XP operating system.

我是postgreSQL数据库的新手,最近发现pgAgent支持postgreSQL作业。我正在使用windows XP操作系统。

I searched lots about pgAgent on Google and trying to configure pgAgent on machine.

我在谷歌上搜索了很多关于pgAgent的信息,并尝试在机器上配置pgAgent。

Download pgAgent package in which I found pgagent.sql file after executing this file JOB(0) icon is appear on my pgAdmin III object panel. like following image.

下载找到pgAgent的pgAgent包。执行此文件作业(0)图标后,sql文件将出现在我的pgAdmin III对象面板上。像下面图片。

如何在windows上安装pgAgent服务

But I am facing problem to register pgAgent service. As per postgres sql documentation following is next steps to register services but I am fail to do this. or don't know how to configure pgAgent service.

但是我在注册pgAgent服务时遇到了问题。根据postgres sql文档,下面是注册服务的下一步,但我没有做到这一点。或者不知道如何配置pgAgent服务。

Following step from postgre sql documentaion :

根据postgre sql documentaion步骤:

The service may be quite simply installed from the command line as follows:
"C:\Program Files\pgAdmin III\pgAgent" INSTALL pgAgent -u postgres -p secret hostaddr=127.0.0.1 dbname=pgadmin user=postgres

but I tried lot to do this, please help in how to register pgAgent service with Windows XP.

但是我尝试了很多,请帮忙在如何注册pgAgent服务与Windows XP。

reference link of postgre sql : http://www.pgadmin.org/docs/1.6/pgagent-install.html

postgre sql的参考链接:http://www.pgadmin.org/docs/1.6/pgagent-install.html

Please help in this , Thanks in Advance !

请帮忙,提前谢谢!

3 个解决方案

#1


23  

PgAgent is probably not installed

The pgAgent download page says:

pgAgent下载页面显示:

pgAgent is a job scheduler for PostgreSQL which may be managed using pgAdmin. Prior to pgAdmin v1.9, pgAgent shipped as part of pgAdmin. From pgAdmin v1.9 onwards, pgAgent is shipped as a separate application.

pgAgent是PostgreSQL的作业调度程序,可以使用pgAdmin进行管理。在pgAdmin v1.9之前,pgAgent是pgAdmin的一部分。从pgAdmin v1.9开始,pgAgent作为一个单独的应用程序发布。

And then it provides a download link to http://www.postgresql.org/ftp/pgadmin3/release/pgagent/
But the problem is there's only source code there. There are also SQL files in the tarball but they're useless without pgagent.exe.

然后它提供了http://www.postgresql.org/ftp/pgadmin3/release/pgagent/的下载链接,但问题是那里只有源代码。tarball中也有SQL文件,但是如果没有pgagent.exe,它们就毫无用处。

How to install it

Apparently the correct way to install a pre-compiled pgAgent is with the Stack Builder installer that also happens to be the primary installation method on Windows for the PostgreSQL server itself. That's what is suggested on the official download page: http://www.postgresql.org/download/windows/

显然,安装预编译的pgAgent的正确方法是使用堆栈构建器安装程序,该安装程序碰巧也是PostgreSQL服务器本身在Windows上的主要安装方法。这就是官方下载页面上的建议:http://www.postgresql.org/download/windows/

If you have already installed PostgreSQL for Windows with this method, the installer is available under the name Application Stack Builder in the PostgreSQL 9.2 folder in Windows Start Menu.

如果您已经使用此方法为Windows安装了PostgreSQL,那么安装程序可以在Windows Start菜单的PostgreSQL 9.2文件夹中的“应用程序堆栈构建器”名称下使用。

StackBuilder will normally recognize your installed PostgreSQL version(s), and suggest to install among various programs pgAgent in the Add-ons, tools and utilities category. Once you check pgAgent and continue with the installation, it will download it and launch its setup. The setup phase includes runnning the necessary SQL statements and installing the PostgreSQL scheduling Agent - pgAgent windows service. If this step is successful, there is nothing else to do, the functionality will be available in pgAdmin for creating jobs.

StackBuilder通常会识别已安装的PostgreSQL版本,并建议在Add-ons、tools和实用程序类别中的各种程序pgAgent之间安装。一旦您检查了pgAgent并继续安装,它将下载并启动安装。安装阶段包括运行必要的SQL语句和安装PostgreSQL调度代理- pgAgent windows服务。如果这一步成功,那么就没有其他事情可做了,pgAdmin中的功能将用于创建工作。

What's misleading in the docs

The latest pgAdmin docs at http://www.pgadmin.org/docs/1.16/pgagent-install.html has a Service installation on Windows chapter that says:

最新的pgAdmin文档(http://www.pgadmin.org/docs/1.16/pgagent-install.html)在Windows章节中有一个服务安装,上面写着:

The service may be quite simply installed from the command line as follows (adjusting the path as required):

服务可以简单地从命令行安装如下(根据需要调整路径):

"C:\Program Files\pgAdmin III\pgAgent" INSTALL pgAgent -u postgres -p secret hostaddr=127.0.0.1 dbname=postgres user=postgres

“C:\程序文件\pgAdmin III\pgAgent”安装pgAgent -u postgres -p secret hostaddr=127.0.0.1 dbname=postgres用户=postgres。

However in the majority of cases this is not going to be of help because either:

然而,在大多数情况下,这不会有帮助,因为:

  • pgAgent install is done by pgAgent setup as launched by StackBuilder and this step is not necessary.
  • pgAgent安装是由StackBuilder启动的pgAgent安装完成的,不需要这个步骤。
  • or you have got pgAdmin alone and pgagent.exe will not be installed so this step is not possible.
  • 或者你有pgAdmin和pgagent。exe将不会被安装,所以这个步骤是不可能的。

#2


1  

I've already installed PostgreSQL but without pgAdmin. I got the *tag.gz and unpacked it with 7-Zip. What are the following steps?

我已经安装了PostgreSQL,但是没有pgAdmin。我有*标记。然后用7-Zip打开。以下步骤是什么?

I googled a lot and I still have no idea what I'm doing worg. Can somebody please write step-by-step what I Need to do.

我用谷歌搜索了很多次,但我还是不知道我在做什么。有人能一步一步地写我需要做的事情吗?

#3


0  

pgAdmit will be succcessfully installed after downloading the compressed file from

pgAdmit将成功安装后下载压缩文件从

https://www.pgadmin.org/download/pgagent-source-code/

https://www.pgadmin.org/download/pgagent-source-code/

there inside, you will find the file "sql\pgagent.sql"

在里面,你会找到“sql\pgagent.sql”文件。

Tos the content fo this file into the Query Tool and run it. That will install pgAgent. Refresh your database connection to see the result. The tab pgAgent Jobs should have been created at the root level fo your connection.

将该文件的内容转换为查询工具并运行它。这将安装pgAgent。刷新数据库连接以查看结果。选项卡pgAgent作业应该是在连接的根级别创建的。

There is no need of using the INSTALL command fro your command line.

不需要在命令行中使用INSTALL命令。

#1


23  

PgAgent is probably not installed

The pgAgent download page says:

pgAgent下载页面显示:

pgAgent is a job scheduler for PostgreSQL which may be managed using pgAdmin. Prior to pgAdmin v1.9, pgAgent shipped as part of pgAdmin. From pgAdmin v1.9 onwards, pgAgent is shipped as a separate application.

pgAgent是PostgreSQL的作业调度程序,可以使用pgAdmin进行管理。在pgAdmin v1.9之前,pgAgent是pgAdmin的一部分。从pgAdmin v1.9开始,pgAgent作为一个单独的应用程序发布。

And then it provides a download link to http://www.postgresql.org/ftp/pgadmin3/release/pgagent/
But the problem is there's only source code there. There are also SQL files in the tarball but they're useless without pgagent.exe.

然后它提供了http://www.postgresql.org/ftp/pgadmin3/release/pgagent/的下载链接,但问题是那里只有源代码。tarball中也有SQL文件,但是如果没有pgagent.exe,它们就毫无用处。

How to install it

Apparently the correct way to install a pre-compiled pgAgent is with the Stack Builder installer that also happens to be the primary installation method on Windows for the PostgreSQL server itself. That's what is suggested on the official download page: http://www.postgresql.org/download/windows/

显然,安装预编译的pgAgent的正确方法是使用堆栈构建器安装程序,该安装程序碰巧也是PostgreSQL服务器本身在Windows上的主要安装方法。这就是官方下载页面上的建议:http://www.postgresql.org/download/windows/

If you have already installed PostgreSQL for Windows with this method, the installer is available under the name Application Stack Builder in the PostgreSQL 9.2 folder in Windows Start Menu.

如果您已经使用此方法为Windows安装了PostgreSQL,那么安装程序可以在Windows Start菜单的PostgreSQL 9.2文件夹中的“应用程序堆栈构建器”名称下使用。

StackBuilder will normally recognize your installed PostgreSQL version(s), and suggest to install among various programs pgAgent in the Add-ons, tools and utilities category. Once you check pgAgent and continue with the installation, it will download it and launch its setup. The setup phase includes runnning the necessary SQL statements and installing the PostgreSQL scheduling Agent - pgAgent windows service. If this step is successful, there is nothing else to do, the functionality will be available in pgAdmin for creating jobs.

StackBuilder通常会识别已安装的PostgreSQL版本,并建议在Add-ons、tools和实用程序类别中的各种程序pgAgent之间安装。一旦您检查了pgAgent并继续安装,它将下载并启动安装。安装阶段包括运行必要的SQL语句和安装PostgreSQL调度代理- pgAgent windows服务。如果这一步成功,那么就没有其他事情可做了,pgAdmin中的功能将用于创建工作。

What's misleading in the docs

The latest pgAdmin docs at http://www.pgadmin.org/docs/1.16/pgagent-install.html has a Service installation on Windows chapter that says:

最新的pgAdmin文档(http://www.pgadmin.org/docs/1.16/pgagent-install.html)在Windows章节中有一个服务安装,上面写着:

The service may be quite simply installed from the command line as follows (adjusting the path as required):

服务可以简单地从命令行安装如下(根据需要调整路径):

"C:\Program Files\pgAdmin III\pgAgent" INSTALL pgAgent -u postgres -p secret hostaddr=127.0.0.1 dbname=postgres user=postgres

“C:\程序文件\pgAdmin III\pgAgent”安装pgAgent -u postgres -p secret hostaddr=127.0.0.1 dbname=postgres用户=postgres。

However in the majority of cases this is not going to be of help because either:

然而,在大多数情况下,这不会有帮助,因为:

  • pgAgent install is done by pgAgent setup as launched by StackBuilder and this step is not necessary.
  • pgAgent安装是由StackBuilder启动的pgAgent安装完成的,不需要这个步骤。
  • or you have got pgAdmin alone and pgagent.exe will not be installed so this step is not possible.
  • 或者你有pgAdmin和pgagent。exe将不会被安装,所以这个步骤是不可能的。

#2


1  

I've already installed PostgreSQL but without pgAdmin. I got the *tag.gz and unpacked it with 7-Zip. What are the following steps?

我已经安装了PostgreSQL,但是没有pgAdmin。我有*标记。然后用7-Zip打开。以下步骤是什么?

I googled a lot and I still have no idea what I'm doing worg. Can somebody please write step-by-step what I Need to do.

我用谷歌搜索了很多次,但我还是不知道我在做什么。有人能一步一步地写我需要做的事情吗?

#3


0  

pgAdmit will be succcessfully installed after downloading the compressed file from

pgAdmit将成功安装后下载压缩文件从

https://www.pgadmin.org/download/pgagent-source-code/

https://www.pgadmin.org/download/pgagent-source-code/

there inside, you will find the file "sql\pgagent.sql"

在里面,你会找到“sql\pgagent.sql”文件。

Tos the content fo this file into the Query Tool and run it. That will install pgAgent. Refresh your database connection to see the result. The tab pgAgent Jobs should have been created at the root level fo your connection.

将该文件的内容转换为查询工具并运行它。这将安装pgAgent。刷新数据库连接以查看结果。选项卡pgAgent作业应该是在连接的根级别创建的。

There is no need of using the INSTALL command fro your command line.

不需要在命令行中使用INSTALL命令。