Solved

ORA-12560: TNS:protocol adapter error - Want to "connect scott/tiger"

Posted on 2004-09-29
6
2,752 Views
Last Modified: 2007-12-19
When I do this:

SQL> connect scott/tiger
ERROR:
ORA-12560: TNS:protocol adapter error

However this works:

SQL> connect scott/tiger@svrmargus
Connected.
SQL>

I would like to know why "connect scott/tiger" is not working and how to fix it ?
0
Comment
Question by:MargusLehiste
6 Comments
 
LVL 10

Expert Comment

by:Jay Toops
Comment Utility
normally you would say
connect {Servername}

then it would prompt for
userid and password

there is not "Default" dabase in the interactive sql tool

connect scott/tiger doesn't work because you havent told it what server that userid/password is on

Jay
0
 
LVL 7

Expert Comment

by:Bigfam5
Comment Utility
If you are loging-in from the Client you must have the @Service Name
From the DB Server, it depends on how the SQLNET.ora file parameters are setup

0
 
LVL 1

Author Comment

by:MargusLehiste
Comment Utility
Show how would i set up this parameter,

Im using SQL*Plus on the same machine as DB is located @
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 8

Accepted Solution

by:
baonguyen1 earned 300 total points
Comment Utility
simple say that the sqlplus session does not know where it should connect to, so a connection string that specify the connection in the TNSNAMES.ORA should be specify:

If you are on the same machine of the database, just set the SID environment variable, say you are on NT:

C:\set ORACLE_SID=xyz
C:\sqlplus /nolog
SQL>connect scott/tiger
connected
SQL>
0
 
LVL 8

Expert Comment

by:annamalai77
Comment Utility
hi there

the connectino string in oracle is like a human ear, which is used to listen to the oracle database.

the connection string is created and stored in the tnsnames.ora file using the net8 easy config menu option which asks for the host or the server name, the database name, the protocol and the connection string name.

regards
annamalai
0
 

Expert Comment

by:TheGoToGuy
Comment Utility
Baonguyen1 has the gist of it.  If the database and client are on the same server, then set the ORACLE_SID parameter.
In Unix(using Korn shell) it would be:  export ORACLE_SID=abc1
In Windows 2000/NT/XP it would be : set ORACLE_SID=abc1

Additionally, depending on the version of Oracle you are using, you can set the environment variable of LOCAL=YES which would indicate that the connection is to occur on the server you are currently on.
You do not have to specify the connect name or database name unless the database is on a different machine than the one you are currently own or if you want to use SQLNet to connect to a database even though you are on the same server as the database.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video shows how to recover a database from a user managed backup
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now