Solved

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

Posted on 2014-09-08
4
316 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
thank you..
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.

Join & Write a Comment

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 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 Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

743 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

11 Experts available now in Live!

Get 1:1 Help Now