• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 623
  • Last Modified:

Sqlplus connection through command prompt

Hello experts,
I need your help, I have been experience a odd thing when I connect to my oracle database through the command prompt on the client side.
Yesterday, I deinstalled and reinstalled my oracle fat client installation on the client side;  when I tried to connect using sqlplus /nolog and then "connect / as sysdba" or using the "user/pass@service_name" I got an Ora-12560 TNS:protocol adapter error, but if I connect using "sqlplus user/pass@service_name" I am able to connect.

I will appreciate any ideas that help me to find out the problem.

Thank you
0
mwells08
Asked:
mwells08
1 Solution
 
slightwv (䄆 Netminder) Commented:
I can see where 'as sysdba' wouldn't work but there should be no difference using "user/pass@service_name" on the command line or with a CONNECT after '/nolog'.

Can you provide screen shots where one works and one doesn't (not the "as sysdba" one)?
0
 
mwells08Author Commented:
Thank you for replying so fast, I attached 3 screenshots.
sqlplus-example2.JPG
sqlplus-example1.JPG
sqlplus-example3.JPG
0
 
magarityCommented:
If your new password has an '@' in it, you'll get this because it confuses the format of the user/pass@service looks like user/p@ss@service
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
mwells08Author Commented:
there is no '@' on the password, I typed user/pass@service_name.

Thanks
0
 
johnsoneSenior Oracle DBACommented:
If you look at examples 1 and 3 that you provided, where is the database name?

Example3, the command should be:

connect scott/pass@oraDB

I cannot see in example1 where you are specifying anything.  However the way you are using it in example1, I have only seen when connecting to a local database.  I believe that when it prompts for user, you should use:  scott/pass@oraDB, but I don't 100% remember how to do that one.
0
 
mwells08Author Commented:
You were right, thank you johnstone, I forgot to set the oracle_sid and oracle_home before trying to connect.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now