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
Similar Messages
-
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 -
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 -
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. :-) -
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 -
CMSXDB sample: install.sql - error out, cannot use rollback segment
I use the setup instruction and had errors when running install.sql at the following part:
connect cmsadmin/cmsadmin@&tnsname
SET serveroutput ON
PROMPT Creating Table 'OTNCMS_PERSONALIZATION'
CREATE TABLE OTNCMS_PERSONALIZATION (
USERNAME VARCHAR2(20) NOT NULL,
RESOURCELOC SYS.XDBURITYPE NOT NULL,
VIEWTYPE VARCHAR2(40) NOT NULL,
XSLLOC SYS.XDBURITYPE NOT NULL
Resulted in error-
ERROR at line 1:
ORA-01552: cannot use system rollback segment for non-system tablespace 'USERS'
Anyone knows why?Hi,
What is the version of Database that is being used ?.
I guess there must be some issue with the database being used, the archive mode or the UNDO segments. As a workaround, you can remove the following command from install.sql and run the sql script again.
alter user cmsadmin default tablespace users;Regards
Elango. -
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 -
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:23Looks 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.
-
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/24user522961 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'); -
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 -
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 -
Dynamic SQL select from unknown table until runtime
I need to do a select from a table that is unknown until runtime. Is there any good examples of this. The Store Procedure will take in the table name and return a row.
I am not using inline SQL because there is a lot more complexity involved . What I need to do is understand how to reference this unknown table.
Here is an example of what I have written so far.
PACKAGE pk_LoadNativeDataItems IS
PROCEDURE version;
TYPE RowDataCur IS REF CURSOR;
PROCEDURE pr_LoadNativeDataItems(p_flag IN NUMBER
p_how_many_rows_to_fetch IN NUMBER,
p_row_data OUT RowDataCur);
PROCEDURE pr_LoadNativeDataItems(p_flag IN NUMBER
p_how_many_rows_to_fetch IN NUMBER,
p_table_name IN VARCHAR,
p_row_data OUT RowDataCur) IS
BEGIN
OPEN p_row_data FOR
SELECT * from ||p_table_name||;
END pr_LoadNativeDataItems;
END pk_LoadNativeDataItems;
Thanks for any help
TonyHere is example for similar question:
Using variables for tables and columns -
Getting PL/SQL:ORA-00933 when using CASE logic as a control structure
Hello Everybody,I have created a PL/SQL block(Control Structure) to calculate bonus of employees based on salary of the employee,but I get errors like ORA-00933 and ORA-06550.Given below is the PL/SQL block which I tried to implement
SQL> DECLARE
2
3 v_EMPNO NUMBER(7,2):= &p_EMPNO;
4 v_SAL EMP.SAL%TYPE;
5 v_BONUS NUMBER;
6
7 BEGIN
8 SELECT SAL
9 FROM EMP
10 INTO v_SAL
11 WHERE EMPNO = v_EMPNO;
12
13 v_BONUS :=
14 CASE v_SAL
15 WHEN v_SAL = 0 THEN 0
16 WHEN v_SAL < 1500 THEN (0.1*v_SAL)
17 WHEN v_SAL BETWEEN 1500 AND 3000 THEN (0.15*v_SAL)
18 WHEN v_SAL > 3000 THEN (0.20*v_SAL)
19 END;
20
21 DBMS_OUTPUT.PUT_LINE(' EMPNO '||v_EMPNO||' SALARY '||v_SAL||' BONUS '||V_BONUS);
22
23 END;
24 /
Enter value for p_empno: 7100
old 3: v_EMPNO NUMBER(7,2):= &p_EMPNO;
new 3: v_EMPNO NUMBER(7,2):= 7100;
INTO v_SAL
ERROR at line 10:
ORA-06550: line 10, column 7:
PL/SQL: ORA-00933: SQL command not properly ended
ORA-06550: line 8, column 7:
PL/SQL: SQL Statement ignored
Is it that I can not use "CASE" as a control structure in the above block , when I code
"SELECT SAL
FROM EMP
INTO v_SAL
WHERE EMPNO = v_EMPNO;" to get v_SAL and then use it in CASE exp to calculate a value for v_Bonus.
Kindly let me know.Hi,
The CASE Expression is also available in PL/SQL.
Try this code:
DECLARE
V_EMPNO NUMBER (7, 2) := 7788;
V_SAL EMP.SAL%TYPE;
V_BONUS NUMBER;
BEGIN
SELECT SAL
INTO V_SAL
FROM EMP
WHERE EMPNO = V_EMPNO;
V_BONUS :=
CASE
WHEN V_SAL = 0
THEN 0
WHEN V_SAL < 1500
THEN (0.1 * V_SAL)
WHEN V_SAL BETWEEN 1500 AND 3000
THEN (0.15 * V_SAL)
WHEN V_SAL > 3000
THEN (0.20 * V_SAL)
END;
DBMS_OUTPUT.PUT_LINE ( ' EMPNO '
|| V_EMPNO
|| ' SALARY '
|| V_SAL
|| ' BONUS '
|| V_BONUS
END;As you are Using,Comparison Expression to find a match, Your Searched CASE Expression should be something like this.
DECLARE
sal NUMBER := 2000;
sal_desc VARCHAR2(20);
BEGIN
sal_desc := CASE
WHEN sal < 1000 THEN 'Low'
WHEN sal BETWEEN 1000 AND 3000 THEN 'Medium'
WHEN sal > 3000 THEN 'High'
ELSE 'N/A'
END;
DBMS_OUTPUT.PUT_LINE(sal_desc);
END;If you are Using CASE as a Value matching then your piece of code should be like this..
DECLARE
deptno NUMBER := 20;
dept_desc VARCHAR2(20);
BEGIN
dept_desc := CASE deptno
WHEN 10 THEN 'Accounting'
WHEN 20 THEN 'Research'
WHEN 30 THEN 'Sales'
WHEN 40 THEN 'Operations'
ELSE 'Unknown'
END;
DBMS_OUTPUT.PUT_LINE(dept_desc);
END;Thanks,
Shankar -
In Oracle SQL, cannot use column in select statement and order by
Hi,
Is there a work around for this.
Thanks in advance
Pablo.Hi,
943981 wrote:
Hi All,
This is the error I get:
ORA-00960: ambiguous column naming in select list
00960. 00000 - "ambiguous column naming in select list"
*Cause: A column name in the order-by list matches more than one select
list columns.
*Action: Remove duplicate column naming in select list.
Error at Line: 6 Column: 17That error message looks pretty clear to me. What don't you understand?
Either
(a) use aliases, so each column has a unique name, or
(b) remove duplicate columns from the SELECT clause.
Post your query. It's hard to say exactly what you're doing wrong when we don't know exactly what you're doing.
For best results, post a complete test script (including CREATE TABLE and INSERT statements, if necessary) that people can to re-create the problem and test their ideas.
See the forum FAQ {message:id=9360002} -
Cannot sqlplus sys as sysdba from remote server :ORA-12154
Hi,
I am trying to connect from linux VM app server to the database as sys as sysdba but it returns TNS error. I verified that listener is up, the REMOTE_LOGIN_PASSWORDFILE is exclusive and there is password file.
[ORACLE@SERVER admin]$ sqlplus sys as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri Apr 12 21:45:08 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
==============================================
It works when I give the DB name
[ORACLE@SERVER admin]$ sqlplus sys@ODB2 as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri Apr 12 21:49:50 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
==================================================
Could anyone please help me with the issue ?
Edited by: Cherrish on Apr 12, 2013 10:53 PMCherrish wrote:
Hi,
I am trying to connect from linux VM app server to the database as sys as sysdba but it returns TNS error. I verified that listener is up, the REMOTE_LOGIN_PASSWORDFILE is exclusive and there is password file.
[ORACLE@SERVER admin]$ sqlplus sys as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri Apr 12 21:45:08 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specifiedRealize that sqlplus line above shows no @TNS_ALIAS so no SQL*Net should be used to connect.
please type EXACTLY (line for line) as shown below
env | sort
sqlplus
/ as sysdba
COPY the results from above then PASTE all back here
Maybe you are looking for
-
ORDER BY was not allowed in view definitions in 7.3.4. It is allowed in 8.1.6 but I have not seen any documentation to say when or why it was introduced. There is an old rule that a select statement does not guarantee the order of rows without an ord
-
How to select all (dots) in a scatter plot matrix?
I have a scatter plot matrix, and I'm manually changing the color of each trend line, which probably isn't the best way but it's an easy but time consuming way to do it. I can't feasibly change the color/stroke of every single scatter plot dot in eve
-
New 10.6 computer with mobile user pinwheeling often
Hi folks, I'm having an issue with a computer being used by one of our employees. She had an old 2009 iMac that she was using that began pinwheeling often whenever she was using it (we thought it was a Hard Drive Issue), so we replaced it with a new
-
Applet/javascript communication with 1.4 plug in
I have a javascript function that queries an applet parameter using the following code: var applet = window.parent.frames["FRAME_NAME"].document.applets[0]; var errorStatus = applet.ErrorStatus; The applet has a "getErrorStatus" method. This all work
-
Is it a bug in JDK1.3?
Here's a simple program that I compiled and executed by using JDK1.3. The program had worked all very well as long as I typed in 'C' , 'P', 'N', 'A', 'b', or other single characters. Just by curiosity, I kept keying 'c' for 6 or 7 times and of course