TIME_OUT in SAP when accessing external Oracle table thru native SQL

Hi,
I have a problem in one of my native SQL statement. It takes a long time accessing the table considering that the number of records to be retrieved is only small.
Something happened on the Oracle system. But, stilll to be confirmed. Before, there wasn't any issue. Looking further, I found that when the value in the where clause equated is a literal (meaning the value is not declared in DATA or CONSTANTS in the ABAP Program)
Example
1.
EXEC.
WHERE FIELD = '1'
ENDEXEC.
instead of
2.
CONSTANTS: c_1 value '1'.
EXEC.
WHERE FIELD = c_1
ENDEXEC.
i found that when the way of coding is same as Example 1, a time-out error occurs. But when in Example 2, no issue.
Can someone explain this? is their something that could affect SAP with respect to Oracle configuration?
Thanks!

I wonder if you could share the outline of your code to access an external oracle database.   I've just been given the assignment to do just that, but don't know where to start.
thx,
Mike DeGuire

Similar Messages

  • # coming when I select data from oracle table using Native SQL

    Hi Gurus,
    I am selecting 'First name' from oracle table directly using native sql. I am fetching 65000 records but 10+ records having '#' at the end of firstname. For eg: John#.
    But oracle team couldn't find '#' in their table for those records. What could be problem?
    or what could be the character in oracle which comes as '#' in abap?
    Pls help...
    Saj

    Thanks for replies.
    My DB NLS_PARAMETER is AL32UTF8. I am able to pullout data with older version of ojdbc jar file. So I think there is no issue regarding NLS setting.
    So please guide me with proper solution as soon as possible.

  • Incorrect data value when insert into oracle table

    Would like to ask expert here, how could I insert data into oracle table where the value is 03 ? The case is like that,  the column was defined as varchar2(50) data type, and I have a csv file where the value is 03 but when load into oracle table the value become 3 instead of 03.

    user11432758 wrote:
    Would like to ask expert here, how could I insert data into oracle table where the value is 03 ? The case is like that,  the column was defined as varchar2(50) data type, and I have a csv file where the value is 03 but when load into oracle table the value become 3 instead of 03.
    implicit datatype conversion to NUMBER can result in leading zero to be eliminated.
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • Performance for join 9 custom table with native SQL ?

    Hi Expert,
    I need your opinion regarding performance to join 9 tables with native sql. Recently i have to tunning some customize extraction cost  report. This report extract about 10 million cost of material everyday.
    The current program actually, try to populate the condition data and insert into customize table and join all the table to get data using native sql.
    SELECT /*+ ordered use_hash(mst,pg,rg,ps,rs,dpg,drg,dps,drs) */
                mst.werks, ....................................
    FROM
                sapsr3.zab_info mst,
                sapsr3.zab_pc pg,
                sapsr3.zab_rc rg,
                sapsr3.zab_pc ps,
                sapsr3.zab_rc rs,
                sapsr3.zab_g_pc dpg,
                sapsr3.zab_g_rc drg,
                sapsr3.zab_s_pc dps,
                sapsr3.zab_s_rc drs
            WHERE mst.zseq_no = :p_rep_run_id
            AND mst.werks = :p_werks
            AND mst.mandt = rg.mandt(+)
            AND mst.ekorg = rg.ekorg(+)
            AND mst.lifnr = rg.lifnr(+)
            AND mst.matnr = rg.matnr(+)
            ...............................................   unitl all table (9 tables)
            AND ps.mandt = dps.mandt(+)
            AND ps.knumh = dps.knumh(+)
            AND ps.zseq_no = dps.zseq_no(+)
            AND COALESCE (dps.kbetr, drs.kbetr, dpg.kbetr, drg.kbetr) <> 0
    It seems the query ask for database to using hashed table. would that be it will burden the database ? and impacted to others sap process ?
    Please advise
    Thank You and Best Regards

    you can only argue coming from measurements and that is not the case.
    Coming from the code, I see only that you do not understand it at all, so better leave it as it is. It is not a hash table, but a hash join on these table.

  • FPN design: prevent employee from content when accessing externally

    I have a portal architecture question that neither my IBM nor SAP consultant could answer in a satisfactory way:
    situation: we're about to setup a federated portal network with multiple producer portals. We think we have to setup 2 consumer portals: one for internal users with full content and one for external access with reduced content (e.g. no MSS or BOBJ when accessing from the outside).
    It is our understanding that the external client still directly connects with the producer portal for getting its contents so the reverse proxy has to let the URL request go through.
    the problem:
    an employee can find out the producer URL and directly access the producer from the outside. Since the user is known at the producer they can sign-in there and access all content.
    We have security concerns and want to present sensitive content only to users on our internal network.
    the question:
    how can we  prevent for sure that an employee accessing the portal from the outside can only access non-sensitive content.
    ... or ... are our requirements unusual and we should change?

    Hi,
    the best way for ensuring that sensitive information isn't accessible from the outside is to make this kind of information not accessible from the outside. If you cannot seperate internal and external information on seperate servers:
    Content published on the portal normally is being accessed by an URL. WebDynpro is integrated as an iFrame and BI reports are executed on the BI portal.
    Even if you do integrate this kind of content via FPN, they seem to reside on the consumer, but when accessed the producer URL is called. Try to put a Firewall between your consumer and producer that will only allow internal IP adresses to pass.
    User -> DMZ -> Consumer -> Firewall -> Producer
    The user clicks on the MSS iView that is basically an ITS or WD that calls the Producer URL. The Firewall checks the IP of the user and blocks it.
    If you want to prevent the user even to see the to-be blocked content in the navigation of the consumer, you'll have to code your own navigation / dynamical role assignment that checks if the user is connected in the Intranet or Internet and constructs on-the-fly the correct navigation.
    br,
    Tobias

  • Finder hangs when accessing external drive

    My finder hangs when accessing an external drive.
    It is specific to a drive the I created on my TC disk.
    That drive and TC work perfectly unless I mouint it and alter anything on that disk (I can read ok but writing causes a freeze.)
    The writing that I do is always ok; if I trash or move something it always ends up where I wanted it after a restart.
    The process looks like:
    I drag an item to the trash (or another directory) and the progress bar shows success down to 3 or 5 seconds and then it stops (curser becomes a spinning beach ball.)
    I can hear the tone of a successful transfer if I wait a little while but the finder is unresponsive untill I restart.
    Once restarted I can check the external disk and the file transer (to a directory or the trash) appears to have completed without corruption.
    I have repaired drives and permissions all over the place with no results.
    Can I just say that I tired of constant unnecessary updates that slow my computer, rearrange my settings and cause crashes and other problems that have to be researched and chased down through hours of online troubleshooting. I would love to have thoroughly tested software and hardware that just works without the hassle of having to constantly tweek my machine to get it to work consistantly.

    Are you saying you have this problem only with one drive, not with others?

  • ESS Content not showing when accessed Externally

    Hello Experts,
    I am experiencing an issue with our ESS portal that is not displaying the content when it is accessed externally (from outside our intranet).
    Currently we can access all content from inside our own network.  From outside our network we are able to log into the portal and access all tabs (content Admin, System Admin, user Admin, etc), however when we try to access the ESS, My Travel, or My Budget Tabs we get a "page cannot be displayed" error.  It appears anything using WebDynpro will not load.
    Internally we access the portal by going to the URL:  <ServerName>.baldor.com:50000/irj/portal
    Externally we access the portal by going to the URL:  employeselfservice.baldor.com:50000/irj/portal
    Is there some kind of mapping that we need to configure?  Any Suggestions?
    Any Help is greatly appreciated,
    Thanks in Advance,
    Steven

    Problem is solved.
    We had to use our external web address in the System defination in the portal.

  • Accessing multiple oracle tables using C#

    Hi you'll.
    I'm a newbie programmer, my first project is to find unmatched records bet two oracle tables.
    One requirements of my project is to write in .net platform. I read a lot of good reviews about using odp.net. I haven't work in any oracle related project.
    Would somebosy enlighten me with this project. Hopefully with codes or threads. Thanks

    If the purpose of your query is to master the fundamentals of using Oracle and .NET, I would recommend visiting the Beginners page on the OTN .NET site:
    http://www.oracle.com/technetwork/topics/dotnet/for-beginners/index.html
    If you have a couple of days to devote to learning, then read the 2 Day .NET book for a comprehensive overview. If not, then you can read the beginner article and/or review the OBE tutorials to learn how to perform different tasks with Oracle and .NET.

  • EREC - SAP When an external candidate registers - default email

    Hello All,
    When an external candidate registers on E Recruitment does a default email go to his email id with the user id & password.
    Please let me know if any standard workflow is avaiable?
    Regards,
    Poornima

    Hi Paul,
    this workflow is just triggered, when the candidate registers in Pool without applying. In this case he can define user and password himself.
    A user and password in an e-mail is just required if you apply from job search. Till EhP4 you cannot define user and password yourself and an e-mail is needed. For that purpose no workflow is available in standard.
    best regards
    Sebastian

  • NotSerializableException when getting an oracle connection thru RMI

    Hi all,
    I have been trying to access my oracle connections , which are part of a pool, using rmi.
    I have encountered following exception -
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: oracle.jdbc.drive r.OracleConnection java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: oracle.jdbc.driver.Oracle Connection
    Is there any reason for OracleConnection not to be serialized or am i doing something wrong?
    Any help in this regard is urgently solicited
    regards
    Pawan
    null

    Just tell your DBA to act like a professional and not shut the server down without notifying the user community! That is one of the top pet peeves of any user to have the carpet jerked out from under him!! All shutdowns should be scheduled unless the machine fails or the world ends...
    Otherwise you will have to look for some method to re-verify the connection again. i don't think that the driver will automatically tell you if the connection got jerked away. It will probably think it is still connected!
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Justin Poyser ([email protected]):
    How do I check if the DBA has bounced the database ? I have the following check to determine if the connection is available
    if (conn == null | | conn.isClosed())
    but it still seems to return false for conn.isClosed.
    thus when you run a sql statement against the returned connection object you get a no more data to read from socket error.<HR></BLOCKQUOTE>
    null

  • When accessing a windows program thru remote desktop will it have functionality

    When accessing a remote desktop on a mac to use a windows program is this functional and will it slow the mac down or create other vulnerabilities or will it run smoothly?

    It will be as smooth as your connection is fast, and it won't affect the Mac adversely

  • Retreiving data from external DB using cursors (Native SQL)

    Hi experts,
    Iu2019m trying to use some functionality based on the Native SQL on an Oracle Server. Iu2019m facing some difficulties using cursors and fetching data from the external database.
    Basically the synonym its zfisicc_c_dblink, and Iu2019m running the for the following code:
    TRY.
          OPEN CURSOR WITH HOLD c1 FOR SELECT *
                                FROM  zfisicc_c_dblink
                                WHERE estado_sif = 'I'.
        CATCH cx_sql_exception INTO sqlerr_ref.
          PERFORM handle_sql_exception USING sqlerr_ref.
      ENDTRY.
    DO.
    *  "Move the data from the Cursor into the target area.
        FETCH NEXT CURSOR c1 APPENDING TABLE tab.
        IF sy-subrc  0.
          EXIT.
        ENDIF.
      ENDDO.
      CLOSE CURSOR c1.
    The cursor C1 it's cursor type and the table tab it's ZFISICC_C_DBLINK type, but every time i run it it's giving me the ORA-932 error.
    Database error text........: "ORA-00932: inconsistent datatypes: expected %s
    got %s"
    Can anyone help me on this error? What Iu2019m doing wrong when fetching the data ?
    Another doubt that Iu2019ve it's when using pl/Sql procedure. Can anyone tell how I can retrieve data from the external database with the following code?
    **Select Directo com Cursor
      EXEC SQL.
        CONNECT TO :gv_db_name AS 'dblink_con'
      ENDEXEC.
      IF sy-subrc NE 0.
        WRITE: 'Não foi possível fazer a ligação à DBCON: ', gv_db_name.
      ELSE.
        EXEC SQL.
          DECLARE CURSOR c_1 IS SELECT tipo_operacao FROM movimento_contribuicao
                 WHERE ROWNUM <= 10000;
              wa movimento_contribuicao.tipo_operacao%type;
    BEGIN
           OPEN c_1;
         LOOP
            FETCH c_1 INTO wa; "Not able to return data to SAP system
             EXIT WHEN c_1%NOTFOUND;
          END LOOP;
      END;
        ENDEXEC.
          EXEC SQL.
          DISCONNECT 'dblink_con'
        ENDEXEC.
      ENDIF.
    On the FETCH c_1 INTO wa; code Iu2019m moving the data to an Oracle variable, wa movimento_contribuicao.tipo_operacao%type;, and not to an program variable. Can anyone explain me this how this is +possible using this PL/SQL procedure?
    Thanks in advance,
    Best Regards
    João Martins
    Edited by: Rob Burbank on May 7, 2010 10:25 AM

    Hi Joao,
    Regarding your first question: It looks like there's a conversion problem (with one or more columns) from your Oracle table to your ABAP internal table.
    In the following link you can see (in your case in the SELECT section) the type conversions used for each type combination.
    Some combinations lead to an oracle error (specified in the "Result" column), like in your case (error 932).
    http://help.sap.com/saphelp_470/helpdata/EN/a3/74caa1d9c411d1950e0000e8353423/content.htm
    Regarding your second question: You can use the PERFORMING addition in the EXEC SQL statement.
    You can see an example in the following link:
    http://help.sap.com/saphelp_470/helpdata/EN/fc/eb3b8b358411d1829f0000e829fbfe/content.htm
    Hope it helps.
    Regards,
    Ana Luisa.

  • Passing data from abap-program to mssql database table thro native sql

    Hi,
    To pass the data from abap-program to mssql server,i have created database connection through dbco t.code.
    now i am trying to get connection thro native sql but am not able to get it .Am working in ECC 5.0.
    Could anyone help me on this.Did i miss anything?
    i have tried Native-sql like this.
    DATA: CON_NAME LIKE DBCON-CON_NAME VALUE 'BIW'.
    EXEC SQL.
      CONNECT TO :con_name AS 'C1'
    ENDEXEC.
    Thanks in advance.

    Hi,
    Trying to do the same here, only using Oracle DB.
    DATA:     dbc TYPE DBCON_NAME VALUE 'BI'
    TRY.
      EXEC SQL.
        CONNECT TO :dbc
      ENDEXEC.
      IF sy-subrc NE 0.
        RAISE EXCEPTION TYPE cx_sy_native_sql_error.
      ENDIF.
    CATCH cx_sy_native_sql_error INTO oref_native_sql_error.
      sql_emsg = oref_native_sql_error->get_text( ).
      MESSAGE sql_emsg TYPE 'I'.
    ENDTRY.
    I keep getting the message 'Native SQL exception has occured' (because of the RAISE statement, I wonder how we can get a meaningfull error description).
    Of course this can be a result of a number of network issues, so I'm trying to resolve this together with my BC admin.
    I suggest the same to you..
    In the meantime, if anyone can help out, it will be appreciated.
    Regards,
    SD

  • ORA-01461 error when migrating MySQL -- Oracle table data

    All,
    I'm migrating MySQL 4.x to Oracle10g. Everything went smoothly except for one table was unable to migrate data, giving me the following error:
    Unable to migrate data from source table mysql.mytable to destination table root.MYTABLE :
    ORA-01461: can bind a LONG value only for insert into a LONG columnThe offending source column in MySQL is defined as TEXT. In OMWB it is TEXT (5). The Oracle model originally defined it as VARCHAR2(1), but I resized it to VARCHAR2(4000) since it contains about 20 lines of text.
    Neither the mysql or the oracle data models have a LONG column anywhere. Any idea's what might be causing this error?
    Thanks.

    Hi Jon,
    Thanks for the feedback. I'm unable to reproduce the problem you describe at the moment - if I try to migrate a TEXT(5), OMWB creates a VARCHAR(5) and the data migrates correctly!! However, I note from you description that even though the problematic source column datatype is TEXT(5), you mention that there are actually 20 lines of text in this field (and not 5 variable length characters as the definition might suggest).
    Having read through some of the MySQL reference guide I note that, in certain circumstances, MySQL actually changes the column datatype specified either at table creation time or when interfacing with other databases ( ref 14.2.5.1 Silent Column Specification Changes and 12.7 Using Column Types from Other Database Engines in the MySQL reference guide). Since your TEXT(5) actually contains 20 lines of text, MySQL (database or JDBC driver .... or both) may be trying to automatically map the specified datatype of the column to a datatype more appropriate to storing 20 lines of text.... that is, to a LONG value in this case. Then, when Oracle is presented with this LONG value to store in a VARCHAR(5) field, it throws the ORA-01461 error. I need to investigate this further, but this may be the case - its the first time I've see this problem encountered.
    To workaround this, you could change the datatype of the column to a LONG from within the Oracle Model before migrating. Any application code that accesses this column and expects a TEXT(5) value may need to be adjusted to cope with a LONG value. Is this a viable workaround for you?
    I will investigate further and notiofy you of any details I uncover. We will need to track this issue for possible inclusion in future development plans.
    I hope this helps,
    Regards,
    Tom.

  • Win7 won't install in Mac mini SL w/no optical drive, crashes when accessing external HD

    I've been trying to install win7 on my Mac Mini with 10.6.8 that doesn't have an optical drive.  I've been able to do the bootcamp partition just fine but when it goes to restart into the windows partition with the win7 disk in the external HD, my screen goes grey, then a green with purple border and then black.  I have to reboot and if I press the alt/opt key, I'm able to get into OSX again.  The research I've done shows I need to create a .iso file which I did with disk utility.  I created all types of .iso files, read only, compressed and dvd.cdr files.  Nothing is working.  Bootcamp is not recognizing any of the 5 thumb drives I've put the .iso files on as I read some drives aren't able to be recognized.  The external HD works as I reinstalled SL just fine using it.  My research also shows that win7 won't install from an external HD.  So I'm at a a loss as to how to proceed from here.  I went into my old windows machine to try to create a bootable thumb drive after I install win7 there but the Dell is so old, I don't have a DVD drive in it, only a CD drive.  And if I buy a downloadable version of win7 I still need to get it to a DVD or a thumb drive to get it installed. 
    Does anyone have any ideas?  I called Apple and their support ended at "well, we did our job by getting you to the BootCamp partition" which is a crock.  It's their design to take out the optical drive and now it's everyone else's problem!  Sorry, I know I've got attitude but I'm so frustrated!!
    Thanks in advance!  I'm posting this here and in bootcamp discussion.

    Hatter helped me out without even knowing he helped me out.  In cruising through the archives, he advised another problem seeker to unplug everything except 1 monitor, a mouse and a keyboard.  Which I did and that solved my problems at last.  I also burned my .iso file to a DVD with my MBP and it was able to be read by the external HD.  So keep searching the forums peeps, your answer may be there after all! 

Maybe you are looking for