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
Solved

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

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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Queries 15 45
Can anyone please tell me what does below Stored Procedure does? 4 33
Oracle collections 15 26
oracle numeric condition check 4 27
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…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
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, 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.

791 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