Home » SQL & PL/SQL » Client Tools » SQL*PLUS generated abnormal file size. ( Oracle version : 9.2.0.1.0,WinXP)
SQL*PLUS generated abnormal file size. [message #279648] Fri, 09 November 2007 09:03 Go to next message
ashwin_tampa
Messages: 40
Registered: October 2005
Member
Hello Guys,

I am facing a problem with SQL*PLUS generated file output.

Here is the situation:

Correct file size should be: 64,905 KB (i.e. 624,221 rows from the query)

But I am getting abnormal file size: 3,049,286 KB !!

And when I try to open my Texpad is says :

TexPad message: Disk full while accessing C:\sample_data\AHCA_RX_11092007_Q3.txt

What could be wrong?

Any help will be greatly appreciated!

Here is file configuration:



SET ECHO OFF
SET SERVEROUTPUT ON SIZE 1000000
SET LINE 5000
SET VERIFY OFF
SET PAGESIZE 0

col filename1 new_value filename1

select DISTINCT 'AHCA_RX_'||TO_CHAR(SYSDATE,'MMDDYYYY')||'_Q'||(TO_CHAR (SYSDATE, 'Q') - 1)||'.txt' filename1 from dual;

spool  c:\pharm_data\&filename1


.......And my code goes here.................



SPOOL OFF

Re: SQL*PLUS generated abnormal file size. [message #279652 is a reply to message #279648] Fri, 09 November 2007 09:08 Go to previous messageGo to next message
Michel Cadot
Messages: 64108
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:

SET LINE 5000

Each line is 5000 characters long.

Use TRIMSPOOL ON

Regards
Michel
Re: SQL*PLUS generated abnormal file size. [message #279654 is a reply to message #279648] Fri, 09 November 2007 09:09 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
>What could be wrong?
Disk full
Re: SQL*PLUS generated abnormal file size. [message #279738 is a reply to message #279654] Fri, 09 November 2007 23:10 Go to previous messageGo to next message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Further to Michel's post:

624,221 rows x ( 5000 bytes + CR + LF ) = 3,049,173Kb

Ross Leishman
Re: SQL*PLUS generated abnormal file size. [message #280344 is a reply to message #279738] Tue, 13 November 2007 05:06 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
You want TRIMSPOOL
Re: SQL*PLUS generated abnormal file size. [message #280366 is a reply to message #280344] Tue, 13 November 2007 06:04 Go to previous messageGo to next message
Littlefoot
Messages: 20893
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
But, hm, Michel said that 4 days ago. Did he use invisible ink which faded away? Smile
Re: SQL*PLUS generated abnormal file size. [message #280382 is a reply to message #280366] Tue, 13 November 2007 06:37 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
So he did - I completely missed that the first time round. Saw the Linesize comment, missed the rest of it.

I need more sleep.
Previous Topic: New Page/Break on commands
Next Topic: Connecting to another DB.
Goto Forum:
  


Current Time: Mon Dec 05 05:01:22 CST 2016

Total time taken to generate the page: 0.05231 seconds