Solved

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

Posted on 2004-09-29
6
2,759 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
ID: 12182237
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
ID: 12182491
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
ID: 12182719
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
ID: 12182781
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
ID: 12187530
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
ID: 12194384
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JDeveloper 12c for 32 bit 4 68
Oracle Next Available Number 2 31
oracle 11g 23 48
Oracle sql query 7 43
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…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

912 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

18 Experts available now in Live!

Get 1:1 Help Now