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

Re: Some Lateral thinking Required - Hard-Coded instance workaround

From: William Robertson <william.robertson_at_bigfoot.com>
Date: 17 Apr 2006 09:30:23 -0700
Message-ID: <1145291423.430148.62450@i39g2000cwa.googlegroups.com>


DA Morgan wrote:
> Johne_uk wrote:
> > 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
>
> I'd make the developers change the reference to one that is not
> hard-coded to teach them a lesson about bad behaviour having
> consequences. This will not be the only application they do this
> in and not the only time you will have to move an app.
>
> BTW: Exactly how was this moved from test to prod?
> --
> Daniel A. Morgan
> http://www.psoug.org
> damorgan_at_x.washington.edu
> (replace x with u to respond)

Maybe they were too Agile for a test system. Received on Mon Apr 17 2006 - 11:30:23 CDT

Original text of this message

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