Unix/Linux Go Back    


UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics.

UNIX spool command not extracting complete record from the Oracle table

UNIX and Linux Applications


Tags
solved, unix spool not complete record

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 10-29-2015
venkat_reddy venkat_reddy is offline
Registered User
 
Join Date: Oct 2015
Last Activity: 23 March 2017, 9:30 AM EDT
Posts: 18
Thanks: 3
Thanked 0 Times in 0 Posts
UNIX spool command not extracting complete record from the Oracle table

Hello All,

I'm trying to spool an oracle table data into a csv file on unix server but the complete record is not being extracted. The record is almost 1000 characters but only 100 characters are being extracted and rest of the data getting truncated.

I'm setting below options :


Code:
SET HEADING OFF
SET SPACE 0
SET PAGESIZE 0
SET PAGESIZE 1000
SET LINESIZE 10000
SET FEEDBACK OFF
SET TAB OFF
SET TRIMSPOOL ON

Please suggest

Thanks in advance

Last edited by Don Cragun; 10-29-2015 at 03:28 PM.. Reason: Add CODE tags.
Sponsored Links
    #2  
Old Unix and Linux 10-29-2015
os2mac's Unix or Linux Image
os2mac os2mac is offline
Registered User
 
Join Date: Oct 2012
Last Activity: 26 April 2017, 11:07 AM EDT
Location: Anchorage, AK
Posts: 236
Thanks: 20
Thanked 25 Times in 25 Posts
are you dumping it straight to LP?

if so it might be the printer config.

try dumping the output to a txt file then reading it.
Sponsored Links
    #3  
Old Unix and Linux 10-30-2015
cero cero is offline
Registered User
 
Join Date: Aug 2006
Last Activity: 28 April 2017, 10:57 AM EDT
Posts: 451
Thanks: 4
Thanked 98 Times in 90 Posts
What is the data type of the columns involved? If it's LONG, CLOB, NCLOB or XMLType the default width is set by LONGCHUNKSIZE of LONG, whichever is smaller.
To ignore the default width use the COLUMN command:

Code:
COLUMN you_clob_column FORMAT A1000

PS.: the SPOOL command is not a UNIX, but a SQL*Plus command.
The Following User Says Thank You to cero For This Useful Post:
DANAOS_master (10-31-2015)
    #4  
Old Unix and Linux 10-30-2015
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 26 April 2017, 12:15 PM EDT
Location: In the leftmost byte of /dev/kmem
Posts: 5,407
Thanks: 99
Thanked 1,491 Times in 1,108 Posts
Quote:
Originally Posted by venkat_reddy View Post
I'm setting below options :


Code:
SET PAGESIZE 0
SET PAGESIZE 1000

Aren't the two above somewhat contradictory?
Quote:
Originally Posted by venkat_reddy View Post
Code:
SET TRIMSPOOL ON

And this is maybe better left out until you know exactly what to trim.

As this seems to be an application problem i am going to transfer this thread to the application section.

I hope this helps.

bakunin
The Following User Says Thank You to bakunin For This Useful Post:
DANAOS_master (10-31-2015)
Sponsored Links
    #5  
Old Unix and Linux 11-02-2015
venkat_reddy venkat_reddy is offline
Registered User
 
Join Date: Oct 2015
Last Activity: 23 March 2017, 9:30 AM EDT
Posts: 18
Thanks: 3
Thanked 0 Times in 0 Posts
Issue resolved

Hello All,

Thanks very much for the responses.

Issue is resolved now.

Thank you
Venkat
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unix command to extract a record from a table satyajit007 Shell Programming and Scripting 1 11-13-2009 02:05 AM
Check the record count in table (table in oracle) kamineni Shell Programming and Scripting 1 12-29-2008 05:32 AM
Check the record count in table (table in oracle) kamineni Shell Programming and Scripting 1 12-15-2008 07:31 AM
Spool command in Unix manosubsulo UNIX for Dummies Questions & Answers 6 10-15-2008 09:19 AM
Extracting column names from a table.. SQL with UNIX fmina UNIX for Dummies Questions & Answers 4 08-19-2008 01:52 AM



All times are GMT -4. The time now is 05:56 PM.