Wednesday, December 16, 2009

Think Out of the Big Box

A bank customer of us was requesting helps to solve a sudden problem dealing with their IBM DWE server. Apparently from certain date onwards, all the processes executed within the DWE console were failed as shown in the following figure:



Interesting because there are few applications running in DWE and some of them already run for more then 2 years without any problems and now all of them failed at once?

Looking at the logs, obviously db2cmd.exe is throwing out a return code of 5 with exception code SQL1042C which means:



And oh shit, what the hell is the meaning of return code 5?

Tried to google, lookup IBM forums, contacted IBM Support and no one can tell me the definition of code 5?

The real fun is almost all other DB2/DWE components are running fine. db2cc, db2hc, db2start, db2stop, db2licm and many others I tried works. It seems like db2cmd.exe being cursed.

I did many other novel investigations. To name a few:

1. Rule out Windows environment variables
- Open up an instance of command prompt, clear off every environment variable.
- Run db2cmd.exe, still failed with the same error message.

2. Rule out Windows registry
- Open up regedit, throw away \HKEY_LOCAL_MACHINE\SOFTWARE\IBM and one under Current User(Of course, you backup it first)
- Run db2cmd.exe, still failed with the same error message.

3. Rule out corrupted files #1
- Copy db2cmd.exe and all the necessary dll files from my machine into the server.
- Open up command prompt, and point every thing to my new db2cmd.exe folder
- Run db2cmd.exe, still failed with the same error message.

4. Rule out corrupted files #2
- Reinstall DB2 Admin Client (Same FP)
- Run db2cmd.exe, still failed with the same error message.

5. Rule out corrupted files #3
- Reinstall DB2 everything (Latest FP)
- Run db2cmd.exe, still failed with the same error message.

6. Trace through AD GPO/Windows stuffs
- Use gpmc.msc, gpresult, gpedit.msc and many windows tools
- Trace into event viewers
- Look for suspicious items. Nothing found

7. Diagnosing DB2 #1
- Set DB2TEMPDIR to non-existing folder/folder where current user don't have security right to access/write
- db2cmd.exe normally will throw DB2CMD.EXE -> 0, Access denied message.
- Nope, still DB2CMD.EXE -> 5

8. Diagnosing DB2 #2
- Put DIAGLEVEL to 4, restart db2, run db2cmd.exe
- Nothing useful in db2diag.log

9. Diagnosing DB2 #3
- Use db2trc, turn it on, run db2cmd.exe, turn it off.
- Nothing useful.

10. Diagnosing DB2 #4
- Execute db2setcp and db2clpsetcp independently with success.

11. Diagnosing DB2 #5
- Fooling around using db2set, removing settings, changing value to bogus one and adding things.
- Still Error code 5 with db2cmd.exe

12. Finding what the heck is error code 5
- Open db2cmd.exe with notepad, look for any potential hints. Found a list of API used. Cross check API name with return code 5 using Google.
- Seems like return code 5 is usually associated with Access Denied error.

13. Finale
Google again "db2cmd.exe -> 5" +SQL1042C. Found one related post in a china forum. Apparently the fella who faces the problem is a student who was trying out DB2 for some homeworks or so. No solution from the post either.

Very interesting... What is the connection or similarity between a student machine in china and a production level server machine in Malaysia? Indeed, I found the answer to this question and yes, it solved the problem!

Any idea? :D



Top Blogs

40 comments:

瘋狂的 said...
This comment has been removed by a blog administrator.
開心唷 said...
This comment has been removed by a blog administrator.
志竹 said...
This comment has been removed by a blog administrator.
憲妤憲妤 said...
This comment has been removed by a blog administrator.
佩璇佩璇 said...
This comment has been removed by a blog administrator.
楊怡均 said...
This comment has been removed by a blog administrator.
少菁 said...
This comment has been removed by a blog administrator.
Ko212ryS_Dahle0 said...
This comment has been removed by a blog administrator.
BurtonClary031 said...
This comment has been removed by a blog administrator.
CrystlePiper8455 said...
This comment has been removed by a blog administrator.
明NathanA_Schulle said...
This comment has been removed by a blog administrator.
Avri221lE_Pryce1 said...
This comment has been removed by a blog administrator.
佳琪佳琪 said...
This comment has been removed by a blog administrator.
韋成 said...
This comment has been removed by a blog administrator.
佩GailBohanan1蓉 said...
This comment has been removed by a blog administrator.
estherme said...
This comment has been removed by a blog administrator.
雲亨 said...
This comment has been removed by a blog administrator.
劉淑芬 said...
This comment has been removed by a blog administrator.
陳隆 said...
This comment has been removed by a blog administrator.
銘木 said...
This comment has been removed by a blog administrator.
玫友 said...
This comment has been removed by a blog administrator.
建霖建霖 said...
This comment has been removed by a blog administrator.
吳婷婷 said...
This comment has been removed by a blog administrator.
童雅 said...
This comment has been removed by a blog administrator.
香昱信張君林 said...
This comment has been removed by a blog administrator.
懿綺懿綺 said...
This comment has been removed by a blog administrator.
芸茂芸茂 said...
This comment has been removed by a blog administrator.
方偉白方偉白 said...
This comment has been removed by a blog administrator.
淑娟淑娟淑娟 said...
This comment has been removed by a blog administrator.
童祖如童祖如 said...
This comment has been removed by a blog administrator.
正洪玲正洪玲正洪玲 said...
This comment has been removed by a blog administrator.
陳梁雅雯宗翰 said...
This comment has been removed by a blog administrator.
淑倫惟芳 said...
This comment has been removed by a blog administrator.
王辛江淑萍康 said...
This comment has been removed by a blog administrator.
家唐銘 said...
This comment has been removed by a blog administrator.
瑞陳彥 said...
This comment has been removed by a blog administrator.
翊翊翊翊張瑜翊翊翊 said...
This comment has been removed by a blog administrator.
恩宛玲如 said...
This comment has been removed by a blog administrator.
佳張張張張燕張張張張張 said...
This comment has been removed by a blog administrator.
瑞蕾 said...
This comment has been removed by a blog administrator.