Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 8F57A632292 for ; Thu, 22 Apr 2010 16:30:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 57451-10 for ; Thu, 22 Apr 2010 19:30:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mail.postgresql.org (Postfix) with SMTP id 686DE63251E for ; Thu, 22 Apr 2010 16:30:21 -0300 (ADT) Received: (qmail invoked by alias); 22 Apr 2010 19:30:16 -0000 Received: from 77-21-34-42-dynip.superkabel.de (EHLO [192.168.178.22]) [77.21.34.42] by mail.gmx.net (mp023) with SMTP; 22 Apr 2010 21:30:16 +0200 X-Authenticated: #955937 X-Provags-ID: V01U2FsdGVkX192Fs5mR9R2cuW2a4bswnrcRgUvv6Sk7z9EHOagfS kZsekxyldFdahY Message-ID: <4BD0A3C1.2010803@gmx.de> Date: Thu, 22 Apr 2010 21:30:09 +0200 From: BlackSkaven User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: "Josi Perez (3T Systems)" CC: pgsql-admin@postgresql.org Subject: Re: register a service in Windows References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.46000000000000002 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201004/318 X-Sequence-Number: 34412 Hello, just use pg_ctl register ;) http://www.postgresql.org/docs/8.4/interactive/app-pg-ctl.html Good luck, Peter Am 22.04.2010 20:11, schrieb Josi Perez (3T Systems): > I tried to use SC Windows command (Service Commander) with an > administrative login, but no success again: > net user *postgres* mypass /add > > *sc* *create* pgsql-8.4 binpath= "C:\*postgres*\8.4\bin\pg_ctl.exe > runservice -w -N pgsql-8.4 -D C:\data5\" type=own start=auto > displayname= "*PostgreSQL* 8.4 p5430" password= mypass > > *sc* start pgsql-8.4 > > All commands above give me "Access denied". > > Anyone have a tip? Am I in a wrong list to ask about this? > Thanks in advance, > Josi Perez > > > > 2010/4/19 Josi Perez (3T Systems) > > > Hi, > > I'm trying to start automatically 3 postgresql services in Windows > without success. > > What I already do: > 1) Install postgres8.4.2 binaries for Windows - ok, this service > installs automatically without any action mine; > > 2) Created 2 new clusters: > C:\Program Files\PostgreSQL\8.4>bin\initdb --pgdata "C:\data5" > --encoding 'UTF8' --locale 'pt_BR.UTF-8' --username postgres > C:\Program Files\PostgreSQL\8.4>bin\initdb --pgdata "C:\data7" > --encoding 'UTF8' --locale 'pt_BR.UTF-8' --username postgres > > and changed the postgres.conf contained in each of these directories: > in C:\data5: port=5430 > in C:\data7: port=5434 > > 3) Started pg_ctl manually and worked with the clusters/databases > inside pgAdminIII, including port 5432: > C:\data5>"C:\Program Files\PostgreSQL\8.4\bin\pg_ctl" -D "C:\data5" > -N postgres842w5430 -l logfile5430 start > C:\data7>"C:\Program Files\PostgreSQL\8.4\bin\pg_ctl" -D "C:\data7" > -N postgres842w5434 -l logfile5434 start > > But, I want to start each cluster automatically. > 1) If I try to register > C:\data5>"C:\Program Files\PostgreSQL\8.4\bin\pg_ctl" register -N > "postgres842w5430" -D "C:\data5" -U postgres -P postgres > > comes the message: > can not open the service manager > > 2) In regedit I can see: > HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-8.4 > HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Services\pgsql-8.4 > > but, how can I add a new service? > In Installations there is a key "Data Directory" - then, to start > another cluster I needed to install binary PostgreSQL again with new > parameters? > > 3) I tried to left these commands at autoexec.nt without success. > 4) I tried to use batchrun to add these commands at startup and > worked, but I needed an icon to stop the processes. > > Help. > How can I start these 3 data base areas as a service in Windows? > > Thanks in advance. > Josi Perez > >