About Lob Locators

Could any body of u help me to understand the functions done by LOB LOCATORS and how it is used to return the Actual value of LOB Columns, as i am unable to visualize even after reading the Documentation.
Thanks in advance
Rajan .

You can use a PL/SQL table of raw(32767) to transfer blob data to a remote site. Simply write a proc which reads blob into this table and pass it to remote proc which converts it back to blob.
=============================================
type vc_ary is table of raw(32767) index by binary_integer;
function lob_to_ary (loc in blob) return vc_ary
is
ary vc_ary;
pos integer := 1;
len integer := DBMS_LOB.getlength (loc);
begin
loop
ary(ary.count) := DBMS_LOB.substr (loc, 2000, pos);
pos := pos + 2000;
exit when pos > len;
end loop;
return ary;
end;
procedure ary_to_lob (loc in out nocopy blob, ary in vc_ary) is
begin
if ary.count > 0 then
for j in ary.first..ary.last loop
DBMS_LOB.writeappend (loc, length (ary(j)), ary(j));
end loop;
end if;
end;
null

Similar Messages

  • ORA 22990 - LOB locators cannot span transactions

    All our composites work fine in dev env which is multi-domain. However, upon deploying them to single-domain DTE env, all of them throw same error -
    ORA 22990 - LOB locators cannot span transactions
    In fact, one of the composites is just fyi notification to a certain set of assignees; nothing fancy there. I suspect, it has something to do with our env or deployment but can't figure out, what's wrong. Logs also don't reveal much. Any pointers are appreciated.

    Oops!
    Solution found: I must have set autocommit to false.
    Sorry for post.
    Thanks, Oleg.
    "Oleg Fainitsky" <[email protected]> wrote in message
    news:[email protected]..
    java.io.IOException: ORA-22990: LOB locators cannot span transactions
    ORA-06512: at "SYS.DBMS_LOB", line 708
    ORA-06512: at line 1
    This exception occures when trying to write CLOB:
    Clob c = rs.getClob(1);
    oracle.sql.CLOB oclob = (oracle.sql.CLOB) c;
    Writer writer = oclob.getCharacterOutputStream();
    writer.write(res);
    writer.flush(); // exception here!
    writer.close();
    conn.commit();
    It occures when I use DATASOURCE or TX_DATASOURCE.
    Are there any ideas about how to work it around?
    Thanks, Oleg.

  • PL/SQL: ORA-22992: cannot use LOB locators selected from remote tables

    Dear ALL,
    My O/S is Redhatlinux 5.2 and i had Migrated my Oracle databse to 11g2. But after that while i am retrieving records through dblinks from one of my other Oracle 9.2.0.8 databse it's throwing the error : PL/SQL: ORA-22992: cannot use LOB locators selected from remote tables.* This error i am getting in TOAD as well as SQL Developer.
    Can anybody tell me how to fix this error ? Because am not able to get the records.
    Also am getting another error during retrieving data from some of my tables after migrating i.e the table which having CLOB data type while am accessing to retrieve the records using select query it's throwing the error :
    +(The following error has occurred:+
    A query with LOB's requires OCI8 mode, but OCI7 mode is used.)
    If anyone having any idea kindly share.
    Thanks and Regards
    Biswa

    Hi,
    Ya what u sent that is fine. But already am using one procudure which is accessing LOB data from another databse through DBlink and working fine. But there Both the databse are 9.2.0.8.
    But while am executing the same procedure in oracle 11g where the Dblink accessing the data from Oracle 9i , there am getting this error.
    Kindly tell if u know any resolution.
    Thanks

  • LOB locators cannot span transactions

    Hi,
    I'm trying to call an Oracle stored procedure with one of the parameters being a Clob.
    First I select a clob from a temporary table, manipulate it and then call the stored procedure.
    I always get the error "java.sql.SQLException: ORA-22990: LOB locators cannot span transactions"
    Until then neither the Oracle Connection nor the Statement are closed.
    Here's the part of code:
    // get the CLOB
    String sql = "SELECT XMLDOC,DOCNAME FROM XML_DOCUMENTS WHERE DOCNAME = 'Auftrag_2001-00018.xml' FOR UPDATE";
    stmt = oracleConnection.createStatement();
    ResultSet rs = stmt.executeQuery(sql);
    while (rs.next()) {
    ClobOut = (CLOB)rs.getObject("XMLDOC");
    // Call the stored procedure
    OracleCallableStatement cs = (OracleCallableStatement) oracleConnection.prepareCall("begin ? :=setAuftrag(?,?); end;");
    cs.registerOutParameter(1, Types.INTEGER);
    cs.setString(2,"tmp_schaetzauftrag");
    cs.setClob(3, ClobOut);
    cs.execute();

    I'm afraid yout solution won't work for me
    I need to send the contents of an xml file to this stored procedure. The procedure contains a mechanism to store the data from the xml file into different tables.
    Since I cannot create a new CLOB in Java I take an existing one, change it and send it to the stored procedure.
    If I had only one procedure with a Clob as Parameter I would store it in a temporary table and access it from the procedure itself, but I already have several existing procedures that need an Clob so I was looking for a way to do it without having to change them.

  • EXCEPTION: ORA-22990: LOB LOCATORS CANNOT SPAN TRANSACTIONS

    We hit a brand new BPEL error during Volume Test:
    EXCEPTION: ORA-22990: LOB LOCATORS CANNOT SPAN TRANSACTIONS
    Anyone seen this ? The OC4J BPEL java process started to consume vast amounts of CPU but I'm not sure if this was the cause of effect. I'm sort of hoping it was the result of this error - if it isn't we have another root cause to try and figure out! We're using BPEL 10.1.2.0.2.
    Rob J

    sorry for the delay, i was not checking the otn forum for a while.
    Do you see any other errors before this LOB errors in the log file? This is important, you should see some errors (e.g. cmt error or some other error related to jta transaction)
    we had this lob locater issue in 10.1.2.0.0 and a mandatory oc4j patch is available for 10.1.2.0.0.
    But if you are using 10.1.2.0.2 the patch should be included but i suspect the patch is not taking effect because patch gets applied after the bpel ejb-bean class generation.
    the solution
    -remove the application-deployments/orabpel directory completely (just to be safe...please backup before delete)
    - restart the server with -DKeepWrapperCode=true system property in opmn.xml for OC4J_BPEL, this flag would generate stub .java files under j2ee/home or j2ee/home/application-deployments/orabpel/generated directory
    - please upload these regenerated java files to SR
    this will force to regenerate the bpel ejb stub classes which should fix this issue.

  • Help on BFILE and lob locators.

    I need to load images on my directory(IMGDIR) going to database table(T_IMG) but an error message Invalid lob locator appears. What seems to be the problem on my code, thanks
    CREATE TABLE T_IMG
    rec_id VARCHAR2(10 BYTE),
    image BLOB,
    rev_date TIMESTAMP(6),
    image_name VARCHAR2(50 BYTE),
    mime VARCHAR2(50 BYTE)
    DECLARE
    v_bfile BFILE;
    v_image BLOB;
    v_dot_pos NUMBER;
    v_mime VARCHAR2(50);
    v_filename VARCHAR2(100);
    v_rec_id VARCHAR2(12);
    BEGIN
    v_bfile := BFILENAME('IMGDIR', v_filename);
    dbms_lob.fileopen(v_bfile,dbms_lob.file_readonly);
    LOOP
    BEGIN
    SELECT 'PIC' || TO_CHAR (images_seq.NEXTVAL, 'FM0XXXXXXX') INTO v_rec_id FROM DUAL;
    v_dot_pos := INSTR(v_filename,'.');
    v_mime := 'image/'||SUBSTR( v_filename,v_dot_pos+1,LENGTH(v_filename) );
    INSERT INTO T_IMG (rec_id, image, rev_date, image_name, mime)
    VALUES (v_rec_id, EMPTY_BLOB(), SYSTIMESTAMP, v_filename, v_mime)
    RETURNING image INTO v_image;
    dbms_lob.loadfromfile(v_image,v_bfile,dbms_lob.getlength(v_bfile) );
    COMMIT;
    EXCEPTION
    WHEN no_data_found THEN
    exit;
    END;
    END LOOP;
    dbms_lob.fileclose(v_bfile);
    END;
    ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275
    ORA-06512: at "SYS.DBMS_LOB", line 635
    ORA-06512: at line 12

    Hi,
    I have no problem with this (I removed the loop):
    DECLARE
       v_bfile    BFILE;
       v_image    BLOB;
       v_dot_pos  NUMBER;
       v_mime     VARCHAR2(50);
       v_filename VARCHAR2(100) := 'test.jpg';
       v_rec_id   VARCHAR2(20);
    BEGIN
       v_bfile := BFILENAME('EXT_FILES' /*'IMGDIR'*/,
                            v_filename);
       dbms_lob.fileopen(v_bfile,
                         dbms_lob.file_readonly);
       BEGIN
          SELECT 'PIC' || TO_CHAR(images_seq.NEXTVAL,
                                  'FM0XXXXXXX')
            INTO v_rec_id
            FROM DUAL;
          v_dot_pos := INSTR(v_filename,
          v_mime    := 'image/' || SUBSTR(v_filename,
                                          v_dot_pos + 1,
                                          LENGTH(v_filename));
          INSERT INTO T_IMG
             (rec_id,
              image,
              rev_date,
              image_name,
              mime)
          VALUES
             (v_rec_id,
              EMPTY_BLOB(),
              SYSTIMESTAMP,
              v_filename,
              v_mime)
          RETURNING image INTO v_image;
          dbms_lob.loadfromfile(v_image,
                                v_bfile,
                                dbms_lob.getlength(v_bfile));
          COMMIT;
       EXCEPTION
          WHEN no_data_found THEN
             NULL; -- You must replace this for proper handling
       END;
       dbms_lob.fileclose(v_bfile);
    END;
    /Regards,

  • About lob object count on dba_objects view

    Hi Everyone,
    This is my oracle version,
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE     11.2.0.2.0     Production"
    TNS for HPUX: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    I am having a doubt in number of lob object counts between the views dba_objects and dba_lobs., Find below the query output..,
    select count(*) from dba_lobs where owner='ABC';
    43
    select count(*) from dba_objects where owner='ABC' and object_type='LOB';
    148
    Can anyone tell me the cause for this?
    Regards,
    Jai

    Hm I have a sandbox database I dont have the same issue in any of the schemas.
    SQL> select count(*),owner from dba_lobs group by owner order by 2;
           155 APEX_030200
             2 CTXSYS
             2 EXFSYS
             1 FLOWS_FILES
           214 MDSYS
             2 OLAPSYS
             9 ORDDATA
             1 OUTLN
             2 SBIP_AMAZON_BP
             4 SBIP_BET
             4 SBIP_BET_BP
            10 SBIP_MARKET
            10 SBIP_MARKET_BP
             5 SPORTING_BET
           174 SYS
            75 SYSMAN
            25 SYSTEM
             9 WMSYS
           586 XDB
    19 rows selected.
    SQL> select count(*),owner from dba_objects where object_type='LOB' group by owner order by 2;
           155 APEX_030200
             2 CTXSYS
             2 EXFSYS
             1 FLOWS_FILES
           214 MDSYS
             2 OLAPSYS
             9 ORDDATA
             1 OUTLN
             2 SBIP_AMAZON_BP
             4 SBIP_BET
             4 SBIP_BET_BP
            10 SBIP_MARKET
            10 SBIP_MARKET_BP
             5 SPORTING_BET
           174 SYS
            75 SYSMAN
            25 SYSTEM
             9 WMSYS
           586 XDB
    19 rows selected.Edited by: Zoltan Kecskemethy on Jun 7, 2013 11:28 AM
    my version is Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

  • ORA-22992: cannot use LOB locators selected from remote tables

    Has anyone had this error msg before?
    Thx .

    If you want, you could facilitate your process with a global temporary table as follows:
    SQL> create global temporary table clob_temp (
      2  id         number,
      3  test_clob  clob)
      4  on commit delete rows;
    Table created.
    SQL> Create or Replace procedure run_clob (p_id in number, p_file_name in varchar2)
      2    AS
      3       l_clob          clob;
      4       l_bfile         bfile := BFILENAME ('TEMP_DIR', p_file_name);
      5  begin
      6      insert into clob_temp values (p_id, empty_clob() )
      7               returning test_clob into l_clob;
      8      DBMS_LOB.OPEN(l_bfile, DBMS_LOB.LOB_READONLY);
      9      DBMS_LOB.LOADFROMFILE(l_clob, l_bfile, DBMS_LOB.getlength(l_bfile));
    10      DBMS_LOB.CLOSE(l_bfile);
    11      insert into clob_table@dlog_link (id, test_clob)
    12               select * from clob_temp;
    13      commit;
    14  end;
    15  /
    Procedure created.
    SQL> select count(*) from clob_table@dlog_link;
      COUNT(*)
             0
    SQL> exec run_clob (1, 'clobtest.txt')
    PL/SQL procedure successfully completed.
    SQL> select count(*) from clob_table@dlog_link;
      COUNT(*)
             1

  • Oracle 8i array DML operations with LOB objects

    Hi all,
    I have a question about Oracle 8i array DML operations with LOB objects, both CLOB and BLOB. With the following statement in mind:
    INSERT INTO TABLEX (COL1, COL2) VALUES (:1, :2)
    where COL1 is a NUMBER and COL2 is a BLOB, I want to use OCIs array DML functionality to insert multiple records with a single statement execution. I have allocated an array of LOB locators, initialized them with OCIDescriptorAlloc(), and bound them to COL2 where mode is set to OCI_DATA_AT_EXEC and dty (IN) is set to SQLT_BLOB. It is after this where I am getting confused.
    To send the LOB data, I have tried using the user-defined callback method, registering the callback function via OCIBindDynamic(). I initialize icbfps arguments as I would if I were dealing with RAW/LONG RAW data. When execution passes from the callback function, I encounter a memory exception within an Oracle dll. Where dvoid **indpp equals 0 and the object is of type RAW/LONG RAW, the function works fine. Is this not a valid methodology for CLOB/BLOB objects?
    Next, I tried performing piecewise INSERTs using OCIStmtGetPieceInfo() and OCIStmtSetPieceInfo(). When using this method, I use OCILobWrite() along with a user-defined callback designed for LOBs to send LOB data to the database. Here everything works fine until I exit the user-defined LOB write callback function where an OCI_INVALID_HANDLE error is encountered. I understand that both OCILobWrite() and OCIStmtExecute() return OCI_NEED_DATA. And it does seem to me that the two statements work separately rather than in conjunction with each other. So I rather doubt this is the proper methodology.
    As you can see, the correct method has evaded me. I have looked through the OCI LOB samples, but have not found any code that helps answer my question. Oracles OCI documentation has not been of much help either. So if anyone could offer some insight I would greatly appreciate it.
    Chris Simms
    [email protected]
    null

    Before 9i, you will have to first insert empty locators using EMPTY_CLOB() inlined in the SQL and using RETURNING clause to return the locator. Then use OCILobWrite to write to the locators in a streamed fashion.
    From 9i, you can actually bind a long buffer to each lob position without first inserting an empty locator, retrieving it and then writing to it.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by CSimms:
    Hi all,
    I have a question about Oracle 8i array DML operations with LOB objects, both CLOB and BLOB. With the following statement in mind:
    INSERT INTO TABLEX (COL1, COL2) VALUES (:1, :2)
    where COL1 is a NUMBER and COL2 is a BLOB, I want to use OCIs array DML functionality to insert multiple records with a single statement execution. I have allocated an array of LOB locators, initialized them with OCIDescriptorAlloc(), and bound them to COL2 where mode is set to OCI_DATA_AT_EXEC and dty (IN) is set to SQLT_BLOB. It is after this where I am getting confused.
    To send the LOB data, I have tried using the user-defined callback method, registering the callback function via OCIBindDynamic(). I initialize icbfps arguments as I would if I were dealing with RAW/LONG RAW data. When execution passes from the callback function, I encounter a memory exception within an Oracle dll. Where dvoid **indpp equals 0 and the object is of type RAW/LONG RAW, the function works fine. Is this not a valid methodology for CLOB/BLOB objects?
    Next, I tried performing piecewise INSERTs using OCIStmtGetPieceInfo() and OCIStmtSetPieceInfo(). When using this method, I use OCILobWrite() along with a user-defined callback designed for LOBs to send LOB data to the database. Here everything works fine until I exit the user-defined LOB write callback function where an OCI_INVALID_HANDLE error is encountered. I understand that both OCILobWrite() and OCIStmtExecute() return OCI_NEED_DATA. And it does seem to me that the two statements work separately rather than in conjunction with each other. So I rather doubt this is the proper methodology.
    As you can see, the correct method has evaded me. I have looked through the OCI LOB samples, but have not found any code that helps answer my question. Oracles OCI documentation has not been of much help either. So if anyone could offer some insight I would greatly appreciate it.
    Chris Simms
    [email protected]
    <HR></BLOCKQUOTE>
    null

  • ORA_22290 error while using LOB's

    "ErrMsg: ORA-22990: LOB locators cannot span transactions, Code: -22990"
    can somebody help what this error means, and how to resolve it.
    Regards,
    Mani

    ORA-22990: LOB locators cannot span transactions
    Cause: A LOB locator selected in one transaction cannot be used in a different transaction.
    Action: Re-select the LOB locator and retry the operation.
    For future, you can view
    http://tahiti.oracle.com/pls/db102/db102.error_search?

  • Regarding lobs...

    I am not that familiar with LOBs, and was hoping someone could shed some light for me.
    I am running Oracle 11.2.0.2 EE, and have made an interesting discovery of this new database that i am responsible.
    First, I found out that I have a table that is about 7.4G, but it has two LOB columns that when I query dba_lobs, I found that they contains 365G of lobs and the table itself has 22G of LOBS - not sure what is the difference.
    SQL> 1  select segment_name, round(sum(bytes)/1024/1024/1024,1) as "SIZE" , segment_type
      2  from dba_segments where owner = 'ARADMIN'
      3  group by segment_name, segment_type
      4  having round(sum(bytes)/1024/1024/1024,1) > 1
      5* order by 2
    SEGMENT_NAME                                SIZE SEGMENT_TYPE
    SYS_LOB0000077517C00027$$                    4.2 LOBSEGMENT
    SYS_LOB0000210343C00029$$                    4.4 LOBSEGMENT
    SYS_LOB0000077480C00002$$                    4.6 LOBSEGMENT
    T465                                           5 TABLE
    T2052                                        8.3 TABLE
    T2115                                       12.4 TABLE
    T2444                                       13.4 TABLE
    T2179                                       14.8 TABLE
    T2192                                       21.8 TABLE
    SYS_LOB0000077549C00015$$                    182 LOBSEGMENT   <=== (related to table T2192)
    SYS_LOB0000077549C00016$$                  184.4 LOBSEGMENT  <=== (related to table T2192)
    30 rows selected.Now, let's look at the which table these LOBS belong...
    SQL> select table_name, column_name, segment_name
      2  from dba_lobs
      3  where segment_name in (
      4  select segment_name from dba_segments where owner = 'ARADMIN'
      5   having round(sum(bytes)/1024/1024/1024,1) > 1
      6  group by segment_name
      7  )
      8  /
    TABLE_NAME                       COLUMN_NAME                      SEGMENT_NAME
    B1947C536880923                  C536880923                       SYS_LOB0000077310C00002$$
    T2051                            C536870998                       SYS_LOB0000077426C00041$$
    T2052                            C536870987                       SYS_LOB0000077440C00063$$
    T2115                            C536870913                       SYS_LOB0000077463C00009$$
    B2125C536880912                  C536880912                       SYS_LOB0000077480C00002$$
    B2125C536880913                  C536880913                       SYS_LOB0000077483C00002$$
    T2179                            C536870936                       SYS_LOB0000077517C00027$$
    T2192                            C456                             SYS_LOB0000077549C00015$$   <====
    T2192                            C459                             SYS_LOB0000077549C00016$$   <====
    T2444                            C536870936                       SYS_LOB0000210343C00029$$
    T1990                            C536870937                       SYS_LOB0000250271C00026$$
    11 rows selected.So, from the above, I noticed in the first query that the table T2192 itself contains 21.8G of LOBS, and, that the columns C456 and C459 of same table contain a total of (181.7+183.9) = 365.6G.
    First question is how can the table be only 21.8G, and the lob segments of the table columns be 365.6G of Lobs?
    It seems some lobs must be external, while others are part of the actual table.
    Next, I am wondering if a row is deleted from the table, would the lobs associated with that row that are referenced by columns C456 and C459 also be deleted.
    Discussing this with our Sr. Developer, he says the table is purged of rows older than 6 months, but my question is whether the Lobs are actually purged with the rows.
    Any ideas?
    Edited by: 974632 on Dec 27, 2012 8:05 AM

    Hi John,
    Reading note 386341.1, this is pretty messed up about lobs.
    First, the UNDO data for a LOB segment is kept within the LOB segment space, e.g., when lobs are deleted, etc. Yuck!
    So, you are right about the space eventually being returned to the database, but surely we can do better than that!
    Then, when we check for the size of the lobs using dbms_lob.getlength, (since we are using AL32UTF8), it returns it in the number of characters instead of bytes.
    So, then we have to convert - ref. note 790886.1. An enhancement request via Bug 7156454 has been filed to get this functionality and is under consideration by development.
    So, how does one (safely) clean up lobs that have been deleted in the database?
    It seems that doing an alter table... 'move lob' might work, and also an alter table ... modify lob (...) (shrink space [cascade]);
    But with this being production, I'm very concerned about all the related bugs, even though I am on 11.2.0.2.
    WARNING : shrinking / reorganizing BASICFILE lobs can cause performance problems due to "enq: HW contention" waits
    Serious LOB corruption can occur after an
    ALTER TABLE <table> MODIFY LOB ("<lob_column>") (STORAGE (freelists <n>));
    has been issued on a LOB column which resides in a manual space managed tablespace. Subsequent use of the LOB can fail with various internal errors such as:
    ORA-600 [ktsbvmap1]
    ORA-600 [25012]
    For more information, please refer to bug 4450606.
    #2. Be aware of the following bug before using the SHRINK option in releases which are <=10.2.0.3:
    Bug: 5636728 LOB corruption / ORA-1555 when reading LOBs after a SHRINK operation
    Please check:
    Note.5636728.8 Ext/Pub Bug 5636728 - LOB corruption / ORA-1555 when reading LOBs after a SHRINK operation
    for details on it.
    #3. Be aware that, sometimes, it could be needed to perform the shrink operation twice, in order to avoid the:
    Bug:5565887 SHRINK SPACE IS REQUIRED TWICE FOR RELEASING SPACE.
    is fixed in 10.2.From looking at note: 1451124.1, it seems the best options are:
    1) alter table move (locks the table, and requires additional space of at least double the size of the table).
    2) do an export / drop the table / and reimport - again downtime required.
    Neither option are possible in our environment.

  • Error In Distributed Query moving LOB

    The following error has occurred:
    ORA-22992: cannot use LOB locators selected from remote tables
    ORA-02063: preceding line from BMB5_ADM
    ORA-02063: preceding 2 lines from BMB18CU3
    Query:
    INSERT INTO IMAGE@BB18C3
    SELECT B.*
    FROM IMAGE@BB17CS B,INV@BB17CS I
    WHERE B.ref_no = I.ref_no AND B.ref_resets = I.ref_resets AND I.a_no = 70
    Is there a way around moving a LOB from one database to the next. I can not use Import/Export it has to be done as part of a query.
    Thanks,
    Gavin

    Gavin,
    Had same problem... see thread entitled "ORA 22992 -- silly" in the PL/SQL and SQL forum.
    Barbara lists a link that spells out two workarounds (only one that would work for BLOBs though).
    Thanks,
    Adam

  • Oracle LOB Documentation

    The following is not a question and I am not requesting a response but rather posting this for informational purposes as was requested by the docs team.
    A few weeks back as the result of a thread I can not currently locate, questions were raised with respect to Oracle's documentation about LOBs and I stated that I would pursue it getting the docs fixed.
    I now have the response and, with names removed, am posting the thread for anyone interested in the topic.
    From: Janis [email protected] <[email protected]>
    Date: Tue, Jan 24, 2012 at 12:40 PM
    Subject: Re: Oracle Docs Issue *** ADLOB forum issue: tablespace separate from table containing LOB
    To: damorgan11g @ gmail.com
    Cc: Eric ... <[email protected]>
    Dan,
    You have two somewhat related issues here and I have divided them up.
    See inline notes
    Best,
    Janis
    On 11/27/2011 10:54 PM, Daniel Morgan wrote:
    Thanks Eric ... Hi Janis
    Thank you for taking a look at this. The way modern SANs are configured, and so many of us using ASM it is my expectation that those "different" tablespaces
    could be on the same disk whereas the two segments in the same tablespace might be miles of stripe away from each other. In short I can not conceive of
    how it could matter.
    I look forward to learning what you find out during your investigations.
    Also, as you are rewriting the book, it would be great if you could bring together, in one place, the regular functions that now support LOBS
    (for example LENGTH), the DBMS_LOB functionality, and far clearer explanations of CHUNK and NOCACHE and other bits of related functionality.
    We don't so much need definitions as we need clarity as to when and how to use them.
    Here's one example:
    http://docs.oracle.com/cd/E11882_01/appdev.112/e10777/ch_dba.htm#IMURG11685
    what, one might wonder, is the default if CHUNK is not specified?
    Thank you.
    Daniel A. Morgan
    Oracle ACE Director
    The Multimedia book will add a note to see the Packages guide, chapter on DBMS_LOB for specifics of various methods  etc.
    http://st-doc.us.oracle.com/11/112/appdev.112/e25788/d_lob.htm#autoId0
    As far as CHUNK goes, it is a basic parameter defined (with default) in the SQL Reference Guide  (SQLRF). In the context of the discussion,
    it relates to create table.
    The definition is  found here:
    http://st-doc.us.oracle.com/11/112/server.112/e26088/statements_7002.htm?term=Chunk#SQLRF54527
    CHUNK integer  Specify the number of bytes to be allocated for LOB manipulation. If integer is not a multiple of the database block size, then the
    database rounds up in bytes to the next multiple. For example, if the database block size is 2048 and integer is 2050, then the database allocates
    4096 bytes (2 blocks). The maximum value is 32768 (32K), which is the largest Oracle Database block size allowed. The default CHUNK size is one
    Oracle Database block. The value of CHUNK must be less than or equal to the value of NEXT, either the default value or that specified in the
    storage_clause. If CHUNK exceeds the value of NEXT, then the database returns an error. You cannot change the value of CHUNK once it is set.
    As far as your suggestion for consolidation, yes, in some areas of the ADLOB book, this is true and I am working on it.
    Continue below
    On Sun, Nov 27, 2011 at 9:39 PM, Eric ... <[email protected]> wrote:
    Hi Daniel,
    Thanks for the detailed feedback. 
    Your timing is perfect.  I've just assigned the LOBs book to Janis. 
    Janis: Can you please investigate and respond when you've got it sorted out.
    Thanks,
    -Eric
    On 11/27/2011 8:34 PM, Daniel Morgan wrote:
    The links in question are:
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28393/adlob_tables.htm
    http://docs.oracle.com/cd/B19306_01/appdev.102/b14249/adlob_tables.htm#i1006434
    What is of specific concern is this statement on both pages.
    Best performance for LOBs can be achieved by specifying storage for LOBs in a tablespace different from the one used for the table that contains the LOB.
    I personally don't believe it and my limited testing over the weekend seems to confirm my suspicion. The comment has the distinct feeling of having been
    written by the same misguided sole that thought best performance could be had by putting tables and indexes into separate tablespaces. Today we all
    know that was pure mythology but for a decade everyone quoted the Oracle 7.x docs as supporting the idea.
    In a world of virtualized storage, striping, and multi-user systems the statement does not ring true. Please have the author either remove it or justify it then
    post a clarification to this thread.Re: Separate LOB tablespace
    Daniel, I have the following response from the development team, please convey this to the forum for us:
    Choice of tablespaces for different objects is a complex issue that is not amenable to summarization.  Every rule/statement on the topic (including the one
    in the docs) has scenarios where it is justified, and scenarios
    where it is not.
    If the concern is about the seeming categorical nature of the current statement, just remove it [removed: doc team].  There is no way to make that
    statement less categorical and simultaneously useful and actionable.
    Per the developer's request, I am removing the paragraph from the SecureFiles and Large Objects Guide.
    Best,
    Janis

    I am not kidding. I posted the link but I did not check if it were the same source. Really I do not have time to realize it.
    I think you can get a fast answer in SQL & PL/SQL forum.
    Good Luck!
    Joel Pérez

  • Select with CLOB datatype

    Hi all....
    I must create a view to retrieve the data from a table "texto_email" ... and that table has a field named Texto - datatype CLOB. This field has some html definitions and formating tags.
    but when i create the view, i get a error in plsql saying "view created with compilation errors"
    when i coment " -- " the line responsable for the CLOB field, its created sucesful.
    what I´m doing wrong? there´s a something diferent to do in this case?
    that is my view... if someone can help...
    CREATE OR REPLACE FORCE VIEW vw_texto_email
    AS
    SELECT DISTINCT
    te.id_texto_email
    ,te.id_texto_email_tipo as id_tet
    ,te.data_cadastro
    ,te.data_inicio
    ,te.descricao
    ,te.assunto
    ,te.texto AS texto ---- that is the CLOB field -
    ,tet.descricao as tipo_email
    FROM
    texto_email te
    ,texto_email_tipo tet
    WHERE
    te.id_texto_email_tipo = tet.id_texto_email_tipo
    tnks....

    To work with LOBs you have to know something about the concept of a LOB locator( a short tour in the documentation would be appreciable).
    A LOB locator is a pointer to large object data in a database.
    Database LOB columns store LOB locators, and those locators point to the real data stored in a LOB data.
    To work with LOB data, you have to:
    1) Retrieve LOB locator
    2) Use a built-in package named DBMS_LOB to modify LOB
    2.1 Open lob
    2.2 ...
    2.3 read/write LOB
    2.4 close LOB
    Why do you want to retrieve a lob locator in a view?
    Stated that you could retreive its state in :
    1 null
    2 empty
    3 populated with a valid pointer to data

  • How can you SELECT via Database Link CLOB data using Application Express?

    Customer Issue:
    Developer using Oracle's Application Express 3.1. The Developer is trying to SELECT a CLOB datatype column from a remote (10.2.0.3) database, via a database link on her 10.2.0.4 based client Application. The Developer wants to be able to select CLOB data from the remote database which has limitation that she can't make any changes to the remote database.
    Developer's Comments:
    I do a select and get the error. Getting error ORA-22992: cannot use LOB locators selected from remote tables. So she feels she can't use dbms_lob.substr in this configuration I can do a "select into" but that is for one value. I am trying to run a select statement for a report that brings back more than one row. I do not have permission to change anything on the remote database. I want to access the remote database and multiple tables.
    This is not something I work with, would greatly appreciate help or ideas. Is this a limitation of the 3.1; or does she just not have this set up correctly; or should she be using a Collection (if yes, please share example)
    Thanks very much,
    Pam
    Edited by: pmoutrie on Jun 4, 2009 12:01 PM
    Hello???
    Would really appreciate an answer.
    Thanks,
    Pam

    This may not be a perfect solution for you but it worked for my situation.
    I wanted to grab some data from Grid Control's MGMT$JOB_STEP_HISTORY table but I couldnt' create an Interactive Report due to the existance of a CLOB column. I cheated this by creating a view on the GC DB, grabbing the first 4000 characters and turning it into a varchar2 column:
    create view test_job_step_history as
    select job_Name, target_name, status, start_time, end_time, to_char(substr(output,1,4000)) output
    from MGMT$JOB_STEP_HISTORY where trunc(end_time) > trunc(sysdate)-90
    In an APEX Interactive Report:
    select * from test_job_step_history@GCDB
    Granted, the output looks aweful right now but I am only looking for a very particular output (failed, denied, ORA-, RMAN-, etc) so the formatting isn't the most important thing to me right now.
    If anyone can improve -- and I'm sure you can -- on this I'd love to hear about it.
    Thanks,
    Rich

Maybe you are looking for

  • URGENT -Material Sales text

    where will store the Sales text which we maintained in the Material master record. Can any body help me to solve this problem. Plz treat as urgent basis. Thx Ramesh.B

  • Airport Express as wireless repeater

    Hi all, just wondering if anyone could give me a hand. I have just bought an Airport Express (not arrived just yet) not just for streaming music, but for extending my network. I am a student and have just moved into my new house. The internet here al

  • ColdFusion 10 mod_jk won't compile for Apache HTTPD 2.4.6

    Making all in apache-2.0 make[1]: Entering directory `./src/connector-source/native/apache-2.0' ./apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I./httpd/include  -DHAVE_CONFIG_H -DUSE_APACHE_MD5 -I ../common -I /include -I /include/unix

  • Delta Skymiles AMEX Gold Approved with Bankruptcy!!

    Just got an instant approval online!!  Credit line is $2,000.  I have applied about 4 times for this card over the past few years, declined each time.  They checked Experian my Fico score is 664 and I have 30+ inquires (i'm a credit junkie too...I ha

  • SD Billing Document Number Ranges exhausted

    hi, we have used separate number range for billing document for each plant. further within each plant uses five ranges - separate for Invoice, Sales Return, Credit Note, Debit Note & cancellation. we have used all possible combinations in FBN1. now t