Troubleshooting
Problem
SQL0902 error is returned when ODBC and DB2.NET connections are in the same process in a 64 bit server. [IBM][DB2.NET] SQL0902 An unexpected exception has occurred in Process. Attempted to read or write protected memory. SQLSTATE=58005
Symptom
In the DB2 trace,
3231 data DB2 UDB .NET data provider DB2Error.DB2Error fnc (3.3.84.148.0.10)
pid 1288 tid 11924 cpid 49566 node 0 sec 22 nsec 406728788 probe 10
bytes 2705
Data1 (PD_TYPE_DEFAULT,2697) Hexdump:
5B49 424D 5D5B 4442 322E 4E45 545D 2053 [IBM][DB2.NET] S
514C 3039 3032 2041 6E20 756E 6578 7065 QL0902 An unexpe
6374 6564 2065 7863 6570 7469 6F6E 2068 cted exception h
6173 206F 6363 7572 7265 6420 696E 2020 as occurred in
5072 6F63 6573 733A 2031 3238 3820 5468 Process: 1288 Th
7265 6164 2037 2041 7070 446F 6D61 696E read 7 AppDomain
3A20 4E61 6D65 3A2F 4C4D 2F57 3353 5643 : Name:/LM/W3SVC
2F31 2F52 4F4F 542F 4D46 322D 362D 3132 /1/ROOT/MF2-6-12
3936 3535 3232 3738 3738 3536 3536 3431 9655227878565641
0D0A 5468 6572 6520 6172 6520 6E6F 2063 ..There are no c
6F6E 7465 7874 2070 6F6C 6963 6965 732E ontext policies.
0D0A 2046 756E 6374 696F 6E3A 2053 514C .. Function: SQL
4578 6563 4469 7265 6374 4144 4F4E 4554 ExecDirectADONET
2045 7865 6375 7465 4E6F 6E51 7565 7279 ExecuteNonQuery
4F62 6A65 6374 0A20 4361 6C6C 5374 6163 Object. CallStac
6B3A 2020 2020 6174 2053 7973 7465 6D2E k: at System.
456E 7669 726F 6E6D 656E 742E 6765 745F Environment.get_
5374 6163 6B54 7261 6365 2829 0D0A 2020 StackTrace()..
2061 7420 4942 4D2E 4461 7461 2E44 4232 at IBM.Data.DB2
2E44 4232 436F 6E6E 506F 6F6C 2E48 616E .DB2ConnPool.Han
646C 6555 6E6B 6E6F 776E 4572 726F 7273 dleUnknownErrors
2853 7472 696E 6720 7374 7246 6E63 4D73 (String strFncMs
672C 2045 7863 6570 7469 6F6E 2065 7863 g, Exception exc
6570 7469 6F6E 2C20 426F 6F6C 6561 6E20 eption, Boolean
6254 6872 6F77 290D 0A20 2020 6174 2049 bThrow).. at I
424D 2E44 6174 612E 4442 322E 4442 3243 BM.Data.DB2.DB2C
6F6D 6D61 6E64 2E61 2842 6F6F 6C65 616E ommand.a(Boolean
2041 5F30 290D 0A20 2020 6174 2049 424D A_0).. at IBM
2E44 6174 612E 4442 322E 4442 3243 6F6D .Data.DB2.DB2Com
6D61 6E64 2E67 2829 0D0A 2020 2061 7420 mand.g().. at
4942 4D2E 4461 7461 2E44 4232 2E44 4232 IBM.Data.DB2.DB2
436F 6D6D 616E 642E 4578 6563 7574 654E Command.ExecuteN
6F6E 5175 6572 7928 290D 0A20 2020 6174 onQuery().. at
205F 4465 6661 756C 742E 5265 6672 6573 _Default.Refres
6847 7269 645F 4442 3228 2920 696E 2043 hGrid_DB2() in C
3A5C 5765 6241 7070 735C 5765 6253 6974 :\WebApps\WebSit
654D 465C 4465 6661 756C 742E 6173 7078 eMF\Default.aspx
2E76 623A 6C69 6E65 2031 3639 0D0A 2020 .vb:line 169..
2061 7420 5F44 6566 6175 6C74 2E42 7574 at _Default.But
746F 6E31 5F43 6C69 636B 284F 626A 6563 ton1_Click(Objec
7420 7365 6E64 6572 2C20 4576 656E 7441 t sender, EventA
7267 7320 6529 2069 6E20 433A 5C57 6562 rgs e) in C:\Web
4170 7073 5C57 6562 5369 7465 4D46 5C44 Apps\WebSiteMF\D
6566 6175 6C74 2E61 7370 782E 7662 3A6C efault.aspx.vb:l
696E 6520 3133 0D0A 2020 2061 7420 5379 ine 13.. at Sy
7374 656D 2E57 6562 2E55 492E 5765 6243 stem.Web.UI.WebC
6F6E 7472 6F6C 732E 4275 7474 6F6E 2E4F ontrols.Button.O
6E43 6C69 636B 2845 7665 6E74 4172 6773 nClick(EventArgs
2065 290D 0A20 2020 6174 2053 7973 7465 e).. at Syste
6D2E 5765 622E 5549 2E57 6562 436F 6E74 m.Web.UI.WebCont
726F 6C73 2E42 7574 746F 6E2E 5261 6973 rols.Button.Rais
6550 6F73 7442 6163 6B45 7665 6E74 2853 ePostBackEvent(S
7472 696E 6720 6576 656E 7441 7267 756D tring eventArgum
656E 7429 0D0A 2020 2061 7420 5379 7374 ent).. at Syst
656D 2E57 6562 2E55 492E 5061 6765 2E52 em.Web.UI.Page.R
6169 7365 506F 7374 4261 636B 4576 656E aisePostBackEven
7428 4950 6F73 7442 6163 6B45 7665 6E74 t(IPostBackEvent
4861 6E64 6C65 7220 736F 7572 6365 436F Handler sourceCo
6E74 726F 6C2C 2053 7472 696E 6720 6576 ntrol, String ev
656E 7441 7267 756D 656E 7429 0D0A 2020 entArgument)..
2061 7420 5379 7374 656D 2E57 6562 2E55 at System.Web.U
492E 5061 6765 2E50 726F 6365 7373 5265 I.Page.ProcessRe
7175 6573 744D 6169 6E28 426F 6F6C 6561 questMain(Boolea
6E20 696E 636C 7564 6553 7461 6765 7342 n includeStagesB
6566 6F72 6541 7379 6E63 506F 696E 742C eforeAsyncPoint,
2042 6F6F 6C65 616E 2069 6E63 6C75 6465 Boolean include
5374 6167 6573 4166 7465 7241 7379 6E63 StagesAfterAsync
506F 696E 7429 0D0A 2020 2061 7420 5379 Point).. at Sy
7374 656D 2E57 6562 2E55 492E 5061 6765 stem.Web.UI.Page
2E50 726F 6365 7373 5265 7175 6573 7428 .ProcessRequest(
426F 6F6C 6561 6E20 696E 636C 7564 6553 Boolean includeS
7461 6765 7342 6566 6F72 6541 7379 6E63 tagesBeforeAsync
506F 696E 742C 2042 6F6F 6C65 616E 2069 Point, Boolean i
6E63 6C75 6465 5374 6167 6573 4166 7465 ncludeStagesAfte
7241 7379 6E63 506F 696E 7429 0D0A 2020 rAsyncPoint)..
2061 7420 5379 7374 656D 2E57 6562 2E55 at System.Web.U
492E 5061 6765 2E50 726F 6365 7373 5265 I.Page.ProcessRe
7175 6573 7428 290D 0A20 2020 6174 2053 quest().. at S
7973 7465 6D2E 5765 622E 5549 2E50 6167 ystem.Web.UI.Pag
652E 5072 6F63 6573 7352 6571 7565 7374 e.ProcessRequest
2848 7474 7043 6F6E 7465 7874 2063 6F6E (HttpContext con
7465 7874 290D 0A20 2020 6174 2041 5350 text).. at ASP
2E64 6566 6175 6C74 5F61 7370 782E 5072 .default_aspx.Pr
6F63 6573 7352 6571 7565 7374 2848 7474 ocessRequest(Htt
7043 6F6E 7465 7874 2063 6F6E 7465 7874 pContext context
290D 0A20 2020 6174 2053 7973 7465 6D2E ).. at System.
5765 622E 4874 7470 4170 706C 6963 6174 Web.HttpApplicat
696F 6E2E 4361 6C6C 4861 6E64 6C65 7245 ion.CallHandlerE
7865 6375 7469 6F6E 5374 6570 2E53 7973 xecutionStep.Sys
7465 6D2E 5765 622E 4874 7470 4170 706C tem.Web.HttpAppl
6963 6174 696F 6E2E 4945 7865 6375 7469 ication.IExecuti
6F6E 5374 6570 2E45 7865 6375 7465 2829 onStep.Execute()
0D0A 2020 2061 7420 5379 7374 656D 2E57 .. at System.W
6562 2E48 7474 7041 7070 6C69 6361 7469 eb.HttpApplicati
6F6E 2E45 7865 6375 7465 5374 6570 2849 on.ExecuteStep(I
4578 6563 7574 696F 6E53 7465 7020 7374 ExecutionStep st
6570 2C20 426F 6F6C 6561 6E26 2063 6F6D ep, Boolean& com
706C 6574 6564 5379 6E63 6872 6F6E 6F75 pletedSynchronou
736C 7929 0D0A 2020 2061 7420 5379 7374 sly).. at Syst
656D 2E57 6562 2E48 7474 7041 7070 6C69 em.Web.HttpAppli
6361 7469 6F6E 2E50 6970 656C 696E 6553 cation.PipelineS
7465 704D 616E 6167 6572 2E52 6573 756D tepManager.Resum
6553 7465 7073 2845 7863 6570 7469 6F6E eSteps(Exception
2065 7272 6F72 290D 0A20 2020 6174 2053 error).. at S
7973 7465 6D2E 5765 622E 4874 7470 4170 ystem.Web.HttpAp
706C 6963 6174 696F 6E2E 4265 6769 6E50 plication.BeginP
726F 6365 7373 5265 7175 6573 744E 6F74 rocessRequestNot
6966 6963 6174 696F 6E28 4874 7470 436F ification(HttpCo
6E74 6578 7420 636F 6E74 6578 742C 2041 ntext context, A
7379 6E63 4361 6C6C 6261 636B 2063 6229 syncCallback cb)
0D0A 2020 2061 7420 5379 7374 656D 2E57 .. at System.W
6562 2E48 7474 7052 756E 7469 6D65 2E50 eb.HttpRuntime.P
726F 6365 7373 5265 7175 6573 744E 6F74 rocessRequestNot
6966 6963 6174 696F 6E50 7269 7661 7465 ificationPrivate
2849 4953 3757 6F72 6B65 7252 6571 7565 (IIS7WorkerReque
7374 2077 722C 2048 7474 7043 6F6E 7465 st wr, HttpConte
7874 2063 6F6E 7465 7874 290D 0A20 2020 xt context)..
6174 2053 7973 7465 6D2E 5765 622E 486F at System.Web.Ho
7374 696E 672E 5069 7065 6C69 6E65 5275 sting.PipelineRu
6E74 696D 652E 5072 6F63 6573 7352 6571 ntime.ProcessReq
7565 7374 4E6F 7469 6669 6361 7469 6F6E uestNotification
4865 6C70 6572 2849 6E74 5074 7220 6D61 Helper(IntPtr ma
6E61 6765 6448 7474 7043 6F6E 7465 7874 nagedHttpContext
2C20 496E 7450 7472 206E 6174 6976 6552 , IntPtr nativeR
6571 7565 7374 436F 6E74 6578 742C 2049 equestContext, I
6E74 5074 7220 6D6F 6475 6C65 4461 7461 ntPtr moduleData
2C20 496E 7433 3220 666C 6167 7329 0D0A , Int32 flags)..
2020 2061 7420 5379 7374 656D 2E57 6562 at System.Web
2E48 6F73 7469 6E67 2E50 6970 656C 696E .Hosting.Pipelin
6552 756E 7469 6D65 2E50 726F 6365 7373 eRuntime.Process
5265 7175 6573 744E 6F74 6966 6963 6174 RequestNotificat
696F 6E28 496E 7450 7472 206D 616E 6167 ion(IntPtr manag
6564 4874 7470 436F 6E74 6578 742C 2049 edHttpContext, I
6E74 5074 7220 6E61 7469 7665 5265 7175 ntPtr nativeRequ
6573 7443 6F6E 7465 7874 2C20 496E 7450 estContext, IntP
7472 206D 6F64 756C 6544 6174 612C 2049 tr moduleData, I
6E74 3332 2066 6C61 6773 290D 0A20 2020 nt32 flags)..
6174 2053 7973 7465 6D2E 5765 622E 486F at System.Web.Ho
7374 696E 672E 5069 7065 6C69 6E65 5275 sting.PipelineRu
6E74 696D 652E 5072 6F63 6573 7352 6571 ntime.ProcessReq
7565 7374 4E6F 7469 6669 6361 7469 6F6E uestNotification
4865 6C70 6572 2849 6E74 5074 7220 6D61 Helper(IntPtr ma
6E61 6765 6448 7474 7043 6F6E 7465 7874 nagedHttpContext
2C20 496E 7450 7472 206E 6174 6976 6552 , IntPtr nativeR
6571 7565 7374 436F 6E74 6578 742C 2049 equestContext, I
6E74 5074 7220 6D6F 6475 6C65 4461 7461 ntPtr moduleData
2C20 496E 7433 3220 666C 6167 7329 0D0A , Int32 flags)..
2020 2061 7420 5379 7374 656D 2E57 6562 at System.Web
2E48 6F73 7469 6E67 2E50 6970 656C 696E .Hosting.Pipelin
6552 756E 7469 6D65 2E50 726F 6365 7373 eRuntime.Process
5265 7175 6573 744E 6F74 6966 6963 6174 RequestNotificat
696F 6E28 496E 7450 7472 206D 616E 6167 ion(IntPtr manag
6564 4874 7470 436F 6E74 6578 742C 2049 edHttpContext, I
6E74 5074 7220 6E61 7469 7665 5265 7175 ntPtr nativeRequ
6573 7443 6F6E 7465 7874 2C20 496E 7450 estContext, IntP
7472 206D 6F64 756C 6544 6174 612C 2049 tr moduleData, I
6E74 3332 2066 6C61 6773 2920 496E 6E65 nt32 flags) Inne
7245 7863 6570 7469 6F6E 204D 6573 7361 rException Messa
6765 3A20 4174 7465 6D70 7465 6420 746F ge: Attempted to
2072 6561 6420 6F72 2077 7269 7465 2070 read or write p
726F 7465 6374 6564 206D 656D 6F72 792E rotected memory.
2054 6869 7320 6973 206F 6674 656E 2061 This is often a
6E20 696E 6469 6361 7469 6F6E 2074 6861 n indication tha
7420 6F74 6865 7220 6D65 6D6F 7279 2069 t other memory i
7320 636F 7272 7570 742E 2043 6865 636B s corrupt. Check
2049 6E6E 6572 4578 6365 7074 696F 6E20 InnerException
7072 6F70 6572 7479 2066 6F72 206D 6F72 property for mor
6520 6465 7461 696C 2E20 2053 514C 5354 e detail. SQLST
4154 453D 3538 3030 35 ATE5=8005
[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Programming Interface - ODBC","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.7;9.5","Edition":"Enterprise Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Log InLog in to view more of this document
This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.
Was this topic helpful?
Document Information
Modified date:
30 April 2025
UID
swg21572954