1

I am facing a problem to use the DB2 tools when using generic account with a generated password which ends with the Bang sign '!' to connect to DB2 database. I am not allowed to change the password because it is already used by other processes.

I know the user is valid and I can connect to the database with its credentials, but not from all db2 tools.

When using the Control Center it is okay. When using the Command Editor (GUI) or the Command Windows, I got this error message:

connect to WAREHOUS user administrator using       !
SQL0104N  An unexpected token "!" was found following "<identifier>".  
Expected tokens may include:  "NEW".  SQLSTATE=42601

Let's say that my password is: pass@! I am trying to use

c:\>db2 connect to sample user administrator using "pass@!"

or

c:\>db2 connect to sample user administrator using pass@!

And it both cases I got the same error message.

I could change the way I connect but it is not useful for me, for example:

c:\>db2 connect to sample user administrator
Enter current password for administrator:

But I cannot use it from a batch file easily.

I would like to know how can I connect from the Command Editor, in order to use this user from the Graphical Tools.

BTW, I know that the Control Center is deprecated.

1
  • I would recommend that you use this opportunity to document what the various other processes are that are using this password, and to separate them to using their own credentials (characters confined to a-z, A-Z, 0-9), to avoid the lock-in problem in the future. Sep 25, 2019 at 16:02

2 Answers 2

0

For the command line, you can try single quotes

c:\>db2 connect to sample user administrator using 'pass@!'

No solution for the GUI tools

0

I am not allowed to change the password ...

I suspect that's exactly what you're going to end up doing.

... because it is already used by other processes.

There absolutely has to be a process for changing this password.

If the account/password were compromised (and the more places you store it, the more likely that is to happen) then you would have no choice but to change it. That process might well be painful, but if it doesn't exist, you're potentially looking at a huge (and costly) Data Breach.

I presume your use of DB2 is relatively new, or you would have hit this problem sooner.
If you're going to use the same account/password "everywhere", then you're stuck having to conform to the "Lowest Common Denominator" of password complexity rules - the best you can do that works everywhere. Clearly Bang signs don't meet this and so you can't use them.

Is there any option to use a different account/password for this, particular, process and leave the others unchanged? If not, you're back to Option #1 - change it everywhere.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .