Toad World® Forums

HUGECLOB-XML-Output with sqlplus doesn't work. But in Toad everything OK


#1

Hi folks
This is the relevant part of my shell script

XML_out ()
{
sqlplus -S < /var/tmp/current.xml

set echo Off
set term On
set pages 0
set head off
set ver off
set feed off
set trims on

SELECT DBMS_XMLGEN.
getxml (
‘SELECT a.user_id, b.jc_name, b.con_jc_name FROM USER_JC a,
jc_jc b WHERE a.jc_name = b.jc_name AND b.JC_NAME LIKE
‘‘71_SEC_WEST_%’’’)
FROM DUAL;

exit
EOF
}

The SQL statement works well in Toad and gives me a huge XML output
(HUGECLOB) - 1MB file. But with sqlplus I see only one partial row.

cheers Sven


#2

Hi Sven,

set long n

In SQL*Plus this determines the maximum size of a LONG, CLOB, NCLOB and
XMLType that will be displayed.

N defaults to 80 and has a maximum size (in 10g) of 2,000,000,000.

Cheers,
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk


#3

Have you tried doing:

set long 5000;

?
(or whatever value works for you)


#4

On Wed, Feb 9, 2011 at 3:25 PM, Dunbar, Norman (Capgemini)
wrote:

Hi Sven,

set long n

In SQL*Plus this determines the maximum size of a LONG, CLOB, NCLOB and
XMLType that will be displayed.

N defaults to 80 and has a maximum size (in 10g) of 2,000,000,000.

Hi Norm

thanks. Works fine. Toad is much more user friendly than SQLPlus. I
think I need to study a little bit SQL
Plus

cheers Sven