Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 29th, 2004, 06:34 PM
ProggerPete ProggerPete is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Brisbane, Australia
Posts: 1,431 ProggerPete User rank is Sergeant (500 - 2000 Reputation Level)ProggerPete User rank is Sergeant (500 - 2000 Reputation Level)ProggerPete User rank is Sergeant (500 - 2000 Reputation Level)ProggerPete User rank is Sergeant (500 - 2000 Reputation Level)ProggerPete User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 22 m 9 sec
Reputation Power: 23
Connect to server using sqlplus

I'm trying to connect to our oracle servers using SQLPlus.

I've done a full install of the client software on my dev box. I can now connect to both of our servers (We've got an old one which we are in the process of moving stuff off.) in the stand alone enterprise management console.

SQLPlus still doesn't talk though.

I tried configuring "Local Net Service Name" using the Net Configuration Assistant.
I entered
1. Oracle 8i or later for version. We are running 9.something
2. shman for service name. That's what the database is called and the service name I entered in the management console which works.
3. tcp for protocol
4. webserver for host name. That's the server machine name, using webserver as host name worked in management console.
5. 1521 for port. I checked on the server and there is a listener showing for port 1521

When I run a test it gives me an error.
ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor.

The tnsnames.ora file looks like

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

SHMAN.MANTEL.LOCAL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = webserver)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = shman)
)
)

I checked under services on server and there is a service called OracleOraHome92TNSListener running. I checked under Oracle Net Manager and it shows the listener on port 1521.

Any suggestions will be gratefully received.
Cheers,
Pete

Reply With Quote
  #2  
Old June 30th, 2004, 07:59 AM
shafique shafique is offline
Senior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 305 shafique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 20 sec
Reputation Power: 5
I think, you made mistake when you were creating the service, I am not sure that following changes will work or not. Lets try, for example your service name shman and global database name is shman.mantel.local
now make the following changes in your piece of code:

SHMAN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = webserver)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = SHMAN.MANTEL.LOCAL)
)
)

If it does not work, create your service again with appropriate values.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Connect to server using sqlplus


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway