PL/SQL (MOSC)

MOSC Banner

dbms_sql.fetch_rows gives me "ORA-19011: Character string buffer too small" for XMLYTPE column

edited Jun 4, 2019 10:58AM in PL/SQL (MOSC) 6 commentsAnswered

Hi

This following example in oracle 19c, but I believe XMLTYPE columns are in previous releases also.

set serveroutput on size unlimited format wrapped;declare   l_theCursor integer default dbms_sql.open_cursor;   l_colErrNr number;   l_colActualLength number;   l_colErrorText varchar2(250);   l_lineLength number(3) := 160;   l_columnValue varchar2(10000 char);   l_status integer;   l_descTbl dbms_sql.desc_tab;   l_colCnt number;   l_rowid number := 0;   l_colNameMaxLen number(2) := 30;   l_valueRpadLen number(3) := 135;   procedure p (p_str in varchar2)   is      l_str long := p_str;   begin      dbms_output.put_line(l_str);   end p;begindbms_sql.parse(l_theCursor, 'select PATCH_DESCRIPTOR from DBA_REGISTRY_SQLPATCH', dbms_sql.native); -- Here, column PATCH_DESCRIPTOR, there is little bit more text, and I get error below..--dbms_sql.parse(l_theCursor, 'select NOTES from DBA_SQL_PLAN_DIRECTIVES where rownum < 2', dbms_sql.native); -- Here, column NOTES, there is little bit less text, and this one works.dbms_sql.describe_columns(l_theCursor, l_colCnt,

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center