I'm moving my production environment from Windows to Linux.
A shell script will be used to perform meta-data changes.

My DBA password has a single quote (') and an exclamation mark (!) in it.
And for the live of me, I can't get my shell script to connect.

Example. Say may password is

I've tried escape characters:
dbisql -c "UID=DBA;PWD=I,haven\'tAnIdea!;Server=pw02;ASTART=No"

I've tried placing my connection string in a file, with- , and without escape characters.
dbisql @connection.ini

I know the simplest would be to change my password. But that doesn't solve what has now become an obsession to solve!

asked 22 Jan '15, 14:47

Liam's gravatar image

accept rate: 0%

edited 22 Jan '15, 14:48

which SQLA version?

(22 Jan '15, 15:12) Justin Willey
Replies hidden

Apologies. Should have mentioned that. SQLAnywhere 16 on Ubuntu Linux 14.10

(22 Jan '15, 15:15) Liam

There seems to be 2 layers of parsing you need to escape for. Quadruple up those "'" chars

My test with granting a password of

grant connect to ... Identified by 'abc''def'

I found I needed to submit the password as



permanent link

answered 22 Jan '15, 17:51

Nick%20Elson%20SAP%20SQL%20Anywhere's gravatar image

Nick Elson S...
accept rate: 29%

edited 22 Jan '15, 17:54

Thank you Nick. Will give it a try.

(23 Jan '15, 06:49) Liam

I wrote an "argv" app in C a very long time ago that displays the command line arguments that are passed on to "main" using a variety of methods (argc/argv, Windows GetCommandLine and GetCommandLineW, etc.). This handy tool lets you see how command-line arguments are massaged by your shell and the C run-time. Very, very useful in cases like this when you need to understand just what the application is actually seeing.

(23 Jan '15, 11:44) JBSchueler
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 22 Jan '15, 14:47

question was seen: 568 times

last updated: 23 Jan '15, 11:44