Solved

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

Posted on 2014-09-08
4
330 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

696 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