Link to home
Start Free TrialLog in
Avatar of cdukes
cdukesFlag for United States of America

asked on

ORACLE - ORA-01489: result of string concatenation is too long

Hi,
I don't know Jack about Oracle so dumb it down for me :-)

Someone gave me a script to run to get some data dumped to text for an app that I'm working on.
The script works partially, but some rows return the above error.
Here's what I have:

% more gather_emd_data.sh
#!/bin/bash
set -x
PATH=/bin:/opt/local/bin:/usr/dt/bin:/usr/openwin/bin:/usr/bin:/opt/local/cse/bin:/bin:/apps/oracle/bin/
export PATH
ORACLE_HOME=/apps/oracle
export ORACLE_HOME
sqlplus -silent << EOF
acsview/viewonly@CN
 set line 1000;
 set pagesize 0;
 set sqlprompt '';
 set echo off;
 set feedback off;
 set trimspool on;
spool cdukes;
SELECT '<ERRTEXT>' || ee.error_text || '</ERRTEXT><EXPL>' || ed.ERROR_EXPLANATION_TEXT || '</EXPL><ACTION>' || ed.ERROR_ACTION_TEXT
|| '</ACTION><LINKS>' ||  ed.ERROR_LINKS_TEXT || '</LINKS>' FROM ACS.emd_error ee, ACS.emd_error_detail ed where ee.ERROR_ID = ed.ER
ROR_ID and ed.LOCALE_CD = 'en_US';
EOF


Here are the last 3 fields that get exported:

<ERRTEXT>%CWAN_RP-6-IMAGE_UPGRADE: Bootflash image upgrade [chars] for slot [int]/[int][chars]</ERRTEXT><EXPL>The bootflash image on the CWAN line card has been automatically upgraded.</EXPL><ACTION>No action is required.</ACTION><LINKS></LINKS>
<ERRTEXT>%DEBUGGER-0-CCHAIN: [chars]</ERRTEXT><EXPL>This message shows a line from the call chain and is part of a fatal error dump. The CIP
has encountered an unrecoverable problem and is printing out contextual information about where
the problem occurred. A fatal error dump consists of the following parts:
Headlines with software and hardware versions
The load map of all the dynamically loaded code segments
All the interrupt stacks currently in use
The trace table
The first 1
KB of CIP low core memory
The first 1
KB of the stack of the currently active task</EXPL><ACTION>To capture all these error messages, ensure that you have set the logging buffered
command to 64000, or log to a system log server. Frequently such a fatal error dump is immediately
preceded by some additional CIP error messages. Ensure that you capture those messages as well.
Contact your Cisco technical support representative and provide the representative with the gathered
information.</ACTION><LINKS></LINKS>

<ERRTEXT>%AT-3-DOMLOOP: Loop detected on domain [dec] [[chars]]</ERRTEXT><EXPL>The domain router has detected a routing loop. Routing loops are not allowed. The
domain router runs a background loop detection process. The domain router starts this process when
it receives a new zone list from a domain that is identical to the list in the main routing table and
whose network range length matches that in this list. The loop detection process sends several
AppleTalk NBP loopback packets. When one of these packets is received on an interface that does
not belong to the original domain, the domain router first shuts off all the domains involved in the
loop and then shuts off all the interfaces in these domains. The loop detection does not catch all
types of loops. The user must ensure that no loop exists.</EXPL><ACTION>Disable the cause of the routing loop. Then use the clear appletalk command
to restart the interfaces involved.</ACTION><LINKS></LINKS>

<ERRTEXT>%FR_VCB-3-PROCESS_SWITCHING: Switching error - vcb [chars] - [chars]</ERRTEXT><EXPL>An error occurred while packets were being switched across the VC bundle.</EXPL><ACTION>Delete the VC bundle and employ a PVC to substitute for the VC bundle.</ACTION><LINKS></LINKS>
<ERRTEXT>%FRATM-3-CONFIG_ERROR: [chars]</ERRTEXT><EXPL>An internal software error has occurred.</EXPL><ACTION>Copy the error message exactly as it appears on the console or in the system
log. Issue the show tech-support command to gather data that might help identify the nature of the
error. If you cannot determine the nature of the error from the error message text or from the show
tech-support command output, contact your Cisco technical support representative and provide the
representative with the gathered information.</ACTION><LINKS></LINKS>

ERROR:
ORA-01489: result of string concatenation is too long

ASKER CERTIFIED SOLUTION
Avatar of neo9414
neo9414

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cdukes

ASKER

Not sure I understand, what data would be truncated? Is there no way to get everything dumped to a text file?
One would think this would be a simple task?
Avatar of cdukes

ASKER

That appears to have done the trick, all 27k records look like they exported ok.
Thanks for teh help!
Avatar of neo9414
neo9414

if you use a pl/sql procedure to do your task then it can be done without truncation. In pl/sql, varchar can extend to 32K which should be enough. however, with procedure the data file will be generated on the server.

You can tell that "someone" who gave you the script about the problem you faced. he should be able to help you out.