Обсуждение: how to connect remote database

Поиск
Список
Период
Сортировка

how to connect remote database

От
Srinivasa R Chava
Дата:
Hai,
How to connect the database from remote client ,using psql
In oracle we use the command like the following one at sqlplus
prompt.
Sqlplus> username/password@hostname

How to do it in postgresql
I tried like this
psql dabasename username@hostname

It is not working.

Can anybody has an idea?
Thanks
chava
--

Srinivasa R Chava (Chava) <s.chava@wcom.com>
Application Developer
Corporate Intra/Internet Systems
WORLDCOM - http://www.worldcom.com/ - NASDAQ:WCOM
500 Clinton Center Drive (Corporate Headquarters)
Clinton, Mississippi (MS) USA  39056
(601)460-3122 / vnet4603122 / (800)844-1009 / FAX(601)460-8257

Re: how to connect remote database

От
"Thalis A. Kalfigopoulos"
Дата:
On Mon, 16 Jul 2001, Srinivasa R Chava wrote:

> Hai,
> How to connect the database from remote client ,using psql
> In oracle we use the command like the following one at sqlplus
> prompt.
> Sqlplus> username/password@hostname
>
> How to do it in postgresql
> I tried like this
> psql dabasename username@hostname
>
> It is not working.

Do psql --help for the options. There's a -h option. The server must be accepting network coonnections (postmaster must
havebeen started with -i) 

cheers,
thalis

>
> Can anybody has an idea?
> Thanks
> chava
> --
>
> Srinivasa R Chava (Chava) <s.chava@wcom.com>
> Application Developer
> Corporate Intra/Internet Systems
> WORLDCOM - http://www.worldcom.com/ - NASDAQ:WCOM
> 500 Clinton Center Drive (Corporate Headquarters)
> Clinton, Mississippi (MS) USA  39056
> (601)460-3122 / vnet4603122 / (800)844-1009 / FAX(601)460-8257
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


Re: how to connect remote database

От
Peter Eisentraut
Дата:
Srinivasa R Chava writes:

> psql dabasename username@hostname
>
> It is not working.

psql --help
man psql
lynx /usr/local/pgsql/doc/html/index.html

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


Re: how to connect remote database

От
"Rommel B. Abaya"
Дата:
psql <databasename> -h <hostname/ip address> -U <username>

e.g. To connect to database customers on server gravy from server xxx :

psql customers -h gravy -U mypassword


-- rba

hth


Srinivasa R Chava wrote:

> Hai,
> How to connect the database from remote client ,using psql
> In oracle we use the command like the following one at sqlplus
> prompt.
> Sqlplus> username/password@hostname
>
> How to do it in postgresql
> I tried like this
> psql dabasename username@hostname
>
> It is not working.
>
> Can anybody has an idea?
> Thanks
> chava
> --
>
> Srinivasa R Chava (Chava) <s.chava@wcom.com>
> Application Developer
> Corporate Intra/Internet Systems
> WORLDCOM - http://www.worldcom.com/ - NASDAQ:WCOM
> 500 Clinton Center Drive (Corporate Headquarters)
> Clinton, Mississippi (MS) USA  39056
> (601)460-3122 / vnet4603122 / (800)844-1009 / FAX(601)460-8257
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

Вложения