Re: PgAgent Job Scheduling-Backup - Mailing list pgsql-admin

From Jayakumar_Mukundaraju
Subject Re: PgAgent Job Scheduling-Backup
Date
Msg-id 8BE2E1772BEE8D40B0FB9E59DF2A645E04C4E8A7@hcsmsg002.corp.satyam.ad
Whole thread Raw
In response to Re: PgAgent Job Scheduling-Backup  ("Vishal Arora" <aroravishal22@hotmail.com>)
List pgsql-admin
Dear Vishal, Ashish,
 
In third point u mentioned (
start>>shutdown>>Logoff your machine and login as postgres user (operating system) I tried that, That is not working,because here the domain name is standard so it is checking that user name globely and reject that user name. What is the next step.....
 
The 6th point.. I created that sceduler is running automatically ..
 
The 8th point.. I created one test.bat file and saved that script inthat file..and kept it in D:\test...
and in steps tab in definition place i saved  the         d:\test\test.bat     it.
 
I went pgAdmin III and in tools tab i entered Run Now... It is not running (Not currently running)...  after i went in D:\test folder i seen one test.bat file is there and one SQL file is there..
 
Kindly tell me where i did mistake...
 
Thanks & Regards
Jayakumar M
09963432764
 


From: Ashish Karalkar [mailto:ashish.karalkar@info-spectrum.com]
Sent: Tue 7/17/2007 5:33 PM
To: Jayakumar_Mukundaraju
Cc: Vishal Arora
Subject: Re: PgAgent Job Scheduling-Backup

 
----- Original Message -----
Sent: Tuesday, July 17, 2007 5:03 PM
Subject: PgAgent Job Scheduling-Backup

1)      Run PgAgent.sql script in maintenance database (Postgres database by >default).
        I copied that script and executied in Query tool, it is executed and i get that job icon tab.
2)      Install PgAgent service using the following command on command >prompt -
       "C:\Program Files\PostgreSQL\8.2\bin\pgAgent" INSTALL pgAgent -u postgres -p XXXX hostaddr=127.0.0.1 dbname=postgres user=Postgres
         I installed the pgAgent and it is running..( I checkied in Administrative tool>>Services>>> there PostgreSQL Scheduling Agent >> status is started

   Replace the path of pgAgent if you are not using default installation path of Postgres
   My pgAgent path is C:\Program FIles\PostgreSQL\8.2\bin\pgAgent

    Replace XXXX with the password of OS User Postgres (One given while installing Postgres on windows) ????
This is the password of postgres operating system user(Windows ) not the database user postgres.

      dbname=postgres (change if your maintenance database is different.)
      my Maintenance database is postgres.
3)      Login using Postgres user account in windows. ?????
 
start>>shutdown>>Logoff your machine and login as postgres user (operating system)

4)      Try to access pgAdmin III tool in that login. (These two steps are required to create pgpass.conf file under Postgres login account.)
 
start pgadmin and connect to the server with postgres database user (This will creat automatic pgpass.conf)
         In pgpass file i have two logins and password, one is server login and another is Account name and password
5)      Login back to your normal account.???
 
start>>shutdown>>log off postgres and lagin as a regular user
 
 

6)      Start pgAgent service using the following command on command prompt    Net start pgAgent
 
c:\net start pgAgent
 
        The command promopt is psql to postgresl prompt... postgres-# i entered       Net start pgAgent.... The cursor comes next line that is  postgres-# prompt
         I entered in  postgres-# pg_dump -f "D:\trial.sql" -apostgres -Upostgres... The cursor comes next line that is postgres-# prompt
7)      Create a new job using PgAdmin III
        Yes i created new jobs name is BACKUP

8)      Under step tab click Add to add new step. :- Yes i created new steps
>*       Specify some name : step name is B1
>*       Kind - SQL / Batch depending upon the kind of job to be performed.
>*       Database on which the job is to be performed.
>*       Definition tab would contain a SQL command if kind selected is SQL :
 
 
create a batch file containg following text and save it in the directory D:\test\test.bat
@echo off
"C:\Program FIles\PostgreSQL\8.2\bin\pg_dump" -U postgres -f  D:\test\test.sql -F p -C -d -D postgres 
and in the defination tab of stpe window write "d:\test\test.bat" and save the tab.
 
- In the step tab Definition place i entered  @echo off "C:\Program FIles\PostgreSQL\8.2\bin\pg_dump" -Upostgres -f D:\test\test.sql -F p -C -d -Dpostgres      @echo on    and saved that tab. 
>*       Definition tab would contain path of Batch file if kind selected is
>Batch
>9)      Under Schedule tab in Job window click Add to add new schedule for the job  : - I did it i added BK1 as a schedule name
>*       Specify some name
>*       Specify the start date & time :- todays date and time is 30mnts
>*       Specify the end date and time:- tomorrows date and time is 45 mnts
>*       Specify days or weekdays, months when the task needs to be performed in days tab
>*       Specify time hours & Minutes when you want the task to be performed. (Atleast One hour & minute to be selected.)
>*       Specify exception if any when you do not want the task to be performed.
>10)     All set to work.
 
Set the time and check the output in d:\test ditrectory
 
This was only i did it.. Kindly guide me  where i went wrong....
 
Thanks & Regards
Jayakumar M
 
 

DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated..

DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated..

pgsql-admin by date:

Previous
From: "Jayakumar_Mukundaraju"
Date:
Subject: Re: Job Scheduling-snap shoot
Next
From: Marcin Giedz
Date:
Subject: Re: compiling C Funktion for PostgreSQL