cancel
Showing results for 
Search instead for 
Did you mean: 

hdbsql - syntax error

former_member265210
Active Participant
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182967
Active Contributor
0 Kudos

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


Former Member
0 Kudos

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

Former Member
0 Kudos

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