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: Steve Phelan <stevep_at_XXnospamXX.toneline.demon.co.uk>
Date: Tue, 21 Apr 1998 09:00:15 +0100
Message-ID: <893145585.12954.0.nnrp-01.c2de712e@news.demon.co.uk>


Look at the CONNECT (embedded) statement syntax in the Pro*C (or any other Oracle percompiler manual, or the SQL Reference manual). Basically, you stick the database SID on the connect string. You can also use this syntax if you wish to simultaneously connect to multiple servers from within the one program.

Steve Phelan.

Robert Yang wrote in message ...
>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 Tue Apr 21 1998 - 03:00:15 CDT

Original text of this message

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