Solved

Can you please tell what is the syntax error in the following sqlplus command?

Posted on 2014-09-08
4
327 Views
Last Modified: 2014-09-08
hi, can you help me figure out, why do i get error?

[u@h W]$ sqlplus dbsnmp/abcdqwe$1@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=abcd123)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ABCDEFG)))
-bash: syntax error near unexpected token `('
[u@h W]$
0
Comment
Question by:Rao_S
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 23

Expert Comment

by:David
ID: 40310464
A better way to find your answer is to deconstruct the problem, Rao.  Confirm that you can ping the host, and tnsping the service; if they work, my next step is usually to leave off the password until prompted for it.
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 500 total points
ID: 40310473
the $1@ is probably being interpreted on the command line as a substitution

put the entire connect string in single quotes

sqlplus 'dbsnmp/abcdqwe$1@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=abcd123)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ABCDEFG)))'
0
 

Author Comment

by:Rao_S
ID: 40310571
thank you sdstuber, single quote worked.... i tried with double quote, .. i should have tried with a single quote...
0
 

Author Closing Comment

by:Rao_S
ID: 40310573
thank you..
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

726 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