Tuesday, August 2, 2016

-8006 : Resource error in SAP Business One

Suddenly I received with (-8006) from the DI API. This was my request sent and the response received.

Request :
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<?xml version=\"1.0\" encoding=\"UTF-16\"?>
<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\">
  <env:Body>
    <dis:Login xmlns:dis=\"http://www.sap.com/SBO/DIS\">
      <DatabaseServer>xxxx</DatabaseServer>
      <DatabaseName>SBODEMOUS</DatabaseName>
      <DatabaseType>dst_MSSQL2012</DatabaseType>
      <DatabaseUsername>xx</DatabaseUsername>
      <DatabasePassword>xxxxxxx</DatabasePassword>
      <CompanyUsername>manager</CompanyUsername>
      <CompanyPassword>manager</CompanyPassword>
      <Language>ln_English</Language>
      <LicenseServer>xxxxx</LicenseServer>
    </dis:Login>
  </env:Body>
</env:Envelope>

Response :
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
  <?xml version="1.0" ?> 
 <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
 <env:Body>
 <env:Fault>
 <env:Code>
  <env:Value>env:Receiver</env:Value> 
 <env:Subcode>
  <env:Value>-8006</env:Value> 
  </env:Subcode>
  </env:Code>
 <env:Reason>
  <env:Text xml:lang="en">Resource error</env:Text> 
  </env:Reason>
 <env:Detail>
  <Command>Login</Command> 
  </env:Detail>
  </env:Fault>
  </env:Body>
  </env:Envelope>

When I look for a solution in SAP community, Many experts have advised to remove the  SM_OBS_DLL folder from the temporary folder, stop the SBO DI Server from SAP Business One Service Manager and then reinstall the DI API. 

I did the first step of removing the SM_OBS_DLL  folder from my %temp% path. Then I restarted my workstation and checked whether all my services are running normally or not. Especially the SQL server instance. The real reason was my SQL server service had not been started with the startup. So the DI server cannot access the database.

So I prepared a batch file to start/stop the SQL and SAP-related services, which might also rescue you in such situations.

Stop Services.bat : 
net stop MSSQLSERVER
net stop TAO_NT_Naming_Service
net stop SLD
net stop B1LicenseService
net stop SBODI_Server
net stop SBOWFDataAccess
net stop SBOWorkflowEngine
@PAUSE


Start Services.bat :
net start MSSQLSERVER
net start TAO_NT_Naming_Service
net start SLD
net start B1LicenseService
net start SBODI_Server
net start SBOWFDataAccess
net start SBOWorkflowEngine
@PAUSE

1 comment: