Friday, March 9, 2012

Error 0x800c0005 when calling Microsoft.XMLHTTP from inside SQLSer

0x800c0005 = Error 5 = Access Denied.
What has changed on the server?
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"SammyBar" wrote:

> Hi all,
> We have a sp that sends http requests. It uses Microsoft XMLHTTP component
> that is part of XML pack that is standard with SQL Server 2000 SP3. For an
> unknown reason the XMLHTTP component started to fail raising the error:
> OLE Automation Error Information
> HRESULT: 0x800c0005
> I've seen this error in Visual Basic 6 when trying to create a component
> that is not well installed. But here this error is raised when creating th
e
> object but when sending the request:
> Exec @.nError = sp_OACreate 'Microsoft.XMLHTTP', @.iReq OUT
> If @.nError != 0
> Begin
> Select @.nError = Null
> Raiserror('sp_OACreate Microsoft.XMLHTTP FAILED! [sp_send_http]', 16, -1)
> Goto Fin
> End
> Exec @.nError = sp_OAMethod @.iReq, 'Open', NULL, 'POST', @.sUrl, false,
> @.sUser, @.sPassword
> If @.nError != 0
> Begin
> Raiserror('sp_OAMethod Open FAILED! [sp_send_http]', 16, -1)
> Goto Fin
> End
> Exec @.nError = sp_OAMethod @.iReq, 'send'
> If @.nError != 0
> Begin
> Raiserror('sp_OAMethod Send FAILED! [sp_send_http]', 16, -1)
> Goto Fin
> End
> then it goes well through sp_OACreate and sp_OAMethod "Open" calls.
> I reregister msxml.dll, msxml2.dll, msxml2.dll, and restarted the server b
ut
> it was useless.
> Looking around on the server logs the only suspected entry I've found was:
> SqlDumpExceptionHandler: Process 397 generated fatal exception c0000005
> EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process..
> * ---
--
> * Short Stack Dump
> * 09C73F85 Module(UNKNOWN+00000000)
> * 0066A220 Module(sqlservr+0026A220) (MSXMLThreadDetach+0000003D)
> * 00505DF1 Module(sqlservr+00105DF1) (clean_process+000000C6)
> * 0050611D Module(sqlservr+0010611D) (kill_proc+000000EE)
> * 00506513 Module(sqlservr+00106513) (logout+000001AC)
> * 005063D8 Module(sqlservr+001063D8) (release_srvproc+00000045)
> * 004270F9 Module(sqlservr+000270F9) (process_commands+000002A2)
> * 41075002 Module(UMS+00005002) (ProcessWorkRequests+00000272)
> * 41074698 Module(UMS+00004698) (ThreadStartRoutine+00000098)
> * 7800C9EB Module(MSVCRT+0000C9EB) (beginthread+000000CE)
> * 77E8B2D8 Module(KERNEL32+0000B2D8) (lstrcmpiW+000000B7)
> * ---
--
> It looks like after that the XMLHTTP doesn't works.
> Then my problem is to restore the XMLHTTP component to normal state. It ru
ns
> on a production server so the rules here are very strict. We cannot instal
l
> any new package there. So just reinstalling the xml package is the least
> desirable solution. I'd prefer just reregister the proper dlls but it look
s
> like reregistering msxml?.dll is not enought.
> What should I do?
> Should I register any other dll associated to msxml?.dll
> Any idea is welcomed
> Thanks in advance
> Sammy
>
>> 0x800c0005 = Error 5 = Access Denied.
!!!
Where did you find error codes?

> What has changed on the server?
Nothing. It is in the production server and it is forbidden to change
anything..., even security patches...|||> Where did you find error codes?
From an OS command prompt:
NET HELPMSG 5
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"SammyBar" <sammybar@.gmail.com> wrote in message news:%23ZP6ykskFHA.3144@.TK2MSFTNGP12.phx.g
bl...
> !!!
> Where did you find error codes?
>
> Nothing. It is in the production server and it is forbidden to change
> anything..., even security patches...
>|||Hi
It is the standard COM error. After seeing the same ones for 10 years, you
generally get to know them.
You can strip the last 4 characters, and use them as Tibor Karaszi noted in
his post.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"SammyBar" <sammybar@.gmail.com> wrote in message
news:%23ZP6ykskFHA.3144@.TK2MSFTNGP12.phx.gbl...
> !!!
> Where did you find error codes?
>
> Nothing. It is in the production server and it is forbidden to change
> anything..., even security patches...
>|||> What has changed on the server?
Ok, I found the error. Somebody activated a second NIC on the server and
that mangled the network routes. The server that was being requested was not
available by pinging. That is way the error was raising on the "send"
method.
Thanks you all for the hints
Best regards
Sammy

No comments:

Post a Comment