Solved

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

Posted on 2014-09-08
4
322 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
  • 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 73

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pfile and SPfile - Oracle 2 57
Oracle SQL Select within a Where Clause 9 56
ORA-12560: TNS:protocol adapter error 8 85
Get the parent node - XMLTYPE 9 56
Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

920 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

16 Experts available now in Live!

Get 1:1 Help Now