Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie question - how to select db with sql plus?
Under WindowsX, you'll get 4 input boxes:
The first is for login /schema name
the second is for password
the third is for service /SQL*PLUS connect string
and the fourth is for type of conneciotn (NORMAL,SYSOPER,SYSDBA)
The third line is where you decide which INSTANCE you're going to connect to. This line points to an entry in TNSNAMES.ORA under ORANT/NETWORK/ADMIN. If you do not have this set up right, you should get a "Unable to resolve service name" error. If you get this error, the quickest fix is to open TNSNAMES, copy one of the entires to the bottom of the file and change things like the entry name, the host name, and the SID.
If you get an "Unable to connect to host" type error, make sure your LISTENER.ORA (in the same directory on the server) is set up right. If you already had one instance running and are adding another, the quickest way is look at the bottom of the file--
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = ADMIN
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = ORCL)
)
)
and insert your new instance info like this:
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = ADMIN
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = ORCL)
)
(SID_DESC =
(SID_NAME = ORCO)
)
)
It really doesn't matter what the instance SID is so I don't guess you're asking about that. If you want to have a more descriptive name for your users, just change the entry name in TNSNAMES.ORA.
For instance, I have an instance pointing to sid HMCP on a machine called DALLAS (doesn't have a firm IP yet) and the entry name is dev_prod.
When someone logs in they use:
username
password
dev_prod
normal
Hope that helps
-Dean
On Sun, 28 Mar 1999 15:33:48 GMT, gerhard.hofmann_at_nospam.planat.de (Gerhard Hofmann) wrote:
>Hello, > >I am a newbie to oracle and need some advice. Right now, I only used >Ingres DBMS. > >I installed Oracle 8 on an NT machine. I can connect to the default >database with SQL Plus and run SQL queries against it. > >Now I wanted to use another database. I created a new one "ORC0" with >the Database Assistant. BTW, can I change that name? > >My problem: I have no idea how to connect to that new databse with SQL >Plus. Any tips? >------------------------------------------------- >Please copy all answers to my email address >gerhard.hofmann_at_planat.de >Remove the "nospam"Received on Mon Mar 29 1999 - 09:44:14 CST
![]() |
![]() |