Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sqlplus problem on oracle 9i DB

Status
Not open for further replies.

chrislee8

Programmer
Aug 21, 2001
5
US
I had problem using sqlplus with tns service not resolve problem.

I did a search, only 1 tnsnames.ora file in oracle installation directory:
c:\oracle\ora90\network\admin

here is that file:

# TNSNAMES.ORA Network Configuration File: C:\oracle\ora90\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

When I installed the oracle 9i DB, it asked for a oracle's global database name which I typed in oscar.chrislee8

the SID is oscar, I left all the password as default.

I try to do it:

sql> connect scott/tiger@oscar , tns: service name not resolve.

what is wrong with my oracle installation?

should I manually put in the entry into tnsnames.ora file? if yes, please anyone show me an example, i know oracle provide syntax sample, but i really like to have a real example to follow.

Thanks
 
I think, you have made mistake in naming Global Database and SID. Normally both of these things remain same. I don't exactly recall but during installation if u type in one of fields, that name automatically comes into the other field.


If you can do re-install Oracle and specify both the things same.

Regards,
Amit
 
hi

you need to put thisinfo in tnsnames.ora fie.

So create one entry for ur new hostname which tracks the machine on which ur dataase is installed.

a sample for that would be

newname=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)(HOST = servername or machine name)
(PORT = 1525)
--1525 is hte default port u have. If you have chaged the port then write that here

)
(CONNECT_DATA =
(SID = oscar) ==SID is ur SID
)
)



save this file and then try to get connected with
scott/tiger@newname

hope this works for u

abhivyakti
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top