SQL & PL/SQL :: Getting Error When Using Clob In Execute Immediate

Oct 18, 2010

I m getting the following error when using the clob in execute immediate : 'ORA-22275: invalid LOB locator specified'

declare
v_final_output1 clob := empty_clob;
v_stmt varchar2(32000);
begin
select source into v_stmt from table t where t.id =123 ;
[code]....

Note that error comes after the execute immediate when i try to display the content of v_final_output1;

View 5 Replies


ADVERTISEMENT

SQL & PL/SQL :: Update Clob Column Using Execute Immediate?

Aug 30, 2010

I am encountering an error message while updating a xmltype column using dynamic sql statement. I am using dynamic sql here as the table is not placed in the same schema from where the plsql procedure is invoked. The schema name is passed to the procedure as an argument. I am using below pseudo code for this purpose.

Create procedure myproc(p_schemaname varchar2, p_id number)
is
p_clob clob;
p_str varchar2(2000);
begin

[code]...

This is throwing an error 'missing expression' at the line of 'exeute immediate'.

But it works if I run a static sql update by hard coding the schema name in the statement.

View 3 Replies View Related

SQL & PL/SQL :: How To Execute The Statement Exist In CLOB Column

Jun 30, 2010

I have oracle table with a column of datatype CLOB. In the clob column having the manipulation statements (update, insert) as records.

How to execute the statements exists in a clob column as records?

my table structure and one record is

CREATE TABLE ACTN_CFG_T
(
OBJ_ID NUMBER(32) NOT NULL,
ACTN_ID NUMBER(38) NOT NULL,
ACTN_SEQ NUMBER(2) NOT NULL,
RU_DEF CLOB NOT NULL

[code]....

I want to execute the update statement when i call the obj_id. I used the follwing procedure but error.

1 DECLARE
2 V_ABC CLOB;
3 BEGIN
4 SELECT RU_DEF INTO V_ABC FROM ACTN_CFG_T WHERE OBJ_ID = 1625;
5 EXECUTE IMMEDIATE V_ABC;
6 END;

error is...

ORA-06550: line 5, column 20:
PLS-00382: expression is of wrong type
ORA-06550: line 5, column 2:
PL/SQL: Statement ignored

View 10 Replies View Related

SQL & PL/SQL :: Execute Large (clob) Dynamic Sql By DBMS_SQL?

Aug 2, 2011

is it possible to execute large(clob) dynamic sql by DBMS_SQL .Is there any restriction like length ...

View 4 Replies View Related

SQL & PL/SQL :: Clob Is Capable Of 4gb But Throwing Error

Aug 29, 2012

I am getting error when trying to execute following. Clob is capable of 4gb why it is throwing error.

DECLARE
l_char1 CLOB;
BEGIN
l_char1 := l_char1 ||rpad('*', 32768, '*');
END;

View 11 Replies View Related

SQL & PL/SQL :: Error In Execute Immediate?

May 10, 2013

I have attached my Code and log records, here while calling Execute Immediate the program throws an error.

View 4 Replies View Related

SQL & PL/SQL :: Execute Immediate Command Error

Oct 14, 2011

I am facing a problem regarding the execute immediate command. I have created a procedure as given below

SQL> set echo on ;
SQL> set serveroutput on;
SQL> declare
2 l_var varchar2(50);
3 sqlstring varchar2(3000);
4 begin
[code].......

In this procedure the execute immediate command shows error ( if i avoid exception).I have tried other syntax too of this command
but it is showing error only.

View 13 Replies View Related

Forms :: Error In Concat A Clob With Char Datatype

Nov 2, 2011

How could we concat a clob with a char datatype.

declare
a clob;
b varchar2;
c clob;
begin
c:=a||b;
end;

When execute above code in form runtime, I get error ora-32767.

"ORA-29287: invalid maximum line size Cause: An invalid maximum line size value was specified.
Action: Correct the maximum line size to be in the range [1, 32767]."

View 3 Replies View Related

Application Express Listener :: EA2 Standalone CLOB Error

Jan 15, 2013

I use the "Media Resource" RESTful service type to generate custom JSON objects via CLOB-returning functions. This worked great in APEX Listener 1.1.3. However, on APEX Listener 2.0 I get status 500 on a RESTful service which works fine on 1.1.3 (which generates a clob > 4000 bytes), and the following in the server log:

SEVERE: ORA-22922: nonexistent LOB value

oracle.dbtools.common.UnrecoverableException: ORA-22922: nonexistent LOB valueThis seems to be the same issue as reported here:

APEX Listener EA2 Standalone CLOB error

As stated by thoechst in that thread:

>
It is as though the function is getting cast as a varchar2 somewhere. I verified that the function will correctly return a large result to other sources (dbms_output, for instance).
>

Versions:

APEX Listener 2.0
WebLogic 10.3.6 on Windows 2008 SE R2 x64
Oracle DB 11.2.0.3

View 1 Replies View Related

SQL & PL/SQL :: Error Message In Execute Immediate Command

May 30, 2012

I have created a procedure, which should be executed on the below condition with EXECUTE IMMEDIATE COMMAND. But i am getting error.

The error shows the procedure/function name is not existing. But it is exist.

SQL>
1 Declare
2 a varchar2(20);
3 b varchar2(20);
4 c varchar2(1000);
5 begin
6 select to_char(sysdate,'day') into a
7 from dual;
8 select to_char(sysdate,'HH24') into b
9 from dual;
10 if
11 (a='friday' and b>=22)
12 or
13 (a='saturday' and b<=6)
14 or
15 (a='wednesday' and b>=9)
16 then
17 begin
18 EXECUTE IMMEDIATE ('begin'||BACKUP_AUTO_execute_bat_file||'end;');
19 end;
20 else
21 null;
22 end if;
23* end;
SQL> /
EXECUTE IMMEDIATE ('begin'||BACKUP_AUTO_execute_bat_file||'end;');
*
ERROR at line 18:
ORA-06550: line 18, column 32:
PLS-00222: no function with name 'BACKUP_AUTO_EXECUTE_BAT_FILE' exists in this
scope
ORA-06550: line 18, column 4:
PL/SQL: Statement ignored

View 6 Replies View Related

SQL & PL/SQL :: CLOB Error ORA-21560 - Argument 2 Is Null / Invalid Or Out Of Range

Jul 31, 2013

I am receiving following error in the below provided procedure

Oracle Verion details: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for HPUX: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

Error:ORA-21560: argument 2 is null, invalid, or out of range

Anaysis :As per my analysis the procedure fetches a clob attachement as input while processing it using dbms_lob.read (inside this procedure) some intermediate buffer value has gone out of range and error is being thrown.As per me it is n_clob_pos variable value .detecting the correct variable causing this error.

PROCEDURE add_attachment_contents_test( p_in_smtp_connection IN UTL_SMTP.CONNECTION,
p_in_clob_attach IN CLOB,
p_out_status OUT NUMBER,
p_out_err_desc OUT VARCHAR2 )
[code].....

View 4 Replies View Related

Reports & Discoverer :: Clob In 6i - Error Function Return Must Char

Jun 23, 2011

I having issue when i try to use CLOB as varchar2 is not enough in my case. I'm developing function column in oracle report. I'm using developer 6i. I get error function return must char?

How I can use CLOB in oracle report?

function CF_RnoFormula return Char is
--v_release_num CLOB;
v_release_num varchar2(32767);
begin
FOR rec IN
[code]........

View 3 Replies View Related

How To Get Line And Error Code From EXECUTE IMMEDIATE P_SQL

Nov 19, 2010

I'm trying to write my own application ( in Delphi) which should be work similar to the Oracle SQL Developer. I received the body of the selected stored procedure by select * from all_users where type='PROCEDURE' and NAME='name_of_the_selected_proc'

Next, I put the body of the procedure into richedit component, make necessary changes, then put the corrected body into the variable ( varchar2) which is the input parameter of my stored procedure PW_DO_IT

create or replace PROCEDURE PW_DO_IT(P_SQL in varchar2)
as
begin
EXECUTE IMMEDIATE P_SQL;
end;

Everything works fine , the only problem is that I don't know how to get the line in which simulated error occured and its details. The only thing I get is the ORA-24344: success with compilation error

View 4 Replies View Related

SQL & PL/SQL :: Date Error In Execute Immediate Query Through Function?

Jun 25, 2012

I've used a date in execute immediate query in function, but at the time passing the date as input parameter and getting the result i'm getting following error.

CREATE TABLE MIS.TEMP
(
ID NUMBER(8),
STOCKDATE DATE,
STOCKQTY NUMBER(10,2)
);

[code]....

SQL> select getstockqty(1,to_date('31/03/2012','dd/mm/yyyy')) from dual;
select getstockqty(1,to_date('31/03/2012','dd/mm/yyyy')) from dual
*
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected
ORA-06512: at "MIS.GETSTOCKQTY", line 11

View 12 Replies View Related

ORA-12012 / Error On Auto-execute Of Job 4968

Jul 17, 2007

I have some message for job at any time with any number of job

ORA-12012: error on auto execute of job 4968
ORA-01427: single-row subquery returns more than one row
ORA-06512: at line 6
ORA-00604: error occurred at recursive SQL level 1
ORA-01427: single-row subquery returns more than one row
ORA-06512: at line 6

But when i see job

SQL> select job from dba_jobs;

JOB
----------
92
93
94
95
96
97
98
99
100
9 ligne(s) s�lectionn�e(s).
SQL>

And nothing. I have some message of this in my bdump directory with some different hours.But i want to find what is take this. How i can do to trap this. Because the number of job is not in dba_jobs.

View 5 Replies View Related

ORA-12012 / Error On Auto-execute Of Job 196257

Apr 30, 2013

Getting the below lines in alert_log in bdump.

Mon Apr 29 16:17:32 2013
Errors in file e:oracleproduct10.2.0admindblivedumpdblive_j000_1528.trc:
ORA-12012: error on auto execute of job 196257
ORA-29886: feature not supported for domain indexes

View 3 Replies View Related

SQL & PL/SQL :: Oracle Error For Invalid Identifier In Execute Immediate Statement

Apr 5, 2011

I have a procedure as below. To sum up the procedure in one line it dynamically forms a string to get the values of the type which is passed as an input to the procedure.

I call the procedure as

exec exec_imm( exec_imm_t(1,'asd','1/2-34'));

ERROR:
Error starting at line 9 in command:
exec exec_imm( exec_imm_t(1,'asd','1/2-34'))
Error report:
ORA-00904: "P_TYPE_DATA"."ADDRESS": invalid identifier
ORA-06512: at "PTK_ADM.EXEC_IMM", line 26
ORA-06512: at line 1
00904. 00000 - "%s: invalid identifier"

NOTE:
When I try to execute the procedure with the execute immediate statement I get the above error. But when I execute the select statement which is nothing but the value in v_type_data directly (as seen in the comments in the code below) there is no error. But when the same v_type_data is used in execute immediate, I get an error.

CREATE OR REPLACE procedure exec_imm(p_type_data exec_imm_t)
AS
v_type_str CLOB := NULL;
v_type_data CLOB := NULL;
v_type_name VARCHAR2(25) := NULL;
BEGIN
[code]......

View 6 Replies View Related

SQL & PL/SQL :: Error With Execute Immediate To Pass Db_link To Stored Procedure?

Oct 19, 2011

I have the following error when I try to pass a Procedure parameter carrying db_link name to a stored procedure:

SQL> CREATE OR REPLACE PROCEDURE AFESD.P_DM_VCONTRACT_ITEM (CON_CONNECTION VARCHAR2)
2 IS
3 T_CONNECTION VARCHAR2(50);
4 T_SQL VARCHAR2(500);
5 BEGIN
6 T_CONNECTION := 'X_DM_TEST@' || CON_CONNECTION;

[code]....

The insert statement succeeds when I try to run DBMS_OUTPUT.put_line output.

View 4 Replies View Related

SQL & PL/SQL :: Using Dbms_sql.execute To Build / Execute Dynamic Sql?

Oct 23, 2013

I'm working with old code that uses dbms_sql.execute to build/execute dynamic sql. In our case, the user can select varying columns(I think up to 20) with different where conditions as needed.

After building the sql, here's an example

WITH ph AS
(SELECT ph.* FROM po_header ph WHERE 1 = 2),
pf AS
(SELECT DISTINCT pf.order_id, pf.fund
FROM po_fau pf, ph
WHERE 1 = 1
AND ph.order_id = pf.order_id

[code]....

Where table records for

po_header = ~567746
po_fau = ~2153570

and PK "order_id" is a NUMBER(10) not null and a snippet of the code looks like

nDDL_Cursor := dbms_sql.open_cursor;
dbms_sql.parse(nDDL_Cursor, sSQLStr, 2);
FOR x IN 1 .. nCols LOOP
sCols(x) := '';
dbms_sql.define_column(nDDL_Cursor, x, sCols(x), 100);
END LOOP;
nError := dbms_sql.execute(nDDL_cursor);

why when the "execute" statement is fired off the elapsed time takes ~4.5 seconds but If I change "1 = 1" above to "1 = 2" it takes ~.2 seconds. If I run the above query interactively it takes ~.2 seconds. Shouldn't the above query when joining

ph.order_id = pf.order_id

return zero rows back instantly or does the "dbms_sql_execute" do some other type of parsing internally that takes cpu time.

View 14 Replies View Related

Backup & Recovery :: Configured Tivoli And Getting Error While Execute RMAN Backup

Nov 17, 2012

We have configured tivoli and getting the below error while execute rman backup.

> rman target / catalog rman/*****@CATLOGDB
Recovery Manager: Release 11.2.0.3.0 - Production on Sat Nov 17 13:35:03 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: AMTMXPRD (DBID=534215973)
connected to recovery catalog database

[code]....

View 6 Replies View Related

Execute Dynamic SQL Using Both Execute Immediate And Ref Cursor

Jan 8, 2009

We can execute dynamic sql using both execute immediate and ref cursor..But what is the difference between the two and performance-wise which is better?

View 5 Replies View Related

Get Data From CLOB

Sep 28, 2011

I'm writing a PHP page to display some data from an Oracle database. Unfortunately, I can't copy the code because it's proprietary. One of the columns in the db is of type CLOB. I'm having trouble getting the data from the CLOB column.

The way the code is now, is there is a query string read into a variable, and the query string variable is read into a function that then retrieves the data from the db. Once the result set is returned, it is parsed to get data from all of the columns. The issue is that I've never worked with CLOB data before, so I'm having some difficulty extracting the data for that column. I know I can use the DBMS_LOB.READ function, but I'm not sure how to apply it in this case. The following is a generic form of the query string I'm using with b.clob_col being the column I'm having issues with.

$queryString = <<<EOD
SELECT a.col1,
a.col2,
a.col3,
b.col4,
b.col5,
b.clob_col,
from table1 b
inner join b.col4
on blah1
inner join a.col2
on blah2
where blah
and blah
EOD;

View 1 Replies View Related

SQL & PL/SQL :: Updating CLOB Value?

Nov 9, 2011

create table top_uid(oldUID number,newUID number);

select * from top_uid;

OLDUID NEWUID
---------------------- ----------------------
1 1001
2 1002
3 1003
4 1004

create table topdUIDXML (uidinfo clob);

insert into topdUIDXML select '<filter name="test" topologyUID="1">' from dual;
insert into topdUIDXML select '<filter name="test2" topologyUID="2">' from dual;
insert into topdUIDXML select '<filter name="ftest" topologyUID="3">' from dual;
insert into topdUIDXML select '<filter name="qtest" topologyUID="4">' from dual;

select * from topdUIDXML

UIDINFO
---------------------------------------
<filter name="test" topologyUID="1">
<filter name="test" topologyUID="2">
<filter name="test" topologyUID="3">
<filter name="test" topologyUID="4">

the topdUIDXML table will contain the oldUID's in the clob XML. need to update the topologyUID in that topdUIDXML with the newUID from the top_uid.

View 5 Replies View Related

SQL & PL/SQL :: How To Update Clob Value

Nov 13, 2012

I the table VOYAGERS with the following data.

ID is of type number and DETAILS is of type CLOB.

ID DETAILS
--- --------
100 The ship has left san diego http:/localhost/icons/sandiego.png to okinawa on nov 10, 2011.

I need to update the record(id = 100) by replacing the url "http:/localhost/icons/sandiego.png" with "http:/localhost/icons/okinawa.png".

I need a procedure where I will pass the ID value, replace string(i.e http:/localhost/icons/sandiego.png) and replace with string (ie. http:/localhost/icons/okinawa.png).

View 2 Replies View Related

SQL & PL/SQL :: How To Insert XML To Clob

Nov 30, 2011

How can I insert xml to clob ? I'm taking from database clob making it in xml type and when I want to insert xml type into clob field it calls and error:

Error(316,43): PL/SQL: ORA-00932: inconsistent datatypes: expected NUMBER got -

View 9 Replies View Related

SQL & PL/SQL :: Using Clob Instead Of Varchar2

Mar 23, 2010

in our application we are using clob column instead of varchar2 because varchar2 does not allow more that 4000 chars, so Using clob allows to put data of any length, will it cause performance issues ? we have this column in almost in all tables .

View 2 Replies View Related

CLOB In Xml Element

Oct 18, 2011

I have to generate a big xml. Each part of the xml needs data from different tables. So I have created two clob to hold the portion of the big xml. How can i have the concatenated clob values as an argument for xml element.

View 1 Replies View Related

SQL & PL/SQL :: Updating CLOB

Apr 21, 2011

Ok, CLOB columns are such a hassle.

I have a variable in my script: v_field1 VARCHAR2(32000);

This is part of a cursor record:

v_mf_table IS TABLE OF mf_detail%ROWTYPE INDEX BY BINARY_INTEGER;
v_mf_record v_mf_table;

I use a FORALL to insert the data into a table:

FORALL x IN v_mf_record.FIRST .. v_mf_record.COUNT
INSERT INTO monthly_mf_snapshot VALUES v_mf_record(x);

BUT! v_field1 is > 4000 characters. Does this trash my changes of using FORALL? Do I need to deal with 4k chunks in an UPDATE instead?

View 30 Replies View Related

XML DB :: Clob Column To XML

Apr 26, 2013

I have table like-

CREATE TABLE C2X_TEST(NAME VARCHAR2(100),XML_CLOB CLOB,XML_XML XMLType);

here in XML_CLOB column xml files are stored.

Now i want to update XML_XML column with corresponding XML_CLOB value .

View 8 Replies View Related

Limit On A CLOB

Jun 18, 2012

Working on building an application which will be in C# (.NET 3.5) and some PL/SQL. However, for the tables which have to store the data, I added a column, comments, to the table and assigned it a data type CLOB. No big deal, except my PL/SQL function is giving me errors if the CLOB built from several varchar2 rows exceeds 4000 characters. I understand the varchar2 field is restricted in 10g, but I was under the impression there wasn't such a restriction on a CLOB (hence the reason we're using it.)

I end up getting:

ORA-6502: PL/SQL: numeric or value error: character string buffer too small
ORA-6512: at line 1
06502. 00000 - "PL/SQL: numeric or value error%s"
*Cause:
*Action:The db is 10g (will be upgrading to 11 in October, needs to work on both) on a Windows Server 2003 box (Archive/backup server and db)

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved