Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 9AD579FB9BF for ; Tue, 17 Jul 2007 10:30:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 83556-05 for ; Tue, 17 Jul 2007 10:30:28 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from pro33.abac.com (pro33.abac.com [66.226.64.34]) by postgresql.org (Postfix) with ESMTP id B43FE9FBACB for ; Tue, 17 Jul 2007 10:30:32 -0300 (ADT) Received: from ashishk (61.17.93.7.static.nagpur.vsnl.net.in [61.17.93.7] (may be forged)) (authenticated bits=0) by pro33.abac.com (8.13.8/8.13.8) with ESMTP id l6HDUKWs057470 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 17 Jul 2007 06:30:24 -0700 (PDT) (envelope-from ashish.karalkar@info-spectrum.com) Message-ID: <014901c7c876$a0de2e40$170211ac@LIONKING.COM> From: "Ashish Karalkar" To: "Jayakumar_Mukundaraju" , Cc: "Vishal Arora" References: <8BE2E1772BEE8D40B0FB9E59DF2A645E04C4E8A3@hcsmsg002.corp.satyam.ad> <00d301c7c86a$8e95f7b0$170211ac@LIONKING.COM> <8BE2E1772BEE8D40B0FB9E59DF2A645E04C4E8A7@hcsmsg002.corp.satyam.ad> Subject: Re: PgAgent Job Scheduling-Backup Date: Tue, 17 Jul 2007 19:00:17 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0146_01C7C8A4.B70ECA20" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/174 X-Sequence-Number: 26155 This is a multi-part message in MIME format. ------=_NextPart_000_0146_01C7C8A4.B70ECA20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: [ADMIN] PgAgent Job Scheduling-BackupJay, dont login to domain using postgres user login to youe syatem, anyways = as u see sql file is there means ur job has successfull , its a backup = file, be care full with what are things u want to include in ur backup with = pg_dump command parametrs in .bat file. also the message job is nt currently running means job has alredy done. ----- Original Message -----=20 From: Jayakumar_Mukundaraju=20 To: Ashish Karalkar ; pgsql-admin@postgresql.org=20 Cc: Vishal Arora=20 Sent: Tuesday, July 17, 2007 6:46 PM Subject: RE: PgAgent Job Scheduling-Backup Dear Vishal, Ashish, In third point u mentioned (=20 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 -----=20 From: Jayakumar_Mukundaraju=20 To: Vishal Arora ; ashish.karalkar@info-spectrum.com ; = pgsql-admin@postgresql.org=20 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=3D127.0.0.1 dbname=3Dpostgres = user=3DPostgres 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=20 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=3Dpostgres (change if your maintenance database is = different.) my Maintenance database is postgres.=20 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=20 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=20 "C:\Program FIles\PostgreSQL\8.2\bin\pg_dump" -U postgres -f = D:\test\test.sql -F p -C -d -D postgres=20 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.=20 >* 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=20 >* Specify some name >* Specify the start date & time :- todays date and time is = 30mnts=20 >* 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=20 >* 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.. ------=_NextPart_000_0146_01C7C8A4.B70ECA20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: [ADMIN] PgAgent Job = Scheduling-Backup
Jay,
 
 dont login  to domain using = postgres=20 user login to youe syatem, anyways as u see sql file is there means ur = job has=20 successfull , its a backup file,
be care full with what are things u = want to include=20 in  ur backup with pg_dump command parametrs in .bat = file.
also the message job is nt currently = running=20 means  job has alredy done.
----- Original Message -----
From:=20 Jayakumar_Mukundaraju=20
To: Ashish Karalkar = ; pgsql-admin@postgresql.org=
Sent: Tuesday, July 17, 2007 = 6:46=20 PM
Subject: RE: PgAgent Job=20 Scheduling-Backup

Dear = Vishal,=20 Ashish,
 
In third point u mentioned = (=20
start>>shutdown>>Logoff=20 your machine and login as postgres user (operating system) = I tried that, That is not working,because here the = domain name=20 is standard so it is checking that user name globely and reject that = user=20 name. What is the next step.....
 
The 6th point.. I created that sceduler is = running=20 automatically ..
 
The 8th point.. I created one test.bat file and saved = that script=20 inthat file..and kept it in D:\test...
and in steps tab in definition place i saved =20 the        =20 = d:\test\test.bat     it.
 
I went pgAdmin III and in tools tab i entered Run = Now... It is=20 not running (Not currently running)...  after i went in D:\test = folder i=20 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=20 [mailto:ashish.karalkar@info-spectrum.com]
Sent: Tue = 7/17/2007 5:33=20 PM
To: Jayakumar_Mukundaraju
Cc: Vishal=20 Arora
Subject: Re: PgAgent Job=20 Scheduling-Backup

 
----- Original Message -----
To: Vishal Arora ; ashish.karalkar@info-sp= ectrum.com=20 ; pgsql-admin@postgresql.org= =20
Sent: Tuesday, July 17, 2007 = 5:03=20 PM
Subject: PgAgent Job=20 Scheduling-Backup

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

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

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

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

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

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

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

DISCLAIMER:
This email (including any attachments) is intended = for the=20 sole use of the intended recipient/s and may contain material that = is=20 CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance = by=20 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=20 recipient, please contact the sender by email and delete all copies; = your=20 cooperation in this regard is appreciated..

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

------=_NextPart_000_0146_01C7C8A4.B70ECA20--