Thread: DB connectivity from a client machine
Hi,
I have a middle tier application in C on one machine which doesn't have postgres installed.
I have a machine that hosts my postgres database.
My middle tier application wants to connect to the Db server.
Is it mandatory for the m/c that hosts the middle tier application to have postgres installed.
Why I'm asking this is (though generally m/c hosting the middle tier component can connect to the m/c hosting the Db without any DB client installed) because i tried to run ecpg in the middle tier m/c and it doesn't work. Well it would definitely not work coz ecpg comes with postgres.
Can anyone suggest me a work around?
Thanks,
Jas
I have a middle tier application in C on one machine which doesn't have postgres installed.
I have a machine that hosts my postgres database.
My middle tier application wants to connect to the Db server.
Is it mandatory for the m/c that hosts the middle tier application to have postgres installed.
Why I'm asking this is (though generally m/c hosting the middle tier component can connect to the m/c hosting the Db without any DB client installed) because i tried to run ecpg in the middle tier m/c and it doesn't work. Well it would definitely not work coz ecpg comes with postgres.
Can anyone suggest me a work around?
Thanks,
Jas
On Tue, 2006-08-08 at 16:25, Jasbinder Bali wrote: > Hi, > I have a middle tier application in C on one machine which doesn't > have postgres installed. > I have a machine that hosts my postgres database. > My middle tier application wants to connect to the Db server. > > Is it mandatory for the m/c that hosts the middle tier application to > have postgres installed. > Why I'm asking this is (though generally m/c hosting the middle tier > component can connect to the m/c hosting the Db without any DB client > installed) because i tried to run ecpg in the middle tier m/c and it > doesn't work. Well it would definitely not work coz ecpg comes with > postgres. Are you running a packaged version of postgresql (rpm / deb???) or installing from source? If it's packaged, you should be able to get away with just the postgresql and -client packages, no -server etc... If it's source compiled, look in the INSTALL file. From the 7.4.13 INSTALL file we find this: Client-only installation: If you want to install only the client applications and interface libraries, then you can use these commands: gmake -C src/bin install gmake -C src/include install gmake -C src/interfaces install gmake -C doc install
In my database server, I'm using packaged version of postgres.
I installed it using: "yum install postgres" and this inturn searches for the rmp.
So, its a packaged version of postgresql.
Now as far as my client is concerned, that has the middle tier component written in C, i don't have any postgres there.
Do you mean to say that I need to install the client version of postgres in the m/c hosting the middle tier component and trying to connect to the postgres server?
~Jas
I installed it using: "yum install postgres" and this inturn searches for the rmp.
So, its a packaged version of postgresql.
Now as far as my client is concerned, that has the middle tier component written in C, i don't have any postgres there.
Do you mean to say that I need to install the client version of postgres in the m/c hosting the middle tier component and trying to connect to the postgres server?
~Jas
On 8/8/06, Scott Marlowe <smarlowe@g2switchworks.com> wrote:
On Tue, 2006-08-08 at 16:25, Jasbinder Bali wrote:
> Hi,
> I have a middle tier application in C on one machine which doesn't
> have postgres installed.
> I have a machine that hosts my postgres database.
> My middle tier application wants to connect to the Db server.
>
> Is it mandatory for the m/c that hosts the middle tier application to
> have postgres installed.
> Why I'm asking this is (though generally m/c hosting the middle tier
> component can connect to the m/c hosting the Db without any DB client
> installed) because i tried to run ecpg in the middle tier m/c and it
> doesn't work. Well it would definitely not work coz ecpg comes with
> postgres.
Are you running a packaged version of postgresql (rpm / deb???) or
installing from source?
If it's packaged, you should be able to get away with just the
postgresql and -client packages, no -server etc...
If it's source compiled, look in the INSTALL file. From the 7.4.13
INSTALL file we find this:
Client-only installation: If you want to install only the client
applications and interface libraries, then you can use these
commands:
gmake -C src/bin install
gmake -C src/include install
gmake -C src/interfaces install
gmake -C doc install
On Tue, Aug 08, 2006 at 05:25:12PM -0400, Jasbinder Bali wrote: > Why I'm asking this is (though generally m/c hosting the middle tier > component can connect to the m/c hosting the Db without any DB client > installed) because i tried to run ecpg in the middle tier m/c and it doesn't > work. Well it would definitely not work coz ecpg comes with postgres. This is about the third time you claim ecpg doesn't work. Would you please be so kind to explain what doesn't work? Of course ecpg can be run on a machine without a PostgreSQL server. And programs compiled with ecpg also do not need a server on the same machine, why should they? This is why Debian for instance has a seperate ecpg package. Michael -- Michael Meskes Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
Jasbinder Bali wrote: > In my database server, I'm using packaged version of postgres. > I installed it using: "yum install postgres" and this inturn searches for > the rmp. > So, its a packaged version of postgresql. > > Now as far as my client is concerned, that has the middle tier component > written in C, i don't have any postgres there. > Do you mean to say that I need to install the client version of postgres in > the m/c hosting the middle tier component and trying to connect to the > postgres server? No but you may need to install the libs. Joshua D. Drake -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/