Thursday, May 26, 2022

[SOLVED] CLPPLUS login failing

Issue

I am trying to login to remote DB2 using clpplus but can't login as password contains @.

clpplus -nw user/p@[email protected]:60000/Dbname

but it fails saying:


[jcc][t4][10380][11951][4.27.25] Required property "[email protected]" is
unknown host. ERRORCODE=-4222, SQLSTATE=08001

Is there any work around of it?


Solution

With the bash shell, enclose the password with \' and additionally escape the @ with \@ (and the same for any special character inside the password, i.e. escape it with \ ).

This example works for me:

clpplus -nw user/\'p\@zzword\'@myhostname:50002/sample


Answered By - mao
Answer Checked By - Pedro (WPSolving Volunteer)