(wrong string) €“ is they a way to provide indirection for db name?

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Mon, 5 Jan 2009 10:16:48 -0800 (PST)
Message-ID: <cd3e04fc-3ac3-49fa-a4cb-5f54734b76c6_at_o40g2000yqb.googlegroups.com>

On Jan 5, 12:35pm, ddf <orat..._at_msn.com> wrote:
> On Jan 5, 11:24am, zigzag..._at_yahoo.com wrote:
> > A third party application is using JDBC URL to connect to Oracle,
> > jdbc:oracle:thin:scott/tiger_at_MyOracleHost:1521:MyDB
> > For some reason in third party application, same URL has to be used
> > for
> > Dev, QA and Production. I know using /etc/hosts (Or its equivalent in
> > Windows), I can point MyOracleHost to different hosts. But, is there
> > any way to point MyDB to different database names.
> No, as that is the SID of the instance/database for the connection;
> it's not a TNS alias.
> David Fitzjarrell

Without changing the connect string presented then I agree with David. The application should be written so that it builds the connect string. We use something like below:

jdbc:oracle:thin:_at_(description=(address=(protocol=tcp)(host=db_server) (port=1521))(connect_data=(SERVICE_NAME = test.world)))

The connect data comes from a Webserver configuration file so the same code can be ran against multiple targets just based on the webserver configuration.

Have you checked to see if there is a provided way to configure the third-party connect string information.

HTH -- Mark D Powell -- Received on Mon Jan 05 2009 - 12:16:48 CST

Original text of this message