Solved

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

Posted on 2004-09-29
6
2,767 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
Oracle Pivot Question 8 71
clob to char in oracle 3 64
grant user/role question 11 32
Row_number in SQL 6 34
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

821 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