Tracing queries from abap to a custom database via dblink

I' m connecting to a database by dblink (name magiap).
I would like to know if somewhere I can trace all the queries from abap to oracle in this specific session , to dbs ='MAGIAP'.
For istance, i would like that the query "SELECT "DESPARTY1"
into :v_DESPARTY1
FROM "T040PARTY"
WHERE "CODPARTY" = '305142941' will be stored some where (in a file??).
I would like that parameters - w_CODPARTY- will be substituted and stored in the trace file with the value (305142941), as shown in the previous
Here is the piece of code ..(a very short example of course)..
DATA : dbs LIKE dbcon-con_name,
v_CODPARTY(15),
v_DESPARTY1(60).
data : w_CODPARTY(15) value '305142941'.
dbs = 'MAGIAP'.
TRY.
EXEC SQL.
CONNECT TO :dbs
ENDEXEC.
IF sy-subrc <> 0.
EXEC SQL.
CONNECT TO :dbs
ENDEXEC.
ENDIF.
IF sy-subrc <> 0.
* RAISE err_conn_aea.
ENDIF.
EXEC SQL.
set connection :dbs
ENDEXEC.
EXEC SQL .
SELECT "DESPARTY1"
into :v_DESPARTY1
FROM "T040PARTY"
WHERE "CODPARTY" = :w_CODPARTY
ENDEXEC.
IF sy-subrc NE 0.
* rc = 4.
ENDIF.
EXEC SQL.
DISCONNECT :dbs
ENDEXEC.
ENDTRY.

Hi Silvana,
The SQL statements have been stored in the SQL Cursor Cache, on the database and they will be available until they have been invalidated. You can access the statements at the 'MAGIAP' side and see the last executed queries in the cache.
You can access bind variables by query on the V$SQL_BIND_CAPTURE table, also.
On the other hand, you can activate the trace by the statement, below;
ALTER SYSTEM SET sql_trace = true SCOPE=MEMORY;
Then, the sql statements will be available in the usertrace file. Please note that you should execute and investigate all the statements that I noted above, at the remote side. Plus, as far as I know that it is not able to distinguish the records by the "dblink name". You should check all the statements and try to figure out what queries have been executed remotely.
Best regards,
Orkun Gedik

Similar Messages

  • Trace queries from abap to a custom oracle database via dblink

    I' m
    connecting to a database by dblink (name magiap).
    I
    would like to know if somewhere I can trace all the queries from abap to oracle
    in this specific session , to dbs ='MAGIAP'.
    For istance, i would like that the query
    "SELECT "DESPARTY1"
    into :v_DESPARTY1
    FROM "T040PARTY"
    WHERE "CODPARTY" = '305142941' will
    be stored some where (in a file??).
    I would like that parameters - w_CODPARTY- will be substituted and stored in the trace
    file with the value (305142941), as shown in the previous
    Here
    is the piece of code ..(a very short example of course)..
    DATA : dbs LIKE dbcon-con_name,
    v_CODPARTY(15),
    v_DESPARTY1(60).
    data : w_CODPARTY(15) value '305142941'.
    dbs = 'MAGIAP'.
    TRY.
    EXEC SQL.
    CONNECT TO :dbs
    ENDEXEC.
    IF sy-subrc <> 0.
    EXEC SQL.
    CONNECT TO :dbs
    ENDEXEC.
    ENDIF.
    IF sy-subrc <> 0.
    * RAISE err_conn_aea.
    ENDIF.
    EXEC SQL.
    set connection :dbs
    ENDEXEC.
    EXEC SQL .
    SELECT "DESPARTY1"
    into :v_DESPARTY1
    FROM "T040PARTY"
    WHERE "CODPARTY" =
    :w_CODPARTY
    ENDEXEC.
    IF sy-subrc NE 0.
    * rc = 4.
    ENDIF.
    EXEC SQL.
    DISCONNECT :dbs
    ENDEXEC.
    ENDTRY.

    Hi Silvana,
    The SQL statements have been stored in the SQL Cursor Cache, on the database and they will be available until they have been invalidated. You can access the statements at the 'MAGIAP' side and see the last executed queries in the cache.
    You can access bind variables by query on the V$SQL_BIND_CAPTURE table, also.
    On the other hand, you can activate the trace by the statement, below;
    ALTER SYSTEM SET sql_trace = true SCOPE=MEMORY;
    Then, the sql statements will be available in the usertrace file. Please note that you should execute and investigate all the statements that I noted above, at the remote side. Plus, as far as I know that it is not able to distinguish the records by the "dblink name". You should check all the statements and try to figure out what queries have been executed remotely.
    Best regards,
    Orkun Gedik

  • Call of BW queries from ABAP code

    Has anybody information about how is it possible to call a BW query from ABAP code with parametrization (specifying characteristics) ? In our development project it's a crucial part, beacuse we have to provide interim function modules to carry out some conversion routine on BW provided data, before we put it on the screen embedded in a Visual composer Iview.

    Have a look at this:
    Calling BW queries programatically (also posted on BW forum)
    Hope it helps.
    Regards

  • 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

  • Strange behavior from script when dismounting content databases via PowerShell script

    So, this is my first time posting a question here.  I have taught myself PowerShell and for the most between friends, co-workers, or internet forums, I have been able to pick through most of the issues I have seen.  This one has me stuck. 
    So, a little background, I have a script that goes through each web app in a farm, finds the database that hosts the root site, and detaches all other content databases from the farm.  It also writes a csv file so that a process can come along after the
    fact to re-attach the databases.  I use this for patching so psconfig does not take quite as long as we have more than 50 content databases.  Here is the odd part.  After the first content database is detached, the second one is skipped, but
    the remainder are detached.  So, I have two databases left per web app.  One that holds the root site and whatever the second database is after the first detach.  If I comment out the line that actually does the detach, this does not happen. 
    Now, using ISE and adding break points, what I have found is that when I initially populate the array with the content databases ($var=$webapp.contentdatabase) all databases are in there.  When I start the foreach, all databases are in there.  Right
    up to the point that I detach the first database, all databases are still in the array variable.  As soon as I detach that database, the database that I detached gets removed from the array.  It does this even if I set the variable to read only. 
    It only happens with the first database detached in each web app.  I will try to explain this again with an example.  This test farm has 4 databases.  DB1, DB2, DB3, and DB4.  DB1 holds the root site.  The logic pulls the webapp info. 
    It gets the URL of the webapp.  It takes that info and finds the site collection with that name (the root site).  Finds the database name from there.  It then gets a list of all databases in the webapp and starts to loop through.  So the
    first one in the list is DB1.  It has the root site, so logic says do not delete.  It comes back to the loop with the next database DB2.  At this point, the array still has all 4 databases in the array.  DB2 does not host the root site,
    so the logic gathers information and calls dismount-spcontentdatabase.  As soon as that is called, that database is removed from the array.  So, at this point, we have processes postion 0 and position 1 in the array.  Since the original position
    1 has been removed, DB3 is now at postion 1.  So, the loop continues.  Sine we have now skipped DB3, we find DB4 and dismount.  Now, we have in the array DB1,DB3, and DB4.  My test environment has more and all are still there except for
    the first one removed.  I have banged my head against the desk with this one.  If someone has some insight, I would appreciate it.
    Here is the code that does it.
    get-spwebapplication | foreach-object {
     $webapp=$_
     $waname=$webapp.displayname
     $waurl=$webapp.url
     $cdbs=$webapp.contentdatabases
     $rsite=get-spsite $waurl -erroraction silentlycontinue
     $rsitedb=$rsite.contentdatabase
     $rsitedbn=$rsitedb.name
     foreach ($cdb in $cdbs) {
      $cdbs=$cdbs2
      $cdbname=$cdb.name
      #Write-Host "$cdbname" -foregroundcolor red
      if ($cdbname -ne $rsitedbn) {
       $warn=$cdb.warningsitecount
       $max=$cdb.maximumsitecount
       $current=$cdb.currentsitecount
       $dbserver=$cdb.server
       Write-output "$waname,$cdbname,$dbserver,$warn,$max,$current" >> $outfile
       Write-host "dismounting $cdbname" -foregroundcolor green
       dismount-spcontentdatabase -identity $cdbname -confirm:$false
      else {
       Write-host "$cdbname holds root site. No action." -foregroundcolor yellow

    what about keeping an array of all the non-root collections (may be database name) instead of dismounting them in the foreach loop of all the databases? After we have all the databases that need to be deleted, in a for loop starting with 0 and
    counting to the number of databases, check the name of the database for each index and dismount that database
    pseudo code would be
    $dbstobedismounted = @()
    foreach($cdb in $cdbs)
    $dbstobedismounted + = $cdb.Name  //instead of actually dismounting
    for(int i=0;i<$webapp.ContentDataBases.Count;i++)
    $dabasename = $webapp.ContentDataBases[i].Name
    foreach($dbtobedismounted in $dbstobedismounted)
    if($databasename -eq $dbtobedismounted )
    dismount-spcontentdatabase -dentty $webapp.ContentDataBases[i]
    I'm sure you might have to do some modifications to make it work, but the point I'm making is instead of dismounting in the foreach loop, have a list and dismount in another for loop. Hope it helps.
    rani

  • Readin IDM database from ABAP

    Hello,
    I would like to know where could I find an API description how to communicate from ABAP to the IDM database. IDM is said to be opened, so other system can read from it. That should mean ABAP too. Can anybody point me to such information source, provide a link to an example code, something to start from?
    Thanks Otto

    I have the similar requirement. Please help me.
    The IdM (7.2) has been directly connected to ECC clients via Jco RFC (No VDS). But for the other business suit clients (CRM, SRM, ..), it is connected via VDS.
    Here is my requirement. Due to the security reasons, we have decided to maintain some translation data in the IdM instead of SAP tables. Translation data is very simple. It will have two columns with ZID and EID.
    Forward Translation is from ZID to EID
    Reverse Translation is from EID to ZID
    We would like to use these translations in the interfaces and conversions. During the execution of interface/conversion, if the program encounters ZID, it should be translated to EID using some methods. Since the data is not in SAP tables, we have to get it from IdM.
    Since there is no VDS, do I need to read the IdM database directly? What are the steps involved in this process from ABAP developer point of view and also from IdM team? It would be great, it you suggest some examples.
    Thanks for reading and your help will be greatly appreciated.

  • Execute Bex query from ABAP

    Hi,
    I am using the method mentioned by Durairaj (@  /people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-i )
    to execute queries from ABAP.
    When I try to execute a query with characteristics in rows and if the characteristics name is large then i get a dump:
    'Field symbol has not yet been assigned'
    @ <l_field> = wa_set-chavl .
    I tried the same for another cahracteristic of lesser length and it works fine.
    Initially the chara name was like:
    <8 letter dim name>__<7 letter chara name >
    when i used a dim name with lesser no of letters:
    <7 letter dim name>__<6 letter chara name >
    It works fine.
    is there any restricition on the lenght of characteristics ?
    Thanks,
    Message was edited by:
            Rithesh Vijayakrishnan

    Matthias,
    I have tried to use this method before, but with the follow URL:
    /SAP/BC/WebDynpro/SAP/YWEBTEMPLATE_TEST/bi_template_page.htm?&varn1=0pcalmon&varv1=200901&varn2=0p_cocd&varv2=b047&url=/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex
    didn't work as I image.
    Do I have to transform this url before execute the method?
    Tnks for your patience.

  • ABAP query using logical database KDF is not populating custom fields

    Hi Experts ,
    I created two following queries
    1.       VENDORCATKDF – uses KDF logical database
    2.       VENDORCATLFA1 – uses table = LFA1
    I’m pulling the same information in both queries:
    ·         Vendor Number
    ·         Country
    ·         Vendor Name
    ·         Vendor Category  (custom fields added to LFA1)
    The results for the query that uses the logical database KDF is incorrect.  It doesn’t pull in the flag on the custom field LFA1-ZMRO.   Even though the logical database KDF is made up of the table LFA1 and has these fields. 
    Is there something that can be done – so that all of these “custom” category fields under LFA1 (such as LFA1-ZZMRO) – get pulled into queries – when we use the logical database KDF ?

    Hi,
    I have got the error removed by ensuring that fields from one table are a part of one line ( taking help of ruler) only. But the underlying problem remains, the output is not ALV but List output.
    I do not think having additional fields in the query is reason for this.
    Is it bcoz iI am adjusting the output length of columns to ensure no hierarchical error ?
    Can we not have a query using LDB which is shown as SAP List?
    Regards,
    Garima.

  • Accessing MsSQL Database from ABAP

    Hi Guys,
         I want to connect to an external MsSQL Database running in a window environment from an ABAP Report program where the SAP instance running in a Linux OS with DB2 as a Database. I tried all options suggested in all public forums like maintaining DBCON table entry & placing compatible dll files. I need answers from individuals who have done it in the recent past with this environment not beating bushes.
    Thanks in advance.
    Regards
    Vijaya

    hi,
    see on oss note  Question 4
    Note 555223 - FAQ: Microsoft SQL Server
    Q4: My SAP System runs under Oracle (DB2, SAPDB, ...) and I want to
    exchange data with a non-SAP Microsoft SQL Server directly from ABAP.
    Q4: My SAP System runs under Oracle (DB2, SAPDB, ...) and I want to exchange data with a non-SAP Microsoft SQL Server directly from ABAP. A4: The establishing and use of connections from an R/3 system to another non-SAP database (from the same vendor or not) is called multi-connect and is described in note 178949.
    But you must have a specific application server running on Windows if you want to connect SAP to your Microsoft SQL server with DBCON.
    Rgds
    Edited by: stéphane mouraux on Feb 27, 2010 11:21 PM

  • Calling custom Infotype method from ABAP report

    Hi Experts,
    I am working on an application where i need to call a method of a custom defined infotype.
    I have done this -->
    1. Create a custom infotype 9111
    2. SAP creates a class of that infotype ZCL_HRPA_INFOTYPE_9111
    3. Inside this method there are few inherited method which provide me functionality of insert , update , delete
    i want to call methods IF_HRPA_INFTY_BL~MODIFY,
    IF_HRPA_INFTY_BL~INSERT
    However when i call these method from abap report this method does not work.
    where as when i try to insert an entry using PA30 transaction it works.
    Does anyone know why does this happen and what is the solution?
    Regards,
    Ashish Shah

    Hi,
    This is the code we are using. Just calling the read and modify methods of the check class. Very simple actually .. we just want once update/insert to work but it does not.
    <CODE>
    REPORT  ZTESTRAD_WD.
    FIELD-SYMBOLS <p9106> TYPE p9106.
    DATA : infty_container_tab TYPE hrpad_infty_container_tab ,
           message_list        TYPE REF TO cl_hrpa_message_list,
         w_ok type boole_d  ,
         ref_class TYPE REF TO ZCL_HRPA_INFOTYPE_9106,
         container        TYPE REF TO if_hrpa_infty_container,
         it9106_container TYPE REF TO cl_hrpa_infotype_container,
         p9106_ref        TYPE REF TO data,
        busilog type ref to if_hrpa_masterdata_bl.
    CREATE OBJECT  message_list.
    TRY.
            CREATE OBJECT ref_class
              EXPORTING
                tclas = 'A'
                infty = '9106'.
          CATCH cx_hrpa_violated_assertion .
            write :/ 'Error during initialization'.
      ENDTRY.
    call method cl_hrpa_masterdata_bl=>get_instance
       importing
         masterdata_bl = busilog.
    TRY.
    CALL METHOD ref_class->IF_HRPA_INFTY_BL~read
      EXPORTING
        tclas           = 'A'
        pernr           = 'XXXXXXXX'
        infty           = '9106'
        begda           = sy-datum
        endda           = sy-datum
        no_auth_check   = abap_true
        message_handler = message_list
      IMPORTING
        container_tab   = infty_container_tab
        is_ok           = w_ok.
    CATCH cx_hrpa_violated_assertion .
       WRITE :/ 'Infotype could not be read'.
    ENDTRY.
    *" Fill the local structure with container data:
      loop at infty_container_tab into container.
        it9106_container ?= container.
        TRY.
        CALL METHOD it9106_container->primary_record_ref
          IMPORTING
            pnnnn_ref =  p9106_ref.
         CATCH cx_hrpa_violated_assertion .
        ENDTRY.
        ASSIGN p9106_ref->* to <p9106>.
        write :/ <p9106> .
      endloop.
    *" Just change some field values of the record
      <p9106>-C1name2 = 'Test name'.
      <p9106>-C2name2 = 'Test name 2 3 4'.
    data : return TYPE BAPIRETURN1,
           return1 TYPE BAPIRETURN1.
    *CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
    EXPORTING
       number        = <p9106>-pernr
    IMPORTING
      RETURN        = return1
    *PERFORM do_nothing(sapfp50p).
    The container itself is modified
      container ?= it9106_container->modify_primary_record( <p9106> ).
    CREATE OBJECT message_list.
    the invocation - errors are always fatal !!!
      DATA : lx_exception  TYPE REF TO cx_root,
             update_mode type HRPAD_UPDATE_MODE,
             massn type massn,
             massg type massg.
      TRY.
          CALL METHOD ref_class->IF_HRPA_INFTY_BL~MODIFY(
            EXPORTING
               old_container =                   it9106_container
               massn                          = massn
               massg                         = massg
               update_mode =                 update_mode
               no_auth_check =                   'X'
               message_handler =                 message_list
            IMPORTING
               is_ok =                           w_ok
            CHANGING
               container =                       container
        CATCH cx_hrpa_violated_assertion INTO lx_exception.
          RAISE EXCEPTION TYPE cx_wd_no_handler
            EXPORTING previous = lx_exception.
      ENDTRY.
    </CODE>
    I have also tried by instantiating the cl_hrpa_masterdata_bl and then calling the methods on that object...... makes no difference.
    I used this link to proceed with the modifications:
    http://help.sap.com/saphelp_erp2005/helpdata/en/43/21d2254bba2bebe10000000a1553f7/frameset.htm
    The funny thing is that the WHOLE logic executes without any error messages or dumps or anything. I have now debugged almost every line of code that these methods call. PA30 works just fine. HR_INFOTYPE_OPERATION does not .. that's a whole differnt story.

  • Calling method of a custom infotype from ABAP

    Hi Experts,
    I am working on an application where i need to call a method of a custom defined infotype.
    I have done this -->
    1. Create a custom infotype 9111
    2. SAP creates a class of that infotype ZCL_HRPA_INFOTYPE_9111
    3. Inside this method there are few inherited method which provide me functionality of insert , update , delete
    i want to call methods IF_HRPA_INFTY_BL~MODIFY,
    IF_HRPA_INFTY_BL~INSERT
    However when i call these method from abap report this method does not work.
    where as when i try to insert an entry using PA30 transaction it works.
    Does anyone know why does this happen and what is the solution?
    Regards,
    Ashish Shah

    Had the same problem (probably copied from the same program). The answer is that you need to commit the work at the end using something like
    * Commit
    CALL METHOD busilog->flush
      EXPORTING
        no_commit = space.
    Here is an example of my code for IT0002 which works.
    *& Report  Z_TEST2
    REPORT  z_test2.
    DATA: a_masterdata_bl TYPE REF TO if_hrpa_masterdata_bl,
          p0002         TYPE p0002,
          lo_0002 TYPE REF TO cl_hrpa_infotype_0002,
          ls_p0002_ref TYPE REF TO data,
          container_tab    TYPE hrpad_infty_container_tab,
          container  TYPE REF TO if_hrpa_infty_container,
          message_handler TYPE REF TO cl_hrpa_message_list,
          infotype_logic TYPE REF TO if_hrpa_infty_bl,
          update_mode TYPE hrpad_update_mode VALUE 'XXX',
          lt_0002_container TYPE REF TO cl_hrpa_infotype_container,
          key TYPE pskey,
          l_is_ok          TYPE boole_d.
    FIELD-SYMBOLS <p0002> TYPE p0002.
    * get business logic from masterdata factory
    CALL METHOD cl_hrpa_masterdata_factory=>get_business_logic
      IMPORTING
        business_logic = a_masterdata_bl.
    * CATCH cx_hrpa_violated_assertion .
    *ENDTRY.
    *TRY.
    CALL METHOD a_masterdata_bl->read
      EXPORTING
        tclas           = 'A'
        pernr           = '508'
        infty           = '0002'
        begda           = sy-datum
        endda           = sy-datum
        no_auth_check   = 'X'
        message_handler = message_handler
      IMPORTING
        container_tab   = container_tab
        is_ok           = l_is_ok
    * CATCH cx_hrpa_violated_assertion .
    *ENDTRY.
    READ TABLE container_tab INTO container INDEX 1.
    lt_0002_container ?= container.
    TRY.
        CALL METHOD lt_0002_container->primary_record_ref
          IMPORTING
            pnnnn_ref = ls_p0002_ref.
      CATCH cx_hrpa_violated_assertion.
    ENDTRY.
    ASSIGN ls_p0002_ref->* TO <p0002>.
    MOVE-CORRESPONDING <p0002> TO key.
    break stantric.
    <p0002>-vorna = 'Rick'.
    container ?= lt_0002_container->modify_primary_record( <p0002> ).
    TRY.
        CREATE OBJECT lo_0002
          EXPORTING
            tclas = 'A'
            infty = '0002'.
      CATCH cx_hrpa_violated_assertion .
    ENDTRY.
    CREATE OBJECT message_handler.
    TRY.
        CALL METHOD lo_0002->get_specific_bl
          EXPORTING
            versionid      = '01'
            tclas          = 'A'
            pskey          = key
          IMPORTING
            infotype_logic = infotype_logic.
      CATCH cx_hrpa_violated_assertion .
    ENDTRY.
    TRY.
        CALL METHOD infotype_logic->modify
          EXPORTING
            old_container   = lt_0002_container
            massn           = space
            massg           = space
            update_mode     = update_mode
            no_auth_check   = 'X'
            message_handler = message_handler
          IMPORTING
            is_ok           = l_is_ok
          CHANGING
            container       = container.
      CATCH cx_hrpa_violated_assertion .
    ENDTRY.
    * Commit
    CALL METHOD a_masterdata_bl->flush
      EXPORTING
        no_commit = space.

  • Custom user attribute from ABAP to Portal UME

    Hi All,
    We have choose the ABAP as the data source for portal UME. We have a custom user attribute in the abap. Now i want to bring that custom user attribute from abap to custom user attribute in the UME.
    Any help will be rewarded.
    Thanks
    Sarang.

    Any resolution to this issue?

  • SQL queries from a Citadel database

    We are retrieving data with third-party package SQL queries from a Citadel database. Certain queries for some object members will not return data, but the SQL search application software returns an "error". An analysis of the error from the SQL end does not find problem on SQL side. I suspect corruption of Citadel database. The link to database is good, as most tags do return a value as expected. 
    This problem occurred at the time of re-location of the database to a replacement computer.  Any ideas on how to fix such a problem?

    Can you give an example of the "bad" SQL statement and a good one?
    Ryan Shi
    National Instruments

  • Have anybody copied Queries from "Test" database to "Production database?

    I am looking for the best method to copy queries from one database to another.  From TEST to PRODUCTION.  Other than Copy Express or Copy/Past, is there another recommended approach?  Such as within SQL?

    Hi Alain,
    Copying anything from database A to database B using SQL, means somehow using  SQL command "Insert". Please note that commands like Insert, Update, Delete are NOT SUPPORTED as it might cause data corruption.
    Kind regards
    Mario

  • Custom database functoid to return multiple rows from database

    Hi,
    I have created a custom database fucntoid to execute a stored procedure which returns just single row from the database.But I could not manage to return multiple rows from the database.
    Does anyone know how to return multiple rows from DB and create a node with that many occurrences in the target schema?
    Thanks
    JB

    If you want to do this in messaging-only way without orchestration, then only option let to you is using .NET in BizTalk:
    We had similar requirement with one of our clients, where they didn’t want to use orchestration (though we emphasised on less impact orch would have compared to manageability),
    they still wanted to have pure-messaging only.
    We extended the custom XslTransform component that ships with BizTalk SDK (<BizTalk installation directory>\SDK\Samples\Pipelines\XslTransformComponent)).
    Created a custom disassembler pipeline component, used the XslTransform component from SDK to execute the map’s XSLT. Here we created a map with every links except the database ones. After executing the map, access the database, execute the store procedure
    which returns more than one row/dataset, enrich the XSLT transformed message with the dataset from your database in disassembler.
    Since .NET gives you the flexibility of access the dataset with more than one row, you can enrich the message in custom pipeline code.
    Other option is code the message transformation completely in .NET code in custom disassembler by passing the received message to method/code which would code the map/enrichment.
    While enriching you can execute the store procedure which returns more than one row/dataset, enrich the message further with the dataset from db.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Maybe you are looking for

  • When I try to open a PDF file the reader flashes on the screen then closes

    When I try to open a PDF file the reader flashes on the screen then closes. I have to open the reader, then search for the pdf file through the reader. I'm using Adobe Reader 11.0.5 with windows 7 service pack 1 home premium. Is there any way I can j

  • Initialization parameters. ORA-32004

    Hello all! After upgrading from 9.1.0.6 to 10.2.04 following error appears: SQL> startup ORA-32004: obsolete and/or deprecated parameter(s) specified ORACLE instance started. Total System Global Area 872415232 bytes Fixed Size 1270436 bytes Variable

  • Audio service can no longer run

    After I installed the latest update in Windows 8.1, the audio suddenly stopped permanently. I tried to enable it, only to realize the Audio service is not running! I tried to start it, it says "The endpoint is a duplicate."! How can I re-enable audio

  • SQL Report ref. Item Groups

    Hi Experts I have a User Defined Field on the face of all Sales Invoices which records the date a Maintenance Contract expires (manually entered by User). All my Maintenance Contracts belong to item groups beginning with "MAIN..." I want to be able t

  • Zen Reporting Infoview not pulling the inventory info I want

    I am trying to pull some useful Inventory information from the managed devices but the Report generated does not CONTAINS all the information I needed or at least not pulling the right information from the Managed devices (agents are installed) Here