Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix & Oracle Script - Creating File 2gig +

Status
Not open for further replies.

saw15

Technical User
Jan 24, 2001
468
US
Working with Unix and Oracle.

I am calling sqlplus to spool a text file on the Unix box. I need two years worth of data, rather easy script.

Problem, is that when I run the script, it generates approx 2.097 gig worth of data in the *.txt file and then simply stops.

Is this a limitation for a single text file? The filesystem is not running out of space.

Is there a way around this?

Thanks.
 
in version 11.0, if the filesystem isn't large file enabled, you won't be able to have files larger than 2 GB. You can change the filesystem to be large file enabled (I tested it through sam, but you can do it with the fsadm command on the command line. See the man page for fsadm.) The filesystem is unmounted when the change is made through sam. I don't know if it would have to be with fsadm if you have advanced online jfs.

I use version 11.0. I'm not sure if this is available in earlier versions of HP-UX.
 
Try using the following : (use split and fifo-mknod)
cd /tmp/Oracle
rm spool.txt
mknod spool.txt p
split -b2047m </tmp/Oracle/spool.txt &
sqlplus scott/tiger@ORCL @SCR.sql #put the spool file path as /tmp/Oracle/spool.txt

cd /tmp/Oracle
rm spool.txt
mknod spool.txt p
cat xaa xab xac xad > /tmp/Oracle/spool.txt $ vi /tmp/Oracle/spool.txt

Hope this solves your problem.
 
Exactly what I needed on both accounts. Thankyou very much.
 
Hello saweens,

You need to have enabled that the filesystem support files greater than 2GB, to support this try
1. ummount the filesystem
2. fsadm -F hfs -o largefiles /dev/vgxx/lvolxx, replace xx with the information about the filesystem where you want big files.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top