Problem:
When the "Remember this" logon option is set, compiling DB2 programs will no longer present the logon dialog. How to get the logon dialog to show up again? This would be necessary to use a different user id and password
Resolution:
The following can be found from the DB2 documentations:
________________________________________
Compiling Programs that use a Remote DB2 Server
To compile a program that uses a remote DB2 server, you must first connect to that remote server. The DB2 ECM first attempts to connect to the database using the default values for the client workstation you logged on with. If the logon fails, the DB2 ECM will invoke the Micro Focus SQL Logon dialog in which you can then enter a logon ID and password for the database you are trying to compile your program against
Automated Compiles
Having the graphical logon dialog appear might not be acceptable for automating compiles from a background process such as a command file. There is a way to supply the logon information by setting an environment variable and pointing the variable at a text file that contains the logon ID and password. To do this, set the environment variable SQLPASS.TXT to the name of the text file that contains the logon ID and password. For example:
SET SQLPASS.TXT=D:\\BATCH.TXT
Then in the file batch.txt, specify the logon ID and password in the format id.password. For example:
MyId.Mypassword
If the security system used to validate your logon ID and password is case sensitive, you need to specify id.password in the correct case in this text file.
Note: Specifying the logon and password in a text file does raise security concerns, so care should be used when implementing this facility
________________________________________
Based on the above information, setting SQLPASS.TXT environment variable with bogus user id and password would cause the logon to fail. As results, the MF SQL Logon dialog will be invoked, and it would be then possible to supply a different user id and password AND possibly uncheck the "Remember this" option.
Note: Do not forget to remove the SQLPASS.TXT environment variable afterwards.



