Search code examples
linuxterminaldb2redhatclpplus

CLPPLUS login failing


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

clpplus -nw user/p@sswd@145.xx.xx.212:60000/Dbname

but it fails saying:


[jcc][t4][10380][11951][4.27.25] Required property "sswd@145.xx.xx.212" 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