Skip to Content
author's profile photo Former Member
Former Member

hdbsql - syntax error

Hello,

when we executed the below sql statement in hdbsql, we are getting the syntax error. I think issue is because of incorrect quotes. please suggest correct statement.

su - <sid>adm –c ‘hdbsql –U SYSTEM “ALTER SYSTEM ALTER CONFIGURATION('indexserver.ini','System')SET('password policy','force_first_password_change') = 'false' with reconfigure”’

Regards

Shridhar Gowda

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 05, 2015 at 06:08 PM

    I tried the same using the 2 step procedure and it works for me Can you try that? Step 1. hdbsql -i INS# -n HOSTNAME -U SYSTEM Step 2. ALTER SYSTEM ALTER CONFIGURATION('indexserver.ini','System') SET('password policy','force_first_password_change') = 'false' with reconfigure

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 06, 2015 at 01:19 AM

    Hello Shridhar,

    The syntax error is caused by single quotation matching ( ' before hdbsql matchs ' before indexserver.ini, but you do not want to see that...)

    Can you use an alternative way if you want to do it in one step:

    Firstly, put the followings into a executable file:

    hdbsql -i ## -n hostname -u SYSTEM -p password "ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini','System') SET ('password policy','force_first_password_change') = 'false' with reconfigure"

    Secondly, execute su - sidadm -c file_name

    Regards,

    Ning


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Colleagues,

      Thanks for the assistance so far.

      We happen to get the following error too:

      su - <sid>adm -c 'hdbsql -U SYSTEM export "'A'"."'*'" as binary into "'Export location'" with replace'

      * 257: sql syntax error: incorrect syntax near "*": line 1 col 16 (at pos 16) SQLSTATE: HY000

      su - <sid>adm -c 'hdbsql -U SYSTEM export "'A'".'"*"' as binary into "'Export location'" with replace'

      hdbsql: No match.

      I am confused now, Is the second statement correct or wrong.

      Can any of you confirm this.

      Thanks and Regards,

      Akhil

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.