[Problem] About : Dbc Retrieve Data in MultiThread

Hello,
Our BDB version is 4.0.14 and 4.2.52.
We create our JNI by using BDB C++ API. Under multi-processor,
multithread environment, we do the following operations in the
same Java process:
Db->open()
Dbc->get()
Dbc->put()
Db->close()
After running for 2 hours, when we try to retrieve the data
by using Dbc->get(), it returns error code [DB_NOTFOUND].
In the meantime, another process calls Db->open() and Dbc->get()
and works correctly, without returning any error code.
Would you please tell us how to solve this problem.
Thank you very much.

HI,
Db->open()
Dbc->get()
Dbc->put()
Db->close()
After running for 2 hours, when we try to retrieve the data
by using Dbc->get(), it returns error code [DB_NOTFOUND].
In the meantime, another process calls Db->open() and Dbc->get()
and works correctly, without returning any error codeYou didn't explicitly mention using a Berkeley DB environment which is required for multi-threaded and/or multi-process access.
When you use an environment, resources such as the in-memory cache and locks can be shared by all of the databases opened in the environment. The environment allows you to enable subsystems that are designed to allow multiple threads and/or processes to access DB databases. For example, you use an environment to enable the concurrent data store (CDS), the locking subsystem, and/or the shared memory buffer pool.
http://www.sleepycat.com/docs/gsg/JAVA/environments.html
Ron

Similar Messages

  • Problems trying to retrieve data from R/3 using Java - RecordSetWrapper

    Hello everyone!
    I am having problems retrieveing a result from r/3 using Connector Framework API. An ABAP consultant has created a ABAP program which returns an employee based on his or her personal number as an input.
    <b>When i run the AbstractPortalComponent i get the following:
    <u>RS2: com.sapportals.connectors.SAPCFConnector.execution.structures.RecordSetWrapper@24648563</u></b>
    My code is as follows:
    package com.sap.test;
    import java.util.ArrayList;
    import java.util.Iterator;
    import javax.resource.cci.MappedRecord;
    import javax.resource.cci.RecordFactory;
    import com.sap.security.api.IUser;
    import com.sapportals.connector.connection.IConnection;
    import com.sapportals.connector.execution.functions.IInteraction;
    import com.sapportals.connector.execution.functions.IInteractionSpec;
    import com.sapportals.connector.execution.structures.IRecordSet;
    import com.sapportals.connector.execution.structures.IStructureFactory;
    import com.sapportals.connector.metadata.functions.IFunction;
    import com.sapportals.portal.ivs.cg.ConnectionProperties;
    import com.sapportals.portal.ivs.cg.IConnectorGatewayService;
    import com.sapportals.portal.ivs.cg.IConnectorService;
    import com.sapportals.portal.prt.component.*;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    public class Search extends AbstractPortalComponent{
         String sapSystem = "*****";
         public void doContent(IPortalComponentRequest request, IPortalComponentResponse response){
              IConnection con = null;
              ConnectionProperties conprop = null;
              ConnectionProperties cp = null;
              try{
                   Object connectorService = PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
                   IConnectorGatewayService cgService = (IConnectorGatewayService) connectorService;
                   cp = new ConnectionProperties(request.getLocale(),request.getUser());
                   if(cgService == null){
                        response.write("Error in getting Connector Gateway Service <br>");
                   try{
                        con = cgService.getConnection(sapSystem, cp);
                        IInteraction ix = con.createInteractionEx();
                        IInteractionSpec ixSpec = ix.getInteractionSpec();
                        ixSpec.setPropertyValue("Name", "Test_RFC");
                        RecordFactory rf = ix.getRecordFactory();
                        MappedRecord importParams = rf.createMappedRecord("INPUT");
                        IFunction function = con.getFunctionsMetaData().getFunction("Test_RFC");
                        IStructureFactory structureFactory = ix.retrieveStructureFactory();
                        IRecordSet table = (IRecordSet) structureFactory.getStructure(function.getParameter("I_PA0002").getStructure());
                        importParams.put("PERNR", "123456");
                        MappedRecord output = (MappedRecord) ix.execute(ixSpec,importParams);
                        Object rs = null;
                        try{
                             Object result = output.get("I_PA0002");
                             if(result == null){
                                  rs = new String ("Error");
                                  response.write("RS1: " +rs+ "<BR>");
                             else
                                  if(result instanceof IRecordSet){
                                       rs = (IRecordSet) result;
                                       response.write("RS2: " +rs+ "<BR>");
                                  else{
                                       response.write("RS3: " +rs+ "<BR>");
                        catch(Exception e){
                             response.write("Error " + e.getMessage()+ "<BR>");
                   catch(Exception e){
                        response.write("Connection to SAP system failed <br>");
                   if(con == null){
                        response.write("Connection is null <br>");
                   else{
                        response.write("Connection succsesful<BR>");
              catch(Exception e){
                   response.write("Exception occured<BR>");
              try{
                   con.close();
                   response.write("Connection closed<br>");
              catch(Exception e){
                   response.write("Could NOT close connection<BR>");
    The result should be all data stored on the person which I search for, but instead i get the following result:
    <b>
    RS2: com.sapportals.connectors.SAPCFConnector.execution.structures.RecordSetWrapper@24648563</b>
    I am really stuck and do not know how to solve the problem. I appreciate any help or sample (or just some answers...)
    Thanks in Advance.
    Best Regards,
    Ola Aarthun

    Hi,
    From your code you are just displaying the object rs. You have to handle the display of each record the way you want it(as a table).
    You can find a sample code how to build a table from the result object at the following link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bfb1ba90-0201-0010-5e97-bd6a8f5022dc
    Regards,
    Padmaja

  • Question about reading hex data

    Hello! I am a Labview Novice and having a problem about reading hex data.
    Basically I am having bytes from the serial port like this: "80100E0E0AB4F646F24A00911267087E032080057FFF "
    It is not encoded in ASCII. What I want to do is to convert the hex to an ASCII hex string.
    so that the string would become hex numbers in ASCII.
    I think the following might be a solution, but I have no idea what the subvi is in the solution.
    http://forums.ni.com/t5/LabVIEW/Hex-String-to-Ascii-Hex-String/m-p/886078/highlight/true#M400462
    Thanks in advance and I appreciate your kind help!
    Solved!
    Go to Solution.

    coolmatthew wrote:
    What I want to do is actually this.
    You are using way too much code for all this. All you need is a concatenate strings, replacing your entire loop and such. Same result.
    (see also)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    HEXTwiddler.png ‏4 KB

  • Problem retrieving data from a JTable.

    Hi All,
    I've just searched to 45th page of this forum but I heven't found a topic containing infos that can help me.
    Well, my problem is: I have to retrieve data from a JTable. I use getValue() method but it seems to work well on all cells of a row but the last cell. I use the TAB to move focus on the row and when it is on the last cell, using TAB, the focus jumps on the next row & 1st column.
    Using TAB moving on system, I can retrieve all data but data on the last cell data.
    I add another info hoping someone has a solution for my problem: If the focus goes back on the last cell of a row just edited, in this case the data retrieving work as well.
    Thank you for your attention!
    Bye.

    I don't understand your question. I don't understand what using Tab and getValueAt(...) have to do with one another. If you want data from a cell then just use getValueAt(...).
    If you want to know what cell currently has focus you use
    getSelectedRow()
    getSelectedColumn()

  • "evdre encountered a problem retrieving data from the webserver"

    Hi
    We are using a big report which takes very long time to expand and sometimes we get the error message "evdre encountered a problem retrieving data from the webserver" when expanding the report, but not very often for most of our users. But we have one user who gets this error message almost every second time he expands the report. This user have a computer with same capacity as the rest of us, can there be some setting on the computer or in the client installtion the cause this problem?
    We are using BPC 5.1 SP 5
    /Fredrik

    Hi,
    This error occurs usually if we have huge data in combination of our dimensions.
    Even, if the selection of your memberset is not apt to the combination of the data present in the back end, you may encounter a data retrival error.
    regards
    sashank

  • Problem About Date Format in Dashboard

    Hi All:
    I still have problem about date format in dashboard and dashboard prompt. When I use cast(dealdate as date) in dashboard prompt(coloumn formula of deal_date) and filter view(In edit view of filter coloumn formula) Then It converts the date format from mm/dd/yyyy to yyyy-mm-dd But I want format in dd-mm-yyyy.
    ANd also one problem more that is when I use cast function in filter coloumn formula then how I give alias to it. Because it shows same like that cast(deal_date as date) on dashboard filter view.
    Pluzz help me to solve this problem
    Haroon

    Changing the ini files should change the date format. Have you amended the correct instances of the date format? In dbFeatures there is one for every ODBC connection.
    For example in my DBFeatures.INI
    [ DATA_SOURCE_FEATURE = ODBC_300 ]
    DATE_FORMAT = 'dd-mm-yyyy' ;
         TIME_FORMAT = 'hh:mi:ss' ;
         DATE_TIME_FORMAT = 'dd-mm-yyyy hh:mi:ss' ;
         IDENTIFIER_QUOTE_CHAR = '"';Also a file on the presentation side in OracleBI \web\Config called localedefinitions.xml.
    Inside that there appears to be defaults for localisations - maybe it is possible to amend your locale in the Administration settings of the dashboard.
    However, I haven't tried this sorry.

  • Problems with retrieving data from tables with 240 and more records

    Hi,
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.
    I installed Oracle 11.2.0 Client and I started to have problems with retrieving data from tables.
    First I used the same connection string, driver and so on (O10 Oracle 10g) then I tried ORA Oracle but with no luck. The result is like this:
    I'm able to connect to database. I'm able to retrieve data but from small tables (e.g. with 110 records it works perfectly using both O10 and ORA drivers). When I try to retrieve data from tables with like 240 and more records retrieval simply hangs (nothing happens at all - no error, no timeout). Application seems to hang forever.
    I'm using Powerbuilder to connect to Database (either PB10.5 using O10 driver or PB12 using ORA driver). I used DBTrace, so I see that query hangs on the first FETCH.
    So for the retrievals that hang I have something like:
    (3260008): BIND SELECT OUTPUT BUFFER (DataWindow):(DBI_SELBIND) (0.186 MS / 18978.709 MS)
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=1
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): EXECUTE:(DBI_DW_EXECUTE) (192.982 MS / 19171.691 MS)
    (3260008): FETCH NEXT:(DBI_FETCHNEXT)
    and this is the last line,
    while for retrievals that end, I have FETCH producing time, data in buffer and moving to the next Fetch until all data is retrieved
    On the side note, I have no problems with retrieving data either by SQL Developer or DbVisualizer.
    Problems started when I installed 11.2.0 Client. Even if I want to use 10.0.1 Client, the same problem occurs. So I guess something from 11.2.0 overrides 10.0.1 settings.
    I will appreciate any comments/hints/help.
    Thank you very much.

    pgoel wrote:
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.Earlier (before installing new stuff) did you ever try retrieving data from big tables (like 240 and more records), if yes, was it working?Yes, with Oracle 10g client (before installing 11g) I was able to retrieve any data, either it was 10k+ records or 100 records. Installing 11g client changed something that even using old 10g client (which I still have installed) fails to work. The same problem occur no matter I'm using 10g or 11g client now. Powerbuilder hangs on retrieving tables with more than like 240 records.
    Thanks.

  • Deduplication error: there was a problem retrieving data deduplication schedule

    Hi,
    After changing dedup schedule once we are receiving this error and not able to change it any more.
     there was a problem retrieving data deduplication schedule

    Hi,
    After changing dedup schedule once we are receiving this error and not able to change it any more.
     there was a problem retrieving data deduplication schedule
    Take a look @ PowerShell cmdlets for dedupe here:
    PowerShell dedupe cmdlets
    http://technet.microsoft.com/en-us/library/hh848450.aspx
    Of your interest are Remove-DedupeSchedule and New-DedupSchedule ones. Try removing set schedule
    you have now, making sure the status is "no jobs" and then create new schedule to see would it make the difference. 
    Good luck!
    StarWind VSAN [Virtual SAN] clusters Hyper-V without SAS, Fibre Channel, SMB 3.0 or iSCSI, uses Ethernet to mirror internally mounted SATA disks between hosts.

  • Problem in retrieve data  in COSS and COSP from PBS using FM /pbs/select_in

    hi all i have problem in retrieving data from COSP and COSS tables from PBS using FM /pbs/select_into_table in this FM i couldn't find the tables if any body knows pls reply back with the Archiving object to be use and parameters to be used.

    That are controlling tables-
    Have you installed PBS for Controlling ?
    try http://www.pbs-bensheim.de/
    A.

  • Have problem about grant assignment in Student Master Data

    have problem about grant assignment in Student Master Data
    i want to change grant detail in Student Master Data when i choose disbursement type to Pay Fixed Amount
    and then go to Grant Evaluation Run it have result
    But when i choose another disbursement type such as
    1. Pay Up To a Certain Percentge
    2. Pay Certain Percentage Up to a Certain Amount
    3. Pay Up to a Certain Amount
    and go to run Grant Evaluation it can run but not have result
    I need help T_T i don't know why i can't change or i miss something

    hello experts,
    Our problem is still not fixed, but we have contacted SAP to have a look at this problem. In the mean time we have created a new way to calculate the grants by doing no check at all, because our client don't want to have prerequisites yet.
    Therefor we made a custom function module from PMIQBP_GR_COND_EVALT_01. If the boolean ev_xok is true the system will calculate and post the grant amount.
    Good luck and I'll keep you posted.
    Kind regards,
    Steve de Klonia

  • EVDRE error "encountered problem when retrieving data from webserver"

    Hi,
    in a EVDRE we always get the error "encountered problem when retrieving data from webserver"
    When analysing this further we noticed this is always generated when a base member is selected in the CV and the expansion on the row for this dimension is has one of the following expansion settings:
    DEP
    ALL
    NOEXPAND
    if we select SELF, the error disappears again and the EVDRE works fine again ... is this normal behavior?
    there is no problem with application nor dimension.
    D
    solved it

    Note that the keyword "ALL" does not include the member itself. This may cause some confusion, but as Harish implies, when you select a base member it finds no matches if your memberset is "ALL".
    If you want to design a report to handle the user moving back and forth between base and non-base members in their CV, you either need to include SELF,ALL or SELF,DEP, or something similar....
    OR you need to get a little fancier, and use EVPRO to look and see if the CV member is base -- evpro(app,member,"CALC") -- and then use some conditional logic in Excel to choose the correct expansion options. If Calc=N, use Self, otherwise use SELF,DEP or whatever you choose. This can be a bit tricky if you then want the user to be able to drill down in the report (especially if you want the workbook option to insert add'l rows on the expansion, rather than replace), but it's all possible.

  • SP 2013 Designer Workflow problems retrieving data from Web Service

    Hi all,
    I am creating a SharePoint 2013 Designer Workflow, and I am having trouble retrieving data from a web service. The web service URL is
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers and the problem I am having is with the SharePoint Designer Workflow “Call HTTP Web Service” action URL. The URL I am
    having problems with is shown below:
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$format=json&$select=CustomerID,CompanyName,ContactName,ContactTitle,Address,City,PostalCode,Country,Phone,Fax
    or
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$select=CustomerID,CompanyName,ContactName,ContactTitle,Address,City,PostalCode,Country,Phone,Fax&$format=json
    The SharePoint 2013 Designer workflow works OK if I try to retrieve two items like "CompanyName" and "ContactName", but when I try to retrieve three or more items the workflow doesn’t work it just pauses
    with no error message. The URL that works OK is shown below:
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$format=json&$select=CompanyName,ContactName
    or
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$select=CompanyName,ContactName&$format=json
    Does anyone know why I cannot retrieve more than two items from a web server? Am I making a mistake with the URL?
    I hope you can
    Colin

    Hi Amit,
    According to your description, my understanding is that you want to approve workflow task using web service in SharePoint 2013.
    For troubleshooting this issue, please provide the more detailed code.
    Here are some similar posts, please check if they are useful:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/b999a417-dce3-4590-9173-89aea91f23a3/complete-workflow-after-approving-all-tasks?forum=sharepointdevelopment
    http://www.sharepointblog.in/2013/07/programmatically-approvereject-task-in.html
    http://aarebrot.net/blog/2011/10/how-sloppiness-and-spworkflowtask-altertask-could-inadvertantly-lock-your-workflow-task/
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Problem retrieving Data from a CDATA-Section using XMLDOM

    Hello,
    Ware: Oracle 8.1.7.4 64bit, XDK for PL/SQL Version 9.2.0.3, Solaris8 64bit
    I can't retrieve Data from the CDATA-Section of an XML-String, neither with
    getData(DOMCharacterData) or substringData. Also getLength fails. I get always
    the following error:
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassCastException
    ORA-06512: at "XML_SCHEMA.XMLCHARDATACOVER", line 0
    ORA-06512: at "XML_SCHEMA.XMLDOM", line 853
    ORA-06512: at "SCHWABE.XML_TEST", line 47
    ORA-06512: at line 1
    I can successfully cast the DOMNode to a CharacterData with makeCharacterData
    and check with isNull (DOMCharacterData) (returns FALSE).
    My Testcase:
    1) A Function which build a XML-Document:
    CREATE OR REPLACE FUNCTION XML_ResponseCalc RETURN VARCHAR2 IS
    doc VARCHAR2(32767);
    BEGIN
    doc :=
    '<?xml version="1.0" encoding="UTF-8"?>
    <RSDecEng>
    <Version>1.00</Version>
    <ResponseCalc>
    <ID>00000000000000000014</ID>
    <Burst>
    <Definition>
    <Count>1</Count>
    <ID>
    <Start>1</Start>
    <Length>4</Length>
    </ID>
    <Var>
    <Name>Risiko_1</Name>
    <Start>5</Start>
    <Length>5</Length>
    </Var>
    </Definition>
    <Data>
    <Length>9</Length>
    <Count>5</Count>
    <![CDATA[
    1 0.001
    2 0.002
    3 0.003
    4 0.004
    5 0.005
    6 0.006
    7 0.007
    8 0.008
    9 0.009
    10 0.010
    ]]>
    </Data>
    </Burst>
    </ResponseCalc>
    </RSDecEng>
    2) The Procedure which parses the XML-Document (no Exception-Handling):
    CREATE OR REPLACE PROCEDURE XML_TEST IS
    Parser XML_SCHEMA.XMLParser.Parser;
    DOMDocument XML_SCHEMA.XMLDOM.DOMDocument;
    DOMNode XML_SCHEMA.XMLDOM.DOMNode;
    DOMNodeItem XML_SCHEMA.XMLDOM.DOMNode;
    DOMNodeList XML_SCHEMA.XMLDOM.DOMNodeList;
    DOMCharacterData XML_SCHEMA.XMLDOM.DOMCharacterData;
    TheDocument CLOB;
    ID VARCHAR2(100);
    Data VARCHAR2(200);
    BEGIN
    -- LOB
    DBMS_LOB.CREATETEMPORARY(TheDocument, TRUE);
    DBMS_LOB.WRITEAPPEND(TheDocument, LENGTH(XML_ResponseCalc), XML_ResponseCalc);
    -- Parse
    Parser := XML_SCHEMA.XMLParser.NewParser;
    XML_SCHEMA.XMLParser.ParseCLOB(Parser, TheDocument);
    DOMDocument := XML_SCHEMA.XMLParser.GetDocument(Parser);
    XML_SCHEMA.XMLParser.FreeParser(Parser);
    -- Node
    DOMNode := XML_SCHEMA.XMLDOM.MakeNode(DOMDocument);
    -- Get ID
    DOMNodeList := XML_SCHEMA.XSLProcessor.SelectNodes
    (DOMNode,'/RSDecEng/ResponseCalc/ID/text()');
    IF XML_SCHEMA.XMLDOM.GetLength(DOMNodeList) > 0 THEN
    DOMNodeItem := XML_SCHEMA.XMLDOM.Item(DOMNodeList, 0);
    XML_SCHEMA.XMLDOM.WriteToBuffer(DOMNodeItem, ID);
    SYS.DBMS_OUTPUT.PUT_LINE ('ID: '||ID);
    END IF;
    -- Get CDATA
    DOMCharacterData := XML_SCHEMA.XMLDOM.MakeCharacterData(DomNode); -- <-- ok here...
    IF NOT XML_SCHEMA.XMLDOM.isNull (DOMCharacterData) THEN -- <-- ...and here
    Data := XML_SCHEMA.XMLDOM.GETDATA(DOMCharacterData); -- <-- ...but here Exception raise
    END IF;
    END;
    I hope you can help me.
    Thank you in advance
    Markus Schwabe

    You need to notice the definitions for makecharacterdata:
    FUNCTION makeCharacterData(n DOMNode) RETURN DOMCharacterData;
    PURPOSE
    Casts given DOMNode to a DOMCharacterData
    It only do the casting.

  • Problem while executing app for retrieving data from EXCEL Sheet

    hi
    i have this exception while running my application of retrieving data from a Excel sheet through java application , i had also set theclasspath for jxl. jar file but where its going wrong i dont know heres my code
    import java.util.Date;
    import java.io.*;
    import jxl.*;
    import javax.swing.*;
    import java.awt.*;
    import jxl.read.biff.BiffException;
    public class testExcel2
    public static void main(String args[]) throws jxl.read.biff.BiffException
    try
    File f=new File("move.xls");
    jxl.Workbook workbook=null;
    jxl.Sheet sheet=null;
    workbook=jxl.Workbook.getWorkbook(f);
    sheet=workbook.getSheet(0);
    Cell a1 = sheet.getCell(0,0);
    String stringa1 = a1.getContents();
    System.out.println("stringshaddddddddjk "+stringa1);
    workbook.close();
    }catch(IOException ex){
    System.out.println("Error" + ex);
    catch (BiffException ex2){
    System.out.println("Error" + ex2);
    catch(IndexOutOfBoundsException ex1){
    System.out.println("Error" + ex1);
    compilation is sucees but while running its giving an EXCeption
    MicrosoftXP[Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    G:\mysfw\pgms>java testexcel2
    Exception in thread "main" java.lang.NoClassDefFoundError: testexcel2 (wrong nam
    e: testExcel2)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)

    Java is case sensitive. testexcel2 is different from testExcel2.
    G:\mysfw\pgms>java testexcel2
    Exception in thread "main" java.lang.NoClassDefFoundError: testexcel2 (wrong name: testExcel2)

  • Any way to use OBDC in SAP to access MySQL DB and retrieve data

    I'd like to logon to an external MySQL DB (can de done easily enough with PHP)   but I'd like to do it with ABAP if possible.
    Connecting via OBDC I should be able to retreive the data from the DB  and then use it in my SAP application.
    Some databases will allow connection via
    EXEC SQL.
    connect to :dbsid
      ENDEXEC.
    EXEC SQL.
        set connection :dbsid
      ENDEXEC.
    EXEC SQL.
      open xxxxxxx for
      select
    ...... data from external DB
    from tablespace in external db
    ENDEXEC.
    do.
      EXEC SQL.
        fetch next XXXXXX into
               :db_table_field, .... etc
                 ENDEXEC.
      if sy-subrc ne 0.
        exit.
      endif.
      insert table int_sap_table.
    enddo.
    EXEC SQL.
      close XXXXXX
    ENDEXEC.
    If you can make this type of stuff work for a MySQL DB i'd appreciate the answer.
    Using PHP has a drawback as you need to have it installed on the front end PC and run in Foreground.
    The EXEC SQL commands run in batch which is what you need if you are talking about 100,000's of records from an external DB.
    Cheers
    jimbo

    Hi Graham
    Currently it doesn't seem to support MySQL.
    Now that SAP has taken over again the development of MAXDB I can't see it providing  direct MySQL to SAP functionality.
    MAXDB is available but that would mean changing the entire architecture and we don't want to do that.
    I think probably the best route to go would be to create a BAPI which is capable of performing a logon to the remote  MySQL DB server, get the data and either send it back as  IDOCS, an external flat file, or as an internal table depending on the volume of data to be retrieved.
    The good thing about MySQL is that the command line interface makes logging on and retrieving data quite simple.
    This data is actually wanted in a BI  / BW system to provide for a number of business proces analyses.
    I did think abut using "Web Services"  but the data retrieval will essentially be done offline.
    There is no requirement currently for transferring data FROM SAP back to the MySQL database ( although if you've ever dealt with top level management you know how quickly developments can change).
    PHP for all it's drawbacks is the really easy way - but we'll have a problem doing this in background from the SAP servers. For foreground tasks it's a real doddle if you have php on your front end.
    for example
    <?php
    $username = "pee_wee";
    $password = "let_me_in";
    $hostname = "localhost";        */* IP address of remote DB server */*
    $dbh = mysql_connect($hostname, $username, $password)
    or die("Unable to connect to MySQL");
    print "Connected to MySQL<br>";
    // you're going to do lots more here soon
    mysql_close($dbh);
    ?>
    Batch mode also seems OK  also from the documentation
    http://dev.mysql.com/doc/refman/5.1/en/batch-mode.html
    so running an ABAP which can issue system commands (readily available) should work in theory provided the SAP server can connect to the remote MySQL server machine.
    Thanks for your suggestions however
    Cheers
    jimbo

Maybe you are looking for