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

Similar Messages

  • 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

  • Insert into local table as select from remote tables

    Hi all,
    In Oracle DB version 11g i have the following issue:
    I want to insert into a table in the current schema as selecting data from two remote tables. I execute the insert in portions of data. Firstly, when the target table where i want to insert is empty the Select as Insert is being executed very fast. But after every insert i made , the performance became worse than the previous one. I have no FKs or indexes in the local table/target table where i'm inserting/... I tried using /*+ append*/ hint but no success...what should be the reason of that?
    Thanks in advance,
    Alexander.

    a.stoyanov wrote:
    Hi all,
    In Oracle DB version 11g i have the following issue:
    I want to insert into a table in the current schema as selecting data from two remote tables. I execute the insert in portions of data. Firstly, when the target table where i want to insert is empty the Select as Insert is being executed very fast. But after every insert i made , the performance became worse than the previous one. I have no FKs or indexes in the local table/target table where i'm inserting/... I tried using /*+ append*/ hint but no success...what should be the reason of that?
    Thanks in advance,
    Alexander.How should we know? You don't give enough information to be able to tell. Not even the SQL involved.
    Please read {message:id=9360002} and {message:id=9360003}
    and follow the advice given.

  • Select  from remote table

    Hi, i have two user schemas.
    BIQUERYRHTST and BIETLRHTST
    On BIQUERYRHTST, i have a database link.
    and i execute the following sentence
    select * from [email protected], and it works correctly.
    If i want to execute the same select on BIETLRHTST, what permissions does i need?
    Without have to create the dblink on BIETLRHTST
    Thanks

    Check more information about CREATE DATABASE LINK
    If you created a private database link as mentioned in the doc, you can't share it with other user. Create a public database link instead.

  • ORA-22990 ( Cannot span lob... ) while using connection pooling...

    Hi all, I am maintaining a web site that has lots of requests ( about 10 requests a second ) to an Oracle table that has a BLOB field. Those requests create new blobs, updates them and reads them... My program worked fine until I started using connection pooling ( Before that, I used a single connection that was initialized at startup ). Although I had to synchronized the methods that interact with blob field, everything worked great. So now, to optimize my site, I want to use connection pooling so that even if my methods are synchonized on the connection object, there will be more than one connection available so it will not affect performance.
    So once I introduced my connection pooling system with the oracle.jdbc.pool.OracleConnectionCacheImpl class, I started getting ORA-22990 ( Cannot span lob objects... ). I get the error on the flush() method when I try to write the blob to the database. Here is my function that writes a row in the databse.
      private synchronized void writeSession(CapSession pSession) throws Exception
            javax.sql.PooledConnection pc = pool.getPooledConnection();
            Connection conn = pc.getConnection();
            CallableStatement stmt=conn.prepareCall(writeObjSQL);
            stmt.setString(1,pSession.getSessionId()+pSession.getPassword());
            stmt.setLong(2,pSession.getLastAccess());
            stmt.setLong(3,pSession.getTimeout());
            stmt.registerOutParameter(4,java.sql.Types.BLOB);
            stmt.executeUpdate();
            oracle.sql.BLOB blob=(BLOB)stmt.getBlob(4);
            OutputStream os=blob.getBinaryOutputStream();
            ObjectOutputStream oop=new ObjectOutputStream(os);
            oop.writeObject(pSession);
            oop.flush();
            oop.close();
            os.close();
            stmt.close();
            conn.commit();
            conn.close();
            pc.close();
      } If anyone could help me, I would deeply appreciate it!
    Thank you for your time.

    kalle
    Thank you very much for your advice!!!
    Like you said, I started to check whether the connections are fine before giving them from the pool.I am executing a simple "select 'anil' from dual" and if its fine only then I return the connection. So far it seems to be fine. Also I am reopening the connections(closing the old ones and opening new connections) after every 12 hours.
    As far as the JDBC driver is concerned, I already tried with Oracle 8i driver, it gave the same problems. I read that 9i driver might solve this problem, so I changed to the latest 9i driver (classes12_g.zip).
    Sometimes before(before I started checking whether the connection is good )the application used to hang up at the point where I am issuing setAutoCommit(false).It never comes out from that statement.Is this something to do with theconnections being closed?
    What I am afraid is, will the appilation get hung up even after I check the connection with select query and then issue autocommit(false)??
    Or will it hang up while I check with a select query??
    As long as it doesn't hung up, I am fine. Because i am cathching the exceptions.
    Thanks In ADVANCE
    Anil

  • How to avoid ORA-3113 when selecting from XMLTYPE table

    Hi,
    If I register an XML-schema, Oracle automatically creates a table xxxxxx_tab of XMLTYPE. (I use Oracle 9.2.0.1)
    When I do a DESCRIBE or a SELECT from this table I get the error: 'ORA-03113:
    end-of-file on communication channel' and my connection is dropped.
    I opened a TAR for this and Oracle says: 'It is an internal bug so cannot be viewed in metalink. This is fixed in release 10i.' (do they mean oracle DB rel 10i, or a new version of XDK?)
    I saw an example in Oracle Magazine (Jan
    2003) "Make XML Native and Relative" about Oracle 9i Rel 2 and XML. As you can see in codeListing 7, the author also does a select from such a
    table (CD331_tab): Why doesn't he have any problems?
    Is there a workaround for this bug? What's the purpose of being able to automatically upload XML-data to a registered schema if you can't do a select of the data?
    Thank you!

    It appears that the XML Schema is not entirely valid. Specifically, the definition of element "DeviceCategory" has two definitions of element "Audio" appearing within a <choice> model i.e. something like :
    <element name="DeviceCategory">
    <choice>
    <sequence>
    <element name="Audio">
    </sequence>
    <sequence>
    <element name="Audio">
    </sequence>
    </choice>
    This is disallowed by XML Schema spec per. the Unique Particle Attribution Constraint. The general idea is that a XML Schema describes a determinstic content model i.e. schema processor can always unambiguosly determine the matching declaration when it encounters an element. However that's not the case with the declaration above. On encoutering "Audio", it could match either the first or the second declaration of the element. Hence the error.
    You will have to rework the schema to avoid this constraint. One mechanism could be to define complexType and their restrictions.
    - Ravi

  • Help with circumvention of ORA-01472: cannot use connect by on view with ..

    Hi,
    Any help resolving the following would be v. helpful.
    The Aim
    Produce a hierarchical report of all users and the privileges they have via the various roles they are granted.
    The SQL
    select lpad(' ', level*2,' ')|| granted_role from (select grantee, granted_role
    from dba_role_privs
    union
    select role, granted_role
    from role_role_privs
    union
    select role, privilege
    from role_sys_privs
    union
    select 'All users', username
    from dba_users)
    start with grantee='All users'
    connect by prior granted_role = grantee;
    The error
    ORA-0147: cannot use connect by on view with DISTINCT, GROUP BY, etc.
    The database
    Oracle 8.1.7.4 (Yes I know ....)
    The Solution
    [Thanks in advance]

    What if you create a table first
    create table role_grants as
        select granted_role, grantee
           from (select grantee, granted_role
                   from dba_role_privs
                 union
                 select role, granted_role
                   from role_role_privs
                 union
                 select role, privilege
                   from role_sys_privs
                 union
                 select 'All users', username
                  from dba_users)
    Then run the hierarchical report
    select lpad(' ', level*2,' ')|| granted_role
       from role_grants
       start with grantee='All users'
       connect by prior granted_role = grantee

  • ORA-01552: cannot use system rollback segment for non-system tablespace

    i try to create a table in new schema test1 and got the following error. please help.
    SQL> create table employer1 as select * from a.employer;
    create table employer1 as select * from a.employer
    ERROR at line 1:
    ORA-01552: cannot use system rollback segment for non-system tablespace 'TEST1'

    Hi,
    This is an example:
    SQL>
    CREATE UNDO TABLESPACE "UNDOTMP"
    DATAFILE 'UNDOTMP.DBF01' SIZE 100M REUSE
    AUTOEXTEND ON NEXT 51200K MAXSIZE 15000M
    ALTER SYSTEM SET undo_tablespace=UNDOTMP SCOPE=BOTH;
    Regards
    David Duenas
    Edited by: David Duenas on Jul 4, 2009 7:33 PM

  • ORA-12032: cannot use rowid column

    Hi,
    on 8.1.7 I have the following error :
    ORA-12032: cannot use rowid column from materialized view log on "string"."string"
    The solution is :
    Action: A complete refresh is required before the next fast refresh. Add ROWID columns to the materialized view log, if required.
    How can I do a complete refresh before the next fast refresh or Add ROWID columns ? How to know if Add ROWID columns is required ?
    Thank you.
    PS :
    my script is :
    START WITH TO_DATE('06-jul-2010 17:57:48','dd-mon-yyyy hh24:mi:ss')
    NEXT SYSDATE+1/24

    user522961 wrote:
    Hi,
    on 8.1.7 I have the following error :
    ORA-12032: cannot use rowid column from materialized view log on "string"."string"
    The solution is :
    Action: A complete refresh is required before the next fast refresh. Add ROWID columns to the materialized view log, if required.
    How can I do a complete refresh before the next fast refresh or Add ROWID columns ? How to know if Add ROWID columns is required ?
    Thank you.run above
    EXECUTE DBMS_MVIEW.REFRESH('MV_NAME','C');

  • ORA-19802: cannot use DB_RECOVERY_FILE_DEST without DB_RECOVERY_FILE_DEST_S

    Hi all,
    We are using Oracle 11g R2 RAC on OEL 5.6.
    After set the db_recovery_file_dest to FRA diskgroup,
    I forgot to set the DB_RECOVERY_FILE_DEST_SIZE, and I've started an instance,
    like this:
    SQL> ALTER SYSTEM SET db_recovery_file_dest='+FRA' SCOPE=spfile;
    System altered.
    SQL> commit;
    Commit complete.
    SQL> show parameter recover
    NAME                                 TYPE        VALUE
    db_recovery_file_dest                string
    db_recovery_file_dest_size           big integer 0
    recovery_parallelism                 integer     0
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> SQL> SQL>
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> startup;
    ORA-19802: cannot use DB_RECOVERY_FILE_DEST without DB_RECOVERY_FILE_DEST_SIZEI need to set the DB_RECOVERY_FILE_DEST_SIZE. How can I do this?
    I cannot to set this parameter when I startup with mount or nomount option.
    Thank you very much!

    Hi,
    So, you can set the parameter DB_RECOVERY_FILE_DEST_SIZE
    by using this other node:
    ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=<size> SCOPE=spfile;And in the first node with problems to start the instance you can start like this:
    SQL> startup;
    ORACLE instance started.
    Total System Global Area  835104768 bytes
    Fixed Size                  2217952 bytes
    Variable Size             624953376 bytes
    Database Buffers          201326592 bytes
    Redo Buffers                6606848 bytes
    ORA-01105: mount is incompatible with mounts by other instances
    ORA-19808: recovery destination parameter mismatchThe above error is normal in this moment because you must to set
    the parameters on other node too, like this:
    node2:
    ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=<size> SCOPE=spfile;
    ALTER SYSTEM SET db_recovery_file_dest='+FRA' SCOPE=spfile;
    SHUTDOWN IMMEDIATE;
    STARTUP;
    node1:
    SHUTDOWN; (again)
    STARTUP; (now without any errors)
    Regards. :-)

  • I have iPhone 6,  8.3. I cannot use bluetooth at all from my device, even to connect my macbook pro. I did all the recommended trouble shooting such as  reboot and reset network settings. but it does not recognise any bluetooth device. Pls help.Thank

    I have iPhone 6,  8.3. I cannot use bluetooth at all from my device, even to connect my macbook pro. I did all the recommended trouble shooting such as  reboot and reset network settings. but it does not recognise any bluetooth device. Pls help.Thank you.

    See iPhone BT profile on what can be connected/paired:
    iOS: Supported Bluetooth profiles - Apple Support
    And BT troubleshooting:
    iOS: Troubleshooting Bluetooth connections - Apple Support

  • 7.3.4 to 8.1.7  ODMA ERROR : ORA-01552: CANNOT USE SYSTEM ROLLBACK

    Trying to upgrade an old 7.3.4 database running on Aix to 8.1.7 so I can get a compatible export file to allow me to take it to 10gR2.
    I have done some work to get the init.ora file configured with the proper values but the odma fails with the following error:
    drop table dual;
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01552: cannot use system rollback segment for non-system tablespace 'xxx'
    I have other rollback segments defined by my init.ora file and during a normal database startup they are online.
    When I run the 'odma' process it takes the database down and when it brings it up it only has the SYSTEM rollback segment online.
    I know this is an old configuration but anyone have any suggestions?
    I do have "audit_trail = none" in my init file.
    Update:
    Looks like to just do an exp/imp I don't need to worry about going through odma so I am just going to close this post.
    Edited by: user6445925 on 11-Apr-2013 15:23

    Looks like to just do an exp/imp I don't need to worry about going through odma so I am just going to close this post.

  • Select from nested table in a nested table security problem

    please help
    running Oracle 9.2.0.3.0 on RH AS 2.1
    I can select the inner most nested table as the creator, but can't use the same select statement as USER2.
    ORA-00942: table or view does not exist
    -- begin make of objects and tables
    create or replace type mydata_t as object ( x float, y float);
    create or replace type mydata_tab_t as table of mydata_t;
    create or replace type mid_t as object (
         graphname varchar2(12),
         datapoints mydata_tab_t );
    create or replace type mid_tab_t as table of mid_t;
    create or replace type top_t as object (
         someinfo int,
         more_mid     mid_tab_t );
    create table xyz (
         xyzPK int,
         mainstuff     top_t )
         nested table mainstuff.more_mid store as mid_nt_tab
              (nested table datapoints store as mydata_nt_tab)
    -- grants
    grant all on mydata_t to user2;
    grant all on mydata_tab_t to user2;
    grant all on mid_t to user2;
    grant all on mid_tab_t to user2;
    grant all on top_t to user2;
    grant all on xyz to user2;
    -- insert
    insert into xyz values (1, top_t(22,mid_tab_t(mid_t('line1',mydata_tab_t(
    mydata_t(0,0),
    mydata_t(15,15),
    mydata_t(30,30))))));
    commit;
    -- select fails as user2
    select * from table(select Y.datapoints as DP_TAB
         from table(select X.mainstuff.more_mid as MORE_TAB
              from scott.xyz X
              where X.xyzPK=1) Y
         where Y.graphname='line1') Z;
    -- select works as user2, but i need individual lines
    select Y.datapoints as DP_TAB
         from table(select X.mainstuff.more_mid as MORE_TAB
              from scott.xyz X
              where X.xyzPK=1) Y
         where Y.graphname='line1';

    Thank you for your reply.
    I have tried
    select value(t) from table t;
    but it is still not working. I got almost the same answer as before.
    Anyway thank you very much again.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by MARCELO OCHOA ([email protected]):
    Originally posted by meimei wu ([email protected]):
    [b]I created a nested object-relational table using REF type in oracle8i. when I tried to select * from the table, I got lots of number as the ref type values, but actually, the value in ref type should be of type varchar2 and number. The number I got looked like following code:
    JARTICLE_REF_TYPE(000022020876108427C2FE0D00E0340800208FD71F76103B99B12009C0E0340800208FD71F,
    Does anyone know how I can get the actual value that I inserted into the nested table?
    your help is appreciated.<HR></BLOCKQUOTE>
    Try this:
    select value(t) from table t;
    Best regards, Marcelo.
    null

  • Select from a table from other schema

    Hi,
    I want to make a select from a table how is into other Schema and into other instance.
    form example, if I have _2 schemas (in diferent instances)_:
    SCHEMA1 =
    *(DESCRIPTION =*
    *(ADDRESS =*
    *(PROTOCOL = TCP)*
    *(HOST = XXX.XXX.XXX.XX1)*
    *(PORT = 1560)*
    *(CONNECT_DATA =*
    *(SERVER = DEDICATED)*
    *(SERVICE_NAME = SCHEMA1)*
    SCHEMA2 =
    *(DESCRIPTION =*
    *(ADDRESS =*
    *(PROTOCOL = TCP)*
    *(HOST = XXX.XXX.XXX.XX2)*
    *(PORT = 1560)*
    *(CONNECT_DATA =*
    *(SERVER = DEDICATED)*
    *(SERVICE_NAME = SCHEMA2)*
    and into SCHEMA2 there is a table TABLE_A.
    If I`m connected into SCHEMA1:
    how can I do to make a select from the TABLE_A?
    thanks very much.

    1) Referring to an entry in the tnsnames.ora file as a "schema" as you have here with schema1 and schema2 is likely to be confusing. You have multiple schemas in the same database-- in this case, you appear to be trying to query tables in a different database. If we try to answer using your TNS aliases "schema1" and "schema2", there is likely to be a great deal of confusion between schemas/ databases/ and TNS aliases. So I will assume that your tnsnames.ora file actually reads
    TNS_ALIAS1 =
      (DESCRIPTION =
        (ADDRESS =
          (PROTOCOL = TCP)
          (HOST = HOST1)
          (PORT = 1560)
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = DB1)
    TNS_ALIAS2 =
      (DESCRIPTION =
        (ADDRESS =
          (PROTOCOL = TCP)
          (HOST = HOST2)
          (PORT = 1560)
      (CONNECT_DATA =
        (SERVER = DEDICATED)
        (SERVICE_NAME = DB2)
    )2) Given the TNS aliases above, assuming that we are talking about the tnsnames.ora file on HOST1, you would need to create a database link from DB1 to DB2. You can either specify a fixed username and password for the database link or you can specify that the connection happens as the current user (which assumes that the passwords are synchronized between the databases).
    CREATE DATABASE LINK to_db2
      CONNECT TO username_on_db2
      IDENTIFIED BY password_on_db2
      USING 'TNS_ALIAS2'3) Assuming the database link is in place
    SELECT *
      FROM schema2.table_name@to_db2Justin

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

Maybe you are looking for

  • Workflow initiator definition in a local workflow

    Hi, workflow gurus. Question is about workflow initiator definition in a local workflow. In my workflow there are, for this moment, two event creators (callers), each of them calls for the same local generic workflow and passes event specific paramet

  • Missing Pre-Order Reward Zone Certificate for Fifa 15

    Hi - please let me know who I should contact regarding the missing pre-order certificate for Fifa 15.  Thanks!

  • Working with generics generates a compilation error

    hi again, i?m trying to work with generics but when i try to compile my work i get a "generics are not supported in -source 1.4" error, i am working with BlueJ, and i have jdk1.5.0_06 installed in my computer, why am i getting this error? is there an

  • Trouble using Type tool in CS3

    I'm trying to type text and all I get is underlines with a blinking cursor...I've tried everything I can think of and not having any luck. Any suggestions?

  • Regarding fronend installation

    Hii guyz I installed ECC 6.0 on a windows 2003 server. I want to access my server from my laptop and installed sap 6.40 front end from my DVD1. Anyway im not understanding how i should connect to my server from my laptop. Do i need to do any settings