How to access a table from one database to another database
Hai all,
I have 2 databases namee PAO and CAS.
PAO contains 3 schemas named Public,pao,sts
CAS contains 4 schemas named Public,cao,sts,reports
Now i am in PAO database..now i want access table 'activity' in schema
'cas' in CAS database.
How it is posible.
2nd thing is...
i have 2 servers access i.e local and mainserver.
How access table from one server to another server?
please tel me...because we need this one
_____________________________________________________
Vivekananda.R <mailto:vivekanandaswamyr@infics.com> | Software Engineer
| CGDA Program.
Infinite Computer Solutions India Pvt. Ltd.|Exciting Times ... Infinite
Possibilities...
SEI-CMMI level 5 | ISO 9001:2000
IT SERVICES | BPO |
Telecom | Finance | Healthcare | Manufacturing |
Energy & Utilities | Retail & Distribution | Government
Tel +91-80-4133 0000-2 Ext:3006 | Mobile: 9986463365
Fax +91-80-513-10853 | www.infics.com <http://www.infics.com/>
USA | United Kingdom | India | China | Singapore | Malaysia |Hong Kong
_____________________________________________________
Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this email from your records.
On Sat, 15 Jul 2006 10:26:55 +0530
"VivekanandaSwamy R." <VivekanandaSwamyr@infics.com> wrote:
Hai all,
I have 2 databases namee PAO and CAS.
PAO contains 3 schemas named Public,pao,sts
CAS contains 4 schemas named Public,cao,sts,reportsNow i am in PAO database..now i want access table 'activity' in
schema 'cas' in CAS database.
How it is posible.2nd thing is...
i have 2 servers access i.e local and mainserver.
How access table from one server to another server?
please tel me...because we need this one
Vivekananda,
I hope you just want the first one. I think what you need is to
re-think your database design.
From the PostgreSQL manual:
"A PostgreSQL database cluster contains one or more named databases.
Users and groups of users are shared across the entire cluster, but no
other data is shared across databases. Any given client connection to
the server can access only the data in a single database, the one
specified in the connection request."
http://www.postgresql.org/docs/8.1/static/ddl-schemas.html
Now your CLIENT can connect to two different databases with two
different connections and ditto for connecting to two different
clusters.
John Purser
--
Always do right. This will gratify some people and astonish the rest.
-- Mark Twain
VivekanandaSwamy R. wrote:
Hai all,
I have 2 databases namee PAO and CAS.
PAO contains 3 schemas named Public,pao,sts
CAS contains 4 schemas named Public,cao,sts,reportsNow i am in PAO database..now i want access table 'activity' in
schema 'cas' in CAS database.
How it is posible.2nd thing is...
i have 2 servers access i.e local and mainserver.
How access table from one server to another server?
please tel me...because we need this one
This can be done with DBlink which is a contrib module.
see the FAQ item number 4.17 for more info
http://www.postgresql.org/docs/faqs.FAQ.html
--
Tony Caduto
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql 8.x
Possible dblink, in the ./contrib directory would help ? I have never had to use it but it seems like it might be what you need.
HTH,
Greg Williamson
DBA
GlobeXplorer LLC
-----Original Message-----
From: pgsql-general-owner@postgresql.org on behalf of VivekanandaSwamy R.
Sent: Fri 7/14/2006 9:56 PM
To: pgsql-general@postgresql.org
Cc:
Subject: [GENERAL] How to access a table from one database to another database
Hai all,
I have 2 databases namee PAO and CAS.
PAO contains 3 schemas named Public,pao,sts
CAS contains 4 schemas named Public,cao,sts,reports
Now i am in PAO database..now i want access table 'activity' in schema
'cas' in CAS database.
How it is posible.
2nd thing is...
i have 2 servers access i.e local and mainserver.
How access table from one server to another server?
please tel me...because we need this one
_____________________________________________________
Vivekananda.R <mailto:vivekanandaswamyr@infics.com> | Software Engineer
| CGDA Program.
Infinite Computer Solutions India Pvt. Ltd.|Exciting Times ... Infinite
Possibilities...
SEI-CMMI level 5 | ISO 9001:2000
IT SERVICES | BPO |
Telecom | Finance | Healthcare | Manufacturing |
Energy & Utilities | Retail & Distribution | Government
Tel +91-80-4133 0000-2 Ext:3006 | Mobile: 9986463365
Fax +91-80-513-10853 | www.infics.com <http://www.infics.com/>
USA | United Kingdom | India | China | Singapore | Malaysia |Hong Kong
_____________________________________________________
Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this email from your records.
!DSPAM:44b875fa155491804284693!
am 15.07.2006, um 10:26:55 +0530 mailte VivekanandaSwamy R. folgendes:
Now i am in PAO database..now i want access table 'activity' in schema
'cas' in CAS database.
How it is posible.
...
How access table from one server to another server?
08:02 < akretschmer> ??dblink
08:02 < rtfm_please> For information about dblink
08:02 < rtfm_please> see http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dblink/
08:02 < rtfm_please> or http://pgfoundry.org/projects/dblink-tds/
Read this.
HTH, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47215, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===