Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to connect to different database in Oracle 7 ?

Re: How to connect to different database in Oracle 7 ?

From: Jim <jimmorgan_at_csi.com>
Date: Thu, 23 Apr 1998 17:25:11 -0500
Message-ID: <OqSzv5vb9GA.64@nih2naab.prod2.compuserve.com>


After you've created the database link, you can create a synonym for it. A sly thing to do is to create a synonym named the same thing as your table...that way your apps can SELECT FROM MYTABLE and they don't even know MYTABLE is in a different database.

After looking up CREATE DATABASE LINK take a look at CREATE SYNONYM.

--
Regards,
Jim
Terry Dykstra [TeamPS] wrote in message <01bd6e22$d5dfcf80$3301020a_at_tdykstra>...
|You create database links, which allow you to select from different
|database at the same time:
|see CREATE DATABASE LINK ....
|Example: select * from mytable_at_DIFFERENT_DATABASE
|where DIFFERENT_DATABASE is a database link.
|--
|Terry Dykstra [TeamPS]
|Canadian Forest Oil Ltd.
|
|Robert Yang <NOSPAM_ryang_at_teleport.com_NOSPAM> wrote in article
|<Q8N_.550$UC3.446068_at_news2.teleport.com>...
|> Hi,
|>
|> We are porting from MS SQL Server 6.5 to Oracle 7.3 and are quite
|confused,
|> as you might expect, so please bear with me 8)
|>
|> There is a concept in SQL Server of multiple databases on a given server
|> which can
|> contain the same schema (tables, stored procedures, etc.). When
|connecting
|> with
|> DB-Lib, the dbuse() API can be used to set the desired default database,
|so
|> that
|> SQL commands like "Select Name from My_Table" can be executed.
|>
|> However, I cannot see how to do this with OCI or even Embedded SQL. It
|> would seem
|> that the database name must be specified for non-default databases, e.g.
|> "Select Name from MyDatabase.MyTable".
|>
|> Any insight would be appreciated !
|> --
|> Rob Yang
|> Sr. Software Engineer
|> San Jose, CA, USA
|>
|>
|>
|>
|>
|>
Received on Thu Apr 23 1998 - 17:25:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US