dbTalk Databases Forums  

Query Error

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Query Error in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
The Magnet
 
Posts: n/a

Default Query Error - 04-01-2011 , 02:04 PM






Hi,

I'm trying to use DBMS_METADATA to get the DDL:

SELECT TO_CHAR(DBMS_METADATA.GET_DDL('TABLE',
o.name,'DATA_HOLDER')) ddl_string
FROM sys.obj$ o,sys.tab$ t
WHERE o.owner# = 28
AND o.obj# = t.obj#
AND BITAND(o.flags, 128) = 0;



ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion
(actual: 4747, maximum: 4000)


I cannot seem to get around that error no matter what I try. Any
suggestions?

Thanks!

Reply With Quote
  #2  
Old   
Dan Blum
 
Posts: n/a

Default Re: Query Error - 04-01-2011 , 03:19 PM






The Magnet <art (AT) unsu (DOT) com> wrote:
Quote:
Hi,

I'm trying to use DBMS_METADATA to get the DDL:

SELECT TO_CHAR(DBMS_METADATA.GET_DDL('TABLE',
o.name,'DATA_HOLDER')) ddl_string
FROM sys.obj$ o,sys.tab$ t
WHERE o.owner# = 28
AND o.obj# = t.obj#
AND BITAND(o.flags, 128) = 0;

Why are you using TO_CHAR on it? You should be able to read the result
without that.

--
__________________________________________________ _____________________
Dan Blum tool (AT) panix (DOT) com
"I wouldn't have believed it myself if I hadn't just made it up."

Reply With Quote
  #3  
Old   
onedbguru
 
Posts: n/a

Default Re: Query Error - 04-01-2011 , 09:51 PM



On Apr 1, 3:04*pm, The Magnet <a... (AT) unsu (DOT) com> wrote:
Quote:
Hi,

I'm trying to use DBMS_METADATA to get the DDL:

SELECT * * TO_CHAR(DBMS_METADATA.GET_DDL('TABLE',
o.name,'DATA_HOLDER')) ddl_string
FROM * * * sys.obj$ o,sys.tab$ t
WHERE * * *o.owner# = 28
* AND * * *o.obj# = t.obj#
* AND * * *BITAND(o.flags, 128) = 0;

ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion
(actual: 4747, maximum: 4000)

I cannot seem to get around that error no matter what I try. *Any
suggestions?

Thanks!
The more appropriate response is: you really need to learn data
types and their sizes. VARCHAR2 (used by to_char) has a maximum size
of 4000 bytes as stated by the error message.

see: http://asktom.oracle.com/pls/asktom/...D:367980988799
for an example of how to retrieve a clob into something useful.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.