How tor ead blob in oracle

Is there a way to read/extract blob and see contents of it in oracle? Preferabaly using anonymous pl/sql block?

you can read about utl_file here:
http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10577/u_file.htm#ARPLS70896
after that you will use it in a cursor loop over you table.
could you post your table structure and some sample dml?
Amiel

Similar Messages

  • How to use BLOB in Oracle Forms 10g?

    Hi
    I defined a column in a table with the type BLOB,
    then I used it at the form with a data block.
    Now how can I let the user to insert his photo in this column?
    If you don't know the answer please put any web links that may helps me

    Hi Omkar,
    Please check the following code.
    DECLARE
      repid REPORT_OBJECT;
      v_rep VARCHAR2(100);
      rep_status VARCHAR2(20);
      plid ParamList;
    BEGIN
      plid := Get_parameter_List('tmp');
      IF NOT Id_Null(plid) THEN
      Destroy_parameter_List( plid );
      END IF;
      plid := Create_parameter_List('tmp');
      add_parameter(plid,'p_parameter',text_parameter,to_char(:POLICY.POLICY_NO));
      Add_parameter(plid, 'PARAMFORM', TEXT_parameter, 'NO');
      repid := FIND_REPORT_OBJECT('POL_REP');
      SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
      SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,cache);
      SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF');
      SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER, 'paramform=no');
      v_rep := RUN_REPORT_OBJECT(repid,plid);
      rep_status := REPORT_OBJECT_STATUS(v_rep);
      WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
      LOOP
      rep_status := report_object_status(v_rep);
      END LOOP;
      WEB.SHOW_DOCUMENT('http://'||'LENOVO-428E9E41'||'8889'||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?
      '||'server=prod_report_server&P_parameter='||:POLICY.POLICY_NO||
      '&paramform=no');
    END;
    I am used to Start the Report sever   'Rwserver Server=prod_Report_Server Start'
    OracleAS Report Services
    Version :-   10.1.2.0.2
    Name    :-   prod_report_server
    Status  :-   Server is Shutting down
    Jobs in Queue  0
    Active Engines  0
    I got the Following Error when I trying to run the Report
    FRM-41211: Integration error:SSL failure running another product
    Thanks and Regards,
    Faziludeen

  • How load File as Blob in Oracle Table?

    Hi, I am beginner in ODI.
    How load File as BLOB in Oracle Table?

    Ah so nice, a FAQ, by someone who can't use online resources!
    Any explanation why Google is broken for you?
    Here is the code I use to load a jpg.
    procedure upd_portrait(p_person_id in number, p_file_name in varchar2) is
    l_blob blob;
    l_bfile bfile;
    begin
    update person
    set portrait = empty_blob()
    where id = p_person_id
    returning portrait into l_blob;
    l_bfile := bfilename('MY_IMAGES', p_file_name);
    dbms_lob.fileopen(l_bfile);
    dbms_lob.loadfromfile(l_blob, l_bfile, dbms_lob.getlength(l_bfile));
    dbms_lob.fileclose(l_bfile);
    end;
    Sybrand Bakker
    Senior Oracle DBA

  • How to show an image stored by using SQLLDR as BLOB in ORACLE 10g

    Hi!
    i used SQLLDR to upload images from localhost to my oracle db,
    i saves theme as BLOB`s.
    my problem is:
    i can not view them correctly, showing it using the code below, i get:
    gtìSNEvR=Cm¯ö¾ÆTÿmÖØÏs_û«¬ú ÿSê¯HwýÓ ›[[ü/ñŠÝßSº‡—¢
    does any know what to do?? can help me??
    thank you!
    A.H.S.
    <?php
    echo "<p>Attempting database connection...</p></p>";
    $db_conn = ocilogon("username", "password", "ORACLE_SID");
    if (!$db_conn)
    echo "...FAILED. Check the username, passwd, dbstring given in this script are valid or not.</p>";
    if (OCIError($db_conn))
    $erra=OCIError($db_conn);
    dodberror("SQL Error: $erra $erra[message]");
            exit;
          else
            echo "<p>Connected...</p></p>";
    $table_name="images";
    $stmt = ociparse($db_conn, "select * from $table_name" );
         if (!$stmt)
            echo '<p>parsing error</p></p>';
          if (!ociexecute($stmt,OCI_DEFAULT))
            echo "<font color='red'><p>query execute error!</p></font>";
           echo "<table border=1 cellspacing='0' width='50%'>\n";
           $ncols = OCINumCols($stmt);
           echo "<tr>\n";
           for ($i = 1; $i <= $ncols; $i++) {
                $column_name  = OCIColumnName($stmt,$i);
                echo "<td><b>$column_name</b></td>\n";
           while (OCIFetch($stmt))
               echo "<tr>\n";
            for ($i = 1; $i <= $ncols; $i++)
              $column_name  = OCIColumnName($stmt,$i);
              $column_value = OCIResult($stmt,$i);
              if($column_name=="DATA")  
              //Header("content-type: image/jpg");
               $image = "$column_value->load()";
               echo $column_value;    // gives OBJECT!
               echo "<td><img src='$image' width='48' height='48' align='middle' border='0' alt='not found'> </td>\n";
              //echo "<td><img src='$column_value.jpg' width='48' height='48' a-lign='middle' border='0' alt='not found'> </td>\n"; //works 100%
              //$c1 = '<IMG height=128 width=600 SRC="http://host/' . $row[2] . '">';
                //if ($row[image]) { 
              //header("Content-Type: $row[image_type]"); 
              //print "$row[image]";
                else
              echo "<td><b>$column_value</b></td>\n";
            echo "</tr>\n";
          echo "</tr>\n";
           echo "</table>\n";
          OCIFreeStatement($stmt);
          OCILogoff($db_conn);
        ?>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Do you need to uncomment one of the header() functions? Make sure
    it is called before any text or whitespace is sent.
    Look at the example in PHP 5 Code to Upload and Retrieve an Image (aka BLOB) with Oracle
    -- cj

  • How to convert varchar to BLOB in oracle 10g?

    Hi all,
    I have 2 columns A and B which are of varchar2(2000) dataype.
    I would like to concatinate these 2 columns and convert them into BLOB in oracle 10g.
    Any help is appreciated.
    Regards,
    Ravi

    don't use BLOB to store large text, use CLOB instead
    anyway:
    SQL> create table test
      2  (txt varchar2(10)
      3  ,other varchar2(10)
      4  );
    Table created.
    SQL>
    SQL> insert into test values ('some text', 'other text');
    1 row created.
    SQL>
    SQL> create table test2
      2  (col blob)
      3  /
    Table created.
    SQL>
    SQL> insert into test2
      2  select utl_raw.cast_to_raw (txt||other)
      3    from test
      4  /
    1 row created.
    SQL> select *
      2    from test2
      3  /
    SP2-0678: Column or attribute type can not be displayed by SQL*Plus
    SQL>
    SQL> select utl_raw.cast_to_varchar2(col)
      2    from test2
      3  /
    UTL_RAW.CAST_TO_VARCHAR2(COL)
    some textother text
    SQL>
    SQL> drop table test
      2  /
    Table dropped.
    SQL> drop table test2
      2  /
    Table dropped.

  • How to show BLOB type Column ? In XE

    How to show BLOB type Column as image in APEX report area? (In XE)
    I did it with the following procedure
    create or replace PROCEDURE MY_IMAGE_DISPLAY (p_image_id IN NUMBER)
    AS
    l_mime VARCHAR2 (255);
    l_length NUMBER;
    l_file_name VARCHAR2 (2000);
    lob_loc BLOB;
    BEGIN
    SELECT 'JPEG', MLOGO, 'IMAGE', DBMS_LOB.getlength (MLOGO)
    INTO l_mime, lob_loc, l_file_name, l_length
    FROM CARS_TABLE
    WHERE M_ID = p_image_id;
    OWA_UTIL.mime_header (NVL (l_mime, 'application/octet'), FALSE);
    HTP.p ('Content-length: ' || l_length);
    OWA_UTIL.http_header_close;
    WPG_DOCLOAD.download_file (lob_loc);
    END my_image_display;
    GRANT EXECUTE ON my_image_display TO PUBLIC;
    and executed the following command
    CREATE PUBLIC SYNONYM my_image_display FOR shema_name.my_image_display;
    but under XE , I can not see synonym? why?

    sakrami,
    Your question really belongs in the XE forum:
    Oracle Database Express Edition (XE)
    I think this posting addresses your question:
    Re: Handling of pictures changed? Item values not properly updated in Beta
    Joel

  • How to test BLOB Table Column in BCBrowser??

    Hi,
    My requirement is to upload a file(pdf,doc,jpg, txt) into DB using ADF.
    I use, Jdev 11.1.1.6, Oracle 10g XE.
    For this, I created the following
    1. A table as MyFilesTab(ID Number, FileName Varchar2(80), File BLOB)
    2. An Entity Object MyFilesEO on MyFilesTab.
    3. Generated a default view object: MyFilesVO
    4. Application Module : TestAM with view instance "MyFiles"
    But When I run TestAM, I see MyFiles as an Input textbox. So I cannot able to add a file that will be stored in my Table.
    Please help me out.

    Just to clarify, my previous post is related to title of this thread("How to test BLOB Table Column in BCBrowser??"),
    and not to "My requirement is to upload a file(pdf,doc,jpg, txt) into DB using ADF" 
    Dario

  • How to convert BLOB data into string format.

    Hi,
    I have problem while converting blob data into string format.
    for example,
    Select dbms_lob.substr(c.shape.Get_wkb(),4000,1) from geotable c
    will get me the first 4000 byte of BLOB .
    When i using SQL as i did above,the max length is 4000, but i can get 32K using plsql as below:
    declare
    my_var CLOB;
    BEGIN
    for x in (Select X from T)
    loop
    my_var:=dbms_lob.substr(x.X,32767,1)
    end loop
    return my_var;
    I comfortably convert 32k BLOB field to string.
    My problem is how to convert blob to varchar having size more than 32K.
    Please help me to resolve this,
    Thanx in advance for the support,
    Nilesh

    Nilesh,
    . . . .The result of get_wkb() will not be human readable (all values are encoded into some binary format).
    SELECT utl_raw.cast_to_varchar2(tbl.geometry.get_wkt()) from FeatureTable tbl;
    -- resulting string:
        ☺AW(⌂özßHAA
    Å\(÷. . . .You may also want to have a look at { dbms_lob | http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i1015792 } "The DBMS_LOB package provides subprograms to operate on BLOBs, CLOBs, NCLOBs, BFILEs, and temporary LOBs."
    Regards,
    Noel

  • How to put blob data in OS (help!?)

    hi,
    I am a beginner in oracle. Now i use sql*loader and put some jpg,rm files in blob(jpg->blob) , but,in reverse, i don't know how to extract blob and put it in my OS(blob->jpg).......>_<
    thanks
    d.t.

    Hi All,
    after searching lot on SDN, i found out that OLE concepts can not be used in WD ABAP environment. Please let me know if i am correct or not.
    as of now, i am building the excel and using below method to create it.
    *Create the Excel File
      cl_wd_runtime_services=>attach_file_to_response(
      i_filename = lv_filename
      i_content = lv_xstring
      i_mime_type = 'application/msexcel'
      i_in_new_window = abap_false
      i_inplace = abap_false ).
    The problem in above method is  that, i can not format the excel as i wanted. for e.g. i wanted to put values in particular cell, make it BOLD, italic etc.
    Is there any way to achive this? Please let me know.
    Thanks,
    Chandra

  • How to put blob to external file (Help!?)

    hi,
    I am a beginner in oracle. Now i use sql*loader and put some jpg,rm files in blob(jpg->blob) , but,in reverse, i don't know how to extract blob and put it in my OS(blob->jpg).......>_<
    thanks
    d.t.

    Just photos?
    File -> Export
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.
    Move the Library?
    Make sure the drive is formatted Mac OS Extended (Journaled)
    1. Quit iPhoto
    2. Copy the iPhoto Library from your Pictures Folder to the External Disk.
    3. Hold down the option (or alt) key while launching iPhoto. From the resulting menu select 'Choose Library' and navigate to the new location. From that point on this will be the default location of your library.
    4. Test the library and when you're sure all is well, trash the one on your internal HD to free up space.
    Regards
    TD

  • How can i invoke an Oracle Report w/in a Java application?

    I have a custom java application that I would like to integrate with a report tool. I am reviewing Oracle Reports but I was not sure how I would integrate an Oracle Report.
    I have read that I can use Active-X but. Has anyone ever done this? Also - is there any support for a java bean?
    I am also wondering how I could pass in report parameters.
    It is my understanding that Oracle will generate either pdf or html output which could be viewed through the browser or adobe acrobat reader.
    Is this correct?
    Please advise.
    Thanks in advance.

    Bonnie,
    I create a URL that calls Oracle Reports Server running under IAS, using PDF or html as the output. The Java code calls up the commandline and starts the default browser with the specified URL, which then talks to Oracle Reports Server... and voila... the report shows up in your browser!
    have fun...
    void execURL ( String pURL )
    System.out.println(pURL);
    if (System.getProperty("os.name").equals("Windows NT") )
    try
    Runtime.getRuntime().exec("cmd /c start "+pURL);
    catch (Exception e1) {System.out.println(e1.getMessage()); }
    else
    try
    Runtime.getRuntime().exec("start "+pURL);
    catch (Exception e2) {System.out.println(e2.getMessage());}
    null

  • How to create a new Oracle OSB project automaticaly with script without IDE

    Hello,
    I want to create automatically an "Oracle service bus project" and an "Oracle service bus configuration project" with scripts (ANT or Maven or ...) without using IDE, without using workshop or Eclipse. I want to create automatically (ANT or Maven) just a skeleton of an OSB project witch i can use after in workshop.
    I want to create 1 "Oracle service bus configuration project" with many "Oracle service bus project" automatically (ANT or Maven or scripts) witch i can use after in workshop. How to create a new Oracle OSB project automaticaly with script without IDE ? How can i do this ?
    I'm using Oracle service bus 10.3.1
    Thank you for your help.

    Thank you for your response,
    I do not want to just create the services (proxy services and business services) but I want to create a template for 40 OSB project with the same scripts ANT/Maven.
    Template="Oracle service bus configuration project" + "Oracle service bus project" + services of 40 OSB projects
    The goal is that I have more than 40 projects to create and just the name of the projects that changes (when I say the name of the project ie the name of the OSB project, the name of proxy services and the name of business services ).
    So I want to give my script (ANT/Maven) the name of 40 OSB project and the script must generate the skeleton of the 40 projects at once time and after generation of skeleton of the 40 project, I will import them in the workshop to add manually mapping and routing and other things that differs from one project to another.
    So i want to generate automatically a skeletons of 40 OSB projects using a script (ANT / Maven) and I give to the script juste the names of the 40 projects.
    I want to create a "Oracle service bus configuration project" and "Oracle service bus project" automatically of 40 OSB projects (ANT or Maven or scripts) witch i can use after in workshop.
    I want to create one 'template' of all 40 projects in the same time, with the same directory structure (Transforlation, Business services, proxy services, WSDL .....) and all 40 project have the same transport, just the names of projects and services witch changes and i can give to the script all names of projects and services and i can give also all WSDL.
    Regards,
    Tarik

  • How to see dbms_output on oracle sql developer

    ned immediate help
    how to see dbms_output on oracle sql developer

    Hi,
    In sql developer u have a tab named DBMS Output in your result sheet. In that the first Icon is Enable DBMS Output. turn it on (After on it will give the message set serveroutput on in the sheet) and then run your code.
    In the code u have to use the dbms_output.put_line package.after running the code u have to see the result in DBMS Output tab.
    Regards,
    NTR

  • How to extract data from oracle database directly in to bi7.0 (net weaver)

    how to extract data from oracle database directly in to bi7.0 (net weaver)? is it something do with EDI? can anybody explain me in detail?
    Thanks
    York

    You can use UDConnect to get from Oracle database in to BW
    <b>Data Transfer with UD Connect -</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/78/ef1441a509064abee6ffd6f38278fd/content.htm
    <b>Prerequisites</b>
    You have installed the SAP WAS J2EE Engine with BI Java components.  You can find more information on this in the SAP BW installation guide on the SAP Service Marketplace at service.sap.com/instguides.
    Hope it Helps
    Chetan
    @CP..

  • How to enforce index in oracle query

    Hi all
    how to enforce index in oracle query
    Regards

    Use INDEX hint to force Optimizer to use the specfied index.
    You really need to investigate why Optimizer doesn't choose the index. Remember, INDEX SCAN are not always GOOD.
    Jaffar

Maybe you are looking for

  • My Top up voucher won't work.

    I recently bought a second hand iPhone 5 because I had lost my other phone on a night out. It turns out it was locked to EE which is a network I have never used before. I was unsure whether to choose tmobile or orange as the network to top my phone u

  • Crystal Groups

    Hi, I have a problem in a report.  I want to do a group with the numbers of several invoces. I want to group by number. Imagine I have 20 rows and one of them doesn´t have any number. Well, when i refresh the data, Crystal it makes me a report just w

  • Diff... between  ALE, IDOC, RFC, BAPI, BADI --- Not clear and clarify

    Hi All     I am learning XI and the difference between " ALE, IDOC, RFC, BAPI, BADI "     Not clear and when to use what and how in point of XI ?    Pl..clarify me Adv..thanks and points --- Rakesh Behera

  • Is Parent-Child mandatory?

    Hi everyone, In my model i have this dimension which it's hirarchy is an unbalanced hirarchy In my fact table the reference key to this dimension can be in different levels: leaf level and non-leaf levels Now, one solution is a parent-child hirarchy

  • During the installation of the rpm package of Oracle 11g XE,  Error occur "cpio:digest mismatch"

    It is not possible to install the following error occurs. [root @ localhost Disk1] # rpm -ivh --nodigest oracle-xe-11.2.0-1.0.x86_64.rpm preparing... ################################# [100%] Updating / Installing ...     1: oracle-xe-11.2.0-1.0 #####