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: changing default database

Re: changing default database

From: Spencer <spencerp_at_swbell.net>
Date: Sun, 28 Jan 2001 13:42:33 -0600
Message-ID: <IC_c6.49$Dk2.56134@nnrp3.sbc.net>

if you are using the Oracle JDBC thin (type 4) driver, part of the connect string includes the server, port number, and instance separated by colons like this ... host:port:sid ... e.g. myserver:1521:orcl

since you seem to be able to connect to what you refer to as a "default" database, then you should be able to use a different instance name in place of "orcl" in the connect string, and be able to connect to another instance on the same host.

the application may have these values hardcoded, but more likely, it is getting the values for host, port and sid from a configuration file and/or environment variable(s).

if you the application is using the Oracle JDBC OCI driver, then it will be picking the host, port and instance/service via the mechanism defined in the sqlnet.ora file (which is likely the local tnsnames.ora file)

i can't say that i've ever run across a "can't find tables" error message, that seems very strange to me. if this is an error message from the oracle server, there should be an associated ORA- or TNS- number.

sometimes an ORA-904 table or view does not exist" message is due to insufficient privileges on the object (e.g. the user has not been granted select privilege to the table). remember that table names are case sensitive, and if it the connected user is not the owner of the table, the table name must be qualified (i.e. prefixed with the name of the owner and a period... e.g. SYS.DUAL)

"Koen Scholtus" <nospam_at_scholtus.nl> wrote in message news:3A744D39.7E3C13A5_at_scholtus.nl...
> Well, that's what I tried. Except that the application (java) says that it
> can't find tables (when I connect via sqlplus using the @ directive, I can
> see that everything is there).
> That's why I believe that that application is not build to use something
> else
> than the most obvious place (i.e. default database).
> Also I can start messing around with port numbers (or even secondary
> IP adresses), but I don't know if that will lead be to the solution.
> Changing over to another default database looks to me as a solution
> with a higher success chance.
>
> regards,
> Koen Scholtus
>
> "C. Ferguson" wrote:
>
> > Hi,
> > since you mention java client, I'm going to assume a jdbc connection.
> > Check the connection string you are using. In that string you will most
> > likely find the connect instance specified as orcl. Change that to one
> > of the other instances you wish to connect to.
> >
> > hth,
> > cindy
> >
> > Koen Scholtus wrote:
> >
> > > On my server (8.0.6) i'v 3 instances running, each holding
> > > their own database.
> > > As clients we use a java based client, that appears to be
> > > connectable only to the default database.
> > >
> > > Is there a way to alter the default database instance (orcl) for
> > > a non-default database (orc1, orc2)?
> > >
> > > Regards
> > > Koen Scholtus
> > > --
> > > ===========================
> > > spamprotection : remove 'nospam' and use 'info' instead
> > > ===========================
>
> --
> ===========================
> spamprotection : remove 'nospam' and use 'info' instead
> ===========================
>
>
>
Received on Sun Jan 28 2001 - 13:42:33 CST

Original text of this message

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