Thread: How to access table from one database to another database
hi,
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 im the new one for postgreSQL.
Thanks & Regards
Vivekananda.R | Software Engineer
Infinite Computer Solutions | Exciting Times…Infinite Possibilities...
SEI-CMMI level 5 | ISO 9001:2000
Tel +91-80-5193-0000| Fax +91-80-51930009 | Cell No +91-9986463365|www.infics.com
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. |
VivekanandaSwamy R. schrieb: > > hi, > 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. Well, actually this is not possible. (And has nothing to do with pgadmin) however, in the contrib directory of your database there is dblink, which can issue queries to other (also remote ) postgres databases. > 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 im the new one for postgreSQL. You should avoid such constructs as much as possible. Maybe slony replication of that other table is feasable? Who knows.. it really depends on your application. > *Thanks & Regards* > > *Vivekananda.R **|** Software Engineer * > > *Infinite Computer Solutions **|** Exciting Times…Infinite > Possibilities... * > > *SEI-CMMI level 5 **| **ISO 9001:2000* > > * **Tel +91-80-5193-0000**|** Fax +91-80-51930009 **|** Cell No > +91-9986463365**|**www.infics.com** * > > > 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. > ^ ^ ^ you should tell your company lawyer such a statement is nonsense and even more in mailinglists :-) Kind regards Tino Wildenhain
You should never design a database structure that requires you to access a completely different database. The best way to keep data separate, yet give your users access to the uniqueness of a separate structure, is to create different schemas.
You may wish to spend some time re-thinking the structure of your DB system.
Hope this helps,
Derrick
----- Original Message -----From: VivekanandaSwamy R.Sent: Tuesday, July 04, 2006 12:34 AMSubject: [pgadmin-support] How to access table from one database to another databasehi,I have 2 databases namee PAO and CAS.PAO contains 3 schemas named Public,pao,stsCAS 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 im the new one for postgreSQL.Thanks & Regards
Vivekananda.R | Software Engineer
Infinite Computer Solutions | Exciting Times Infinite Possibilities...
SEI-CMMI level 5 | ISO 9001:2000
Tel +91-80-5193-0000| Fax +91-80-51930009 | Cell No +91-9986463365|www.infics.com
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.
I can think of numerous examples where someone might want to run a query against databases on different databases or servers. I don't think it has anything to do with design. You might think it is better to move the data together before running the query, but that takes a lot more time and effort for a one time query. As food for thought, do you think dblink was created for idiots who don't know how to design a database and it has no real purpose for those who actually know how to do proper design? As an aside, Vivekananda, your questions (all of the recent ones) belong on the pgsql maillist and not on the pgadmin maillist and you shouldn't be emailing the pgadmin owner as well. Sim ________________________________________________________________________________ You should never design a database structure that requires you to access a completely different database. The best way tokeep data separate, yet give your users access to the uniqueness of a separate structure, is to create different schemas. You may wish to spend some time re-thinking the structure of your DB system. Hope this helps, Derrick ----- Original Message ----- From: VivekanandaSwamy R. To: pgadmin-support@postgresql.org ; pgsql-admin-owner@postgresql.org Sent: Tuesday, July 04, 2006 12:34 AM Subject: [pgadmin-support] How to access table fromone database to another database hi, 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 im the new one for postgreSQL. Thanks & Regards Vivekananda.R | Software Engineer Infinite Computer Solutions | Exciting Times.Infinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 Tel +91-80-5193-0000| Fax +91-80-51930009 | Cell No +91-9986463365|www.infics.com Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and isintended 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 appearsthat this mail has been forwarded to you without proper authority, you are notified that any use or disseminationof this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.comand delete this email from your records.
> As an aside, Vivekananda, your questions (all of the recent ones) belong on the pgsql maillist > and not on the pgadmin maillist and you shouldn't be emailing the > pgadmin owner as well. And he probably shouldn't be posting html either! ;-) Antoine -- This is where I should put some witty comment.
On 7/4/06, Sim Zacks <sim@compulab.co.il> wrote: > I can think of numerous examples where someone might want to run a > query against databases on different databases or servers. > I don't think it has anything to do with design. Couldn't agree more. t.n.a.