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 -> Some Lateral thinking Required - Hard-Coded instance workaround

Some Lateral thinking Required - Hard-Coded instance workaround

From: Johne_uk <edgarj_at_tiscali.co.uk>
Date: 17 Apr 2006 08:39:52 -0700
Message-ID: <1145288391.975168.128910@z34g2000cwc.googlegroups.com>


Hi,

I'm trying to resolve a problem. I currently have a java application utilising an oracle instance called orany1. The developers made the mistake of hard-coding all the sql references to the tables with the instance name i. table_name_at_orany1. The application connects to the instance as the user that owns the application schema.

However, I now need to move the application schema to another instance called orany2. This will be a short-term measure as the application will shorlty be replaced. The developers are apprehensive about changing the @orany1 references in the java code and have asked me to look into a workaround.

I need to try and find a way to connect to the orany2 instance and for the table references to orany1 to actually read from the orany2 tables. I've tried using synonyms but his was unsuccessful.

What about changing the service name in tnsnames.ora on the application web server? The server name will be orany1 and the sid will be orany2. I guess I can test this when I return to work.

Thanks for any assistance in advance.

regards
John Received on Mon Apr 17 2006 - 10:39:52 CDT

Original text of this message

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