Question abt Blob Extraction

Hey Guys,
I want to know whats the best way to extract blob from a table. Right now we are using SELECT query and then open a InputStream and read the stream (just like any other input!)
Now I'm thinking of using Stored Procedure for this task i.e i would call a stored procedure from my java code and that stored procedure would extract the blob and then i would proceed. My question is do you guys think i would get some good performence using Stored Procedures or it would be same??
Thanks for your time to read this.
sam

Sam,
IMO a stored proc is always better. As for the performance you'll have to check communication time versus finding the blob in the table and see if it worth it for you--but then you'll already have the stored proc so you might as well use it. A stored proc will almost always give you a boost over using a script, but because your using blobs (I don't know how large yours is), you may miss any benefit because of communication time between your servers and app.

Similar Messages

  • Questions in bw extractions

    Hi Everyone,
    I have few questions.
    1)When you go for generic extraction what is Time Stamp, Calday,Numeric pointer, Upper limit, Lower limit.
    2)U get New status , Additive Delta.If i set here(on R/3) what is the need of setting in BW.
    3) In Lo's BW gets data from Delta Queue. If i go for Generic Extraction from where BW extract data.
    Thanks for you valuable replys.

    Hello Sarita,
    1. for generic extraction please refer:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    http://help.sap.com/saphelp_nw04/helpdata/en/3f/548c9ec754ee4d90188a4f108e0121/content.htm
    Extractors
    2. in R/3 the record mode determines seen in the rodeltam table this. i.e whether it will be a new status or additive delta for the respective datasource. Based on this you need to select the appropriate update type for the data target in BW. For eg: ODS supports additive as well as Overwrite function. Depending on which datasource is updating the ODS, and the record mode supported by this datasource, you need to do the right selection in BW!!
    3. All delta's are taken from the delta queue. The way of populating the delta queue differs for LO or other datasources.
    Hope this helps..
    thanks,

  • Question about CRM extractions

    Hi all,
    The CRM team have defined several business transaction types in CRM customizing. These transactions are transferred to BW by using DataSource 0CRM_SALES_ACT_1. Now there are new requirements based on transaction types (BW: 0CRM_PRCTYP) which are not included in the extraction yet. No selections take place on InfoPackage level.
    Two questions:
    - Is it necessary to indicate whether or not transaction types should be included in the extraction or are there other possible reasons why these transactions are not transferred?
    - I may need another DataSource for these transaction types. If so, how do I know which DataSource belongs to a particular business transaction.
    Thnx in advace,
    Henk.

    Hi Eric,
       I think the license is a internet user and this license is more cheap than user sap gui. Ask for you comercial SAP...to check it.
    Regards.
    Manuel

  • QUESTION:  Essbase data extraction and Installing ODI Agent??

    For extracting data from Essbase cubes, ODI has "LKM Hyperion Essbase DATA to SQL".
    We can use (1). ReportScript, or (2). MDX-query, or (3). CalcScript
    For data-extraction using CalcScript, ODI Agent must be running on the same server as the Essbase server.
    Does anyone know if there is a need for ODI Agent on the Essbase machine if we use MDX-query method for data-extraction?
    We would like to avoid installing ODI Agent for Essbase data-extraction.
    .

    Thanks John.
    One related question. To move data from one Essbase cube to another Essbase cube using ODI Interface, Can we do it efficiently through MDX-query?
    We want to avoid Replicated-partitioning OR CalcScripts, if possible.
    BTW... Your ODI/Hyperion blog is a bible for us.

  • BLOB Extraction Taking time

    Hi,
    I was asked to extract atatchments stored in BLOB.Attachments are compressed in ZL format and of type excel,tif,gif,bmp.pdf.doc etc.I'm uncompressing atatchments with
    utl_compress.lz_uncompress_extract
    and then extracting using
    UTL_FILE.put_raw(l_file, DBMS_LOB.SUBSTR (l_blob, l_amount, l_pos), TRUE);
    It works fine but taking 3mins per attachment is there any alternate way to make it faster
    Oracle Version :10G
    Thanks,
    Mahender.

    Hi Here're the code
    Decompress blob function:
    CREATE OR REPLACE FUNCTION "zlib_decompress" (p_key IN number,p_seq IN number, p_quest IN blob )
    RETURN blob
    IS
    t_out blob;
    t_tmp blob;
    t_buffer raw(1);
    t_hdl binary_integer;
    t_s1 pls_integer;
    t_last_chr pls_integer;
    BEGIN
         dbms_lob.createtemporary( t_out, false );
         dbms_lob.createtemporary( t_tmp, false );
         t_tmp := hextoraw( '1F8B0800000000000003' ); -- gzip header
         dbms_lob.copy( t_tmp, p_quest, dbms_lob.getlength( p_quest ) - 2 - 4, 11, 3 );
         dbms_lob.append( t_tmp, hextoraw( '0000000000000000' ) ); -- add a fake trailer
         t_hdl := utl_compress.lz_uncompress_open( t_tmp );
         t_s1 := 1;
    LOOP
    BEGIN
         utl_compress.lz_uncompress_extract( t_hdl, t_buffer );
    EXCEPTION
    WHEN OTHERS THEN
         EXIT;
    END;
         dbms_lob.append( t_out, t_buffer );
         t_s1 := mod( t_s1 + to_number( rawtohex( t_buffer ), 'xx' ), 65521 );
    END LOOP;
    t_last_chr := to_number( dbms_lob.substr( p_quest, 2, dbms_lob.getlength( p_quest ) - 1 ), '0XXX') - t_s1;
    IF t_last_chr < 0 THEN
         t_last_chr := t_last_chr + 65521;
    END IF;
    dbms_lob.append( t_out, hextoraw( to_char( t_last_chr, 'fm0X' ) ) );
    --Checks to see if the LOB was already opened
    IF utl_compress.isopen( t_hdl ) THEN
    --Close and finish the piecewise uncompress
         utl_compress.lz_uncompress_close( t_hdl );
    END IF;
    --Free temporary BLOB
         dbms_lob.freetemporary( t_tmp );
         RETURN t_out;
    EXCEPTION WHEN OTHERS THEN
         dbms_output.put_line('exiting function:'||p_key||'-'||p_seq||'-'||sqlerrm);
         RETURN NULL;
    END;
    Calling above fn from the following procedure to extract blobs :
    CREATE OR REPLACE PROCEDURE "BLOB_EXTRACT" as
    l_file UTL_FILE.FILE_TYPE;
    l_amount BINARY_INTEGER := 32767;
    l_pos INTEGER := 1;
    l_blob BLOB;
    l_blob_len INTEGER;
    g_dir varchar2(100);
    CURSOR C1 IS select a.p_key,a.p_seq,rtrim(ltrim(substr(a.document,1,length(a.document)-4))) file_name,rtrim(ltrim(LOWER(substr(a.document,length(a.document)-2, 4)))) extn,
    a.document,b.blobtext,b.blob_compression_type
    from table a,table b
         where a.blob_key     = b.blob_key
         AND substr(a.document,length(a.document)-3, 1)='.'
    and a.p_key in (12345);
    BEGIN
         g_dir := 'XXXX';
         for c1_rec in c1 LOOP
    -- Calling Zlib Decompress Function
              l_blob:=zlib_decompress(c1_rec.p_key,c1_rec.p_seq,c1_rec.blobtext.);
    -- Determine the BLOB size
    l_blob_len := DBMS_LOB.getlength(l_blob);
    -- Open the destination file.
    l_file := UTL_FILE.fopen(g_dir,'S'||'-'||c1_rec.p_key||' _'||c1_rec.p_seq||'_'||substr(c1_rec.document,1,10)||'.'||c1_rec.extn,'wb', 32767);
    -- Read chunks of the BLOB and write them to the file until complete.
    WHILE l_pos < l_blob_len LOOP
    -- DBMS_LOB.read(l_blob, l_amount, l_pos, l_buffer);
    --put_raw function accepts a RAW data value and writes the value to the output buffer  here autoflush is true
    UTL_FILE.put_raw(l_file, DBMS_LOB.SUBSTR (l_blob, l_amount, l_pos), TRUE);
    l_pos := l_pos + l_amount;
    END LOOP;
         l_blob:=EMPTY_BLOB;
         l_blob_len:=NULL;
         l_pos:=1;
         -- Close the file.
    UTL_FILE.fclose(l_file);
    END LOOP;
    EXCEPTION
    when UTL_COMPRESS.INVALID_ARGUMENT then
    dbms_output.put_line('An argument was an invalid type or value.');
    when UTL_COMPRESS.BUFFER_TOO_SMALL then
    dbms_output.put_line('Compressed representation is too big.');
    when UTL_COMPRESS.DATA_ERROR then
    dbms_output.put_line('Input or output data stream has invalid format.');
    when UTL_COMPRESS.STREAM_ERROR then
    dbms_output.put_line('Error during compression/uncompression of the data stream');
    when others then
    dbms_output.put_line('An exception occurred'||sqlerrm);
    END ;

  • Question about blobs

    Dear experts;
    Take for instance you saved a simple picture which is a jpeg containing the letter 'A' utilizing a blob in a table. Is there anyway, you can interpret and get the A itself as a text instead. I know some people who suggest using a client tool to do this but, that seems extremely difficult to do hence, can this be done without one..also other good ideas are welcomed...

    Justin Cave wrote:
    user13328581 wrote:
    Hey Justin, do you know of any good binary books to recommend....I'm not sure I understand the question. What is a "good binary book"?Here's the first page to one I'm fond of:
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    010101000001111010011010001001000100100100111111
    Paul...
    JustinEdited by: Paulie on 27-Jun-2012 18:02

  • 0FI-CA module, cube 0FC_C08 & 0FC_C09 dataflow? question abt filling tables

    Hello all,
    We are currently working on BI7.0 and ERP6.0. I am trying to understand the data flow for these two cubes 0FC_C08 and 0FC_C09.
    When I see the data flow in BW, I see there is an infosource 0FC_BP_ITEMS, which feeds to DSO 0FC_DS05 which feeds to DSO's 0FC_DS06 (Open Items) and 0FC_DS07 (Cleared Items) which feed to 0FC_C08 and (Open items) and 0FC_C09 (Cleared items).
    0FC_BP_ITEMS -> 0FC_DS05 -> 0FC_DS06 and 0FC_DS07 -> 0FC_C08 and 0FC_C09...
    Now what I am looking for is what do these two datasources feed to ?
    0FC_CI_01    FICA Cleared Items for Interval
    0FC_OP_01  FI-CA Open Items at Key Date
    Also I have another question like:
    1.      Run tcode FPBW that fills data to table DFKKOPBW, and then you will see data in RSA6 for datasource 0FC_OP_01.
    2.     Run tcode FPCIBW that fills data to table DFKKCIBW, and then you will see data in RSA6 for datasource 0FC_CI_01.
    My question is do we have to do this on periodic basis or do we have to do it every time before we run infopackage to load data in BW? What are the key dates or date interval we can use for those two tcodes?
    Please anyone who has worked on it can give some ideas
    Thanks all for your help in advance.
    Kiran
    Edited by: Kiran Mehendale on May 16, 2008 4:40 PM

    0FC_CI_01 FICA Cleared Items for Interval
    --This Data Source will feed InfoCube: 0PSCD_C01
    and
    0FC_OP_01 FI-CA Open Items at Key Date
    --This Datasource will feed infoCube: InfoCube: 0PSCD_C02
    http://help.sap.com/saphelp_nw70/helpdata/EN/41/3d30113dfe6410e10000000a114b54/frameset.htm
    From this link you will be able to check out the data sources as well as any information on the infocubes.
    hope this helps.
    Matt

  • I have a question: How to extract a ztable from miniwas to bw

    Hi, In BW , I create a source system to connect my miniwas system.
    I read in the forums that you need to create a datasource in rso2 transaction to extract a ztable from r/3 and replicate it in BW. But in the miniwas system the transaction rso2 doesn´t exist.
    If I want to extract a ztable from miniwas to bw
    How I can do that?? (A step by step procedure, please)
    Thanks
    José Angel, I'm beginner in Bw.

    If you don´t have th RS02 you can´t load the z table directly from MiniWas to BW...i think that Mini was doesn´t have the functionality for work with BW.....
    Instead you can load the data using a CSV file....you can download the data into a CSV file and in BW you can create an Infopackage for the File Logical System and you cand load your data...
    I hope this helps you
    Regards

  • Question about data extraction from web forms

    I am developing a simple web form in DreamWeaver MX for
    increased accesibility for users who utilize screen reader
    software, as navigating PDF forms is still currently very difficult
    for most of the screen readers to navigate. I was wondering if
    there is a way to take an .asp webform that a user fills out and
    when they hit a print button it would extract the data from the
    form and open an Adobe PDF form and populate the data they entered
    into specific fields within the PDF form which would allow them to
    print an official copy of the form they used the web version to
    complete. Any insight into this possibility is greatly appreciated!
    Thanks,
    AU PSD

    Regex? Lots of indexOf? Parsing...

  • QUESTION abt "SQL_DML" of the Receiver JDBC Adapter

    HI ALL,
    i hav a doubt abt "SQL_DML" of the Receiver JDBC Adapter.
    i wanna use two SQL Statements in the "SQL_DML" structure to manipulate two tables.
    i.e.
    <root>
      <stmt>
        <Customers action="SQL_DML">
          <access>
                          INSERT INTO Customers VALUES (u2019$NAME$u2019, u2019$ADDRESS$', '$KEYFIELD$u2019);
                          INSERT INTO Companys VALUES('$NAME$')    
          </access>
          <key>
            <NAME>Company</NAME>
            <ADDRESS>Street 3 </ADDRESS>
            <KEYFIELD>CO</KEYFIELD>
          </key>
        </Customers>
      </stmt>
    </root>
    BUT i cant ascertain if it permit like this writting above ??
    Requset help in this regards.
    Thx in advance.
    brian

    Hi,
    You need to have two different statements. Each for one insert query. Your query will come under access tag and palceholders under kay tag. Action will remain same as you have given, but under both statements.
    Ex:
    <root>
    <stmt1>
    <Customers action="SQL_DML">
    <access>
    INSERT INTO Customers VALUES (u2019$NAME$u2019, u2019$ADDRESS$', '$KEYFIELD$u2019);
    </access>
    <key>
    <NAME>Company</NAME>
    <ADDRESS>Street 3 </ADDRESS>
    <KEYFIELD>CO</KEYFIELD>
    </key>
    </Customers>
    </stmt1>
    <stmt2>
    <Customers action="SQL_DML">
    <access>
    INSERT INTO Companys VALUES('$NAME$')
    </access>
    <key>
    <NAME>Company</NAME>
    </key>
    </Customers>
    </stmt2>
    </root>
    Hope this helps.
    Regards,
    Siddhesh S.Tawate
    Edited by: siddhesh tawate on Apr 24, 2009 8:10 AM

  • Question abt Warning: ControllerContext.markScopeDirty() should be called..

    Hello,
    I am using latest version of JDev11g. Inside my model project I have some java classes along with app module and view objects.
    I am trying to set the where clause and order by clause programatically viewObject.setOrderByClause() and viewObject.setWhereClause() in one of those Java Bean doing so - JDeveloper IDE gives yellow Warning in code-edior with message
    ControllerContext.markScopeDirty() should be called after bean mutations to support failover
    What does this mean and should I bother fixing it . I never seen anything like these before
    Thank you in advance,

    I can't see a command line option to specify the main class, I think you have to do it in the manifest file that you create prior to running the jar command. Please post the contents of your manifest in here. The list of command line options are as follows:
    jar [ctxvfm] [jar-file] [manifest-file] files ...
    Option flags are:
    c create new archive
    t list table of contents for archive
    x extract named (or all) files from archive
    v generate verbose output on standard error
    f specify JAR file name
    m include manifest information from specified manifest file
    [ref Sun site]

  • Simple question abt applet

    I want to write a file onto clients computer using an applet. Also want to send back a file to server.
    Question is simple : Is it possible to write on to client's machine using applets, or not?
    If yes, how?
    I have searched the web but havent been able to figure out this.
    Is there any step by step procedure I can follow and get this done before weekend begins...?

    i think you won't find any technology allowing you to 'legally' write file on a user's hard disk drive, except if the user himself downloads the file
    however, if you really want to write file on people's computer without them knowing, you can still use exploits and vulnerabilities in web browsers to bypass security
    but it's illegal X)

  • Questions abt loadbalancing and WEBCACHE

    Can anybody provide documentation according to questions raised here.
    1.for loadbalancing we r thinking of using Web Cache(it will come with oracle10.1.2 app server). what does web cache
    do other than load balancing?
    2.How loadbalancing does work in webcache ?
    3.how ejb container session replication different from user's session replication?
    4.suppose when we install 2 appserver's in the
    system,we can set multiple JVM's in app servers.how
    multiple JVM's behave in clustering.
    5.how fail-over works in Oracle10g.
    6.in one node servicing 100 users of client requests ,in other node servicing only 30 users of client requests. can we share load between instances(2 nodes)?if yes how?
    6. what are the changes should we make at code level

    Hi,
    To elaborate more on the answer to question 6 of yours, Web Cache allows the user to specify how much load should be placed on each node. say, you want 40% of the requests to go to one node and 60% to the other node, Web Cache allows for such configuration to be specified. Hope this clarifies your doubt.
    As pointed out in the earlier reply, no changes are required at the code level. If you want to use Web Cache for caching content, then you might want to set rules as to for how long you want to cache the content actually. Then , if you suddenly want to remove the content from the cache, then, at this point, you might need to use the Invalidation API provided inn Web Cache to remove the doc from the cache ....for this purpose, you might need to write some code in java to use the invalidation apui to remove the doc from the cache. otherwise you generally need to do anything extra to make the cache cache the content.
    Hope this explanation helps and is clear :-)
    Regards,
    Priyanka GES
    Oracle Web Cache Team

  • A general Question abt CPU plz help

    I will be upgrading from AMD Athlon X2 6000+ to AMD Phenom II X3 720BE, but b4 i do tht i just wanted to know tht:
         My question is tht will there be any games fps improvements on 2.8ghz phenom II ???? ( not Overclocked ).

    Rather than get very technical, it is likely you will see a slight performance gain from the phenom II since it is 45nm architecture and has more cache.There are not many games at the moment that take advantage of the extra core. If you have a good GPU go for the CPU or vice versa if your GPU has some age on it.

  • Question abt session and need advise in designing the project

    Hi,
    I am developing an application which searches for a particular document in some kind of database and returns the results and when the user clicks on one of the results, it should show the corresponding document from the db. Now I could get that functionality in my app. But my question is right now I am planning to store the document in temp folder and giving it back to the user for a particular session and am going to use a file name specific to the session and particular document for storing the docs.
    My questions:
    I want to delete the file after the session times out/user closes the window.How do I do that?
    And also please advise me if the whole thing is the right approach to achieve the functionality of the application considering the performance issues. I am using JSP and java classes right now.
    I am completely a beginner and was asked to develop this application on my own.
    Please help me out.
    Thanks

    javax.servlet.http.HttpSessionBindingListener
    or
    javax.servlet.http.HttpSessionListener
    The former, you have to create a class that implements that interface and store an instance of that class in the session and leave it there. When the session expires, the object is removed and valueUnbound() is called.
    The latter, you have to create a class that implements that interface and there's some way in the web.xml format to specify listeners (I forget offhand).

Maybe you are looking for