Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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@!"


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.

share|improve this question

migrated from Nov 11 '11 at 5:46

This question came from our site for professional and enthusiast programmers.

For the command line, you can try single quotes

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

No solution for the GUI tools

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.