cdukes
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/open win/bin:/u sr/bin:/op t/local/cs e/bin:/bin :/apps/ora cle/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]</ERRTEX T><EXPL>Th e bootflash image on the CWAN line card has been automatically upgraded.</EXPL><ACTION>No action is required.</ACTION><LINKS>< /LINKS>
<ERRTEXT>%DEBUGGER-0-CCHAI N: [chars]</ERRTEXT><EXPL>Thi s 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><LINK S></LINKS>
<ERRTEXT>%AT-3-DOMLOOP: Loop detected on domain [dec] [[chars]]</ERRTEXT><EXPL>T he 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>Disa ble 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>Dele te the VC bundle and employ a PVC to substitute for the VC bundle.</ACTION><LINKS></L INKS>
<ERRTEXT>%FRATM-3-CONFIG_E RROR: [chars]</ERRTEXT><EXPL>An internal software error has occurred.</EXPL><ACTION>Co py 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><LINK S></LINKS>
ERROR:
ORA-01489: result of string concatenation is too long
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:/
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_
<ERRTEXT>%DEBUGGER-0-CCHAI
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><LINK
<ERRTEXT>%AT-3-DOMLOOP: Loop detected on domain [dec] [[chars]]</ERRTEXT><EXPL>T
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>Disa
to restart the interfaces involved.</ACTION><LINKS><
<ERRTEXT>%FR_VCB-3-PROCESS
<ERRTEXT>%FRATM-3-CONFIG_E
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><LINK
ERROR:
ORA-01489: result of string concatenation is too long
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That appears to have done the trick, all 27k records look like they exported ok.
Thanks for teh help!
Thanks for teh help!
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.
You can tell that "someone" who gave you the script about the problem you faced. he should be able to help you out.
ASKER
One would think this would be a simple task?