7.5 pgAgent

Table of Contents Previous Next



The Postgres Plus Advanced Server installer creates the scheduling tables required by the pgAgent service. If you are installing Advanced Server in Oracle Compatible mode (the default), the scheduling tables are created in the edb database; if you are installing in PostgreSQL mode, the tables are created in the postgres database.
To use the Oracle-compatible DBMS_JOB package from a database other than the edb database, you must install the pgAgent schema into each additional database in which you wish to schedule jobs. To install the pgAgent schema, you must:
2) Invoke the pgagent.sql script.
When installed with the rpm package, the pgagent.sql script is located in /usr/share/ppas94-pgagent-3.3.0. When installed with the interactive installer, the script is located in /opt/PostgresPlus/9.4AS/share/pgagent.
hostname specifies name of the Advanced Server host.
port specifies the port on which the Advanced Server host is listening.
database specifies the name of the database.
username specifies the name of an Advanced Server user.
password specifies the password of the database in which the scheduling table resides.
After creating the pgpass file, execute the following command to install the pgAgent service, and create the startup file. The script configures the pgAgent executor to run in the background at system startup.
/opt/PostgresPlus/9.4AS/installer/pgAgent/startupcfg.sh host_name port_number user_name system_user installation_directory db_name server_version service_name
host_name specifies the name or IP address of the target database server's host.
port_number specifies the port number of the target database server.
user_name specifies the name of an Advanced Server user.
system_user specifies the name of the operating system user that will launch the service.
installation_directory specifies the Advanced Server installation directory.
db_name specifies the name of the target database.
server_version specifies the version number of the server on which the target database resides.
service_name specifies the name of the Advanced Server database service.
After installing the service, you should remove the password from the pgpass file, so that the password is not available to other users.
pgagent INSTALL service_name [options] connection_string
service_name specifies the name of the pgAgent service.
specifies a logging verbosity. Specify a 0 to log ERROR messages, 1 to log WARNING messages, or 2 to log DEBUG messages. The default is 0
connection_string specifies connection information for an Advanced Server host.
Connecting as user enterprisedb.
Using the password 1safepassword.
You can optionally include the REMOVE keyword to remove a pgAgent service:
On Linux, the pgAgent service is named ppas-agent-9.4; the service resides in the /etc/init.d directory. You can control the pgAgent service, or check the status of the pgAgent service with the following command:
Where action specifies:
start to start the service.
stop to stop the service
restart to stop and then start the service.
status to return the status of the service.


Table of Contents Previous Next