Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Nov 11 '11 at 5:46

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

add comment

1 Answer

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
add comment

Your Answer

 
discard

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.