Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to put limit on a file size? Post 302435823 by rajeshorpu on Thursday 8th of July 2010 09:10:33 AM
Old 07-08-2010
How to put limit on a file size?

Hi All,

I want to insert xyz.log file in CLOB field of Oracle DB. The log file increases its size dynamically. When i am inserting the file into DB i have to check the size of the file, if its size is more than 32KB then insert upto that size into CLOB field of DB. Otherwise proceed normally.

Please help, any sample code if you have any thing.

Thanks,
Raj
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Limit size of the file

How do I limit size of a file to 1 MB or something like that under Linux? (4 Replies)
Discussion started by: _hp_
4 Replies

2. Solaris

File size limit

I want to have a permanent file created - and limit the size that this file can grow.. I want a circular file.. ie max size of file is 10 mb.. and if any new data written to file the oldest data removed.. How can I do this? I am on solaris 9 x86 (3 Replies)
Discussion started by: frustrated1
3 Replies

3. AIX

file size limit

Can anybody help me? How to increase file size limit in aix 5.2? I have already specified in /etc/security/limits file : default: fsize = -1 core = 2097151 cpu = -1 data = -1 rss = -1 stack = -1 nofiles = 2000 (2 Replies)
Discussion started by: vjm
2 Replies

4. Programming

File size limit exceeded

When i run my C program which dynamically creates the output file, the program stops after sometime and gives the error "File size limit exceeded" even though my working directory has space.Can anyone plz help me out. (13 Replies)
Discussion started by: drshah
13 Replies

5. UNIX for Advanced & Expert Users

File Size Limit

Hi, I have a problem writing or copying a file 2GB or larger to either the second or third disk on my C8000. I've searched this forum and found some good information on this but still nothing to solve the problem. I'm running hpux 11i, JFS3.3 and disk version 4 (from fstyp) on all 3 disks. ... (2 Replies)
Discussion started by: HaidoodFaulkauf
2 Replies

6. UNIX for Dummies Questions & Answers

Size limit for FTPing file

Is there any size limit for FTPing file from one unix system to another? (6 Replies)
Discussion started by: swarup2008
6 Replies

7. UNIX for Advanced & Expert Users

file size limit?

hi, how can I find out what the limit of a file size is on unix? thanks (6 Replies)
Discussion started by: JamesByars
6 Replies

8. Shell Programming and Scripting

sftp file size limit

Hi, Can some one please tell me the file size limit (if any) while using sftp I am trying to transfer a file ( size is almost 350 MB ) but it fails as shown below. sftp> put file1 ./file1 Uploading file1 to /dir1/./file1 file1 25% 100MB 10.2MB/s 00:28 ETA Couldn't write to remote... (6 Replies)
Discussion started by: vikash_k
6 Replies

9. Shell Programming and Scripting

Limit on a File size.

Hi All, I want to store 32KB of file in Oracle DB into CLOB field. I am not able to insert more than 32KB of file into CLOB. So i want to put a limit on the file size. I am using k shell. My file size will dynamically increase its size, i want to check the file size if it is more than 32KB... (1 Reply)
Discussion started by: rajeshorpu
1 Replies

10. HP-UX

Individual file size limit on HP-UX

I got a question on ulimit on HP-UX. I have a log file that gets more than 2 GB and the application crashes because it can not write to log. I browsed through the forum and found one very similar post on ulimit but that was not concluded. Did some analysis and below is some output. >getconf... (6 Replies)
Discussion started by: asutoshch
6 Replies
DB2_LOB_READ(3) 							 1							   DB2_LOB_READ(3)

db2_lob_read - Gets a user defined size of LOB files with each invocation

SYNOPSIS
string db2_lob_read (resource $stmt, int $colnum, int $length) DESCRIPTION
Use db2_lob_read(3) to iterate through a specified column of a result set and retrieve a user defined size of LOB data. PARAMETERS
o $stmt - A valid stmt resource containing LOB data. o $colnum - A valid column number in the result set of the stmt resource. o $length - The size of the LOB data to be retrieved from the stmt resource. RETURN VALUES
Returns the amount of data the user specifies. Returns FALSE if the data cannot be retrieved. EXAMPLES
Example #1 Iterating through different types of data <?php /* Database Connection Parameters */ $db = 'SAMPLE'; $username = 'db2inst1'; $password = 'ibmdb2'; /* Obtain Connection Resource */ $conn = db2_connect($db,$username,$password); if ($conn) { $drop = 'DROP TABLE clob_stream'; $result = @db2_exec( $conn, $drop ); $create = 'CREATE TABLE clob_stream (id INTEGER, my_clob CLOB)'; $result = db2_exec( $conn, $create ); $variable = ""; $stmt = db2_prepare($conn, "INSERT INTO clob_stream (id,my_clob) VALUES (1, ?)"); $variable = "THIS IS A CLOB TEST. THIS IS A CLOB TEST."; db2_bind_param($stmt, 1, "variable", DB2_PARAM_IN); db2_execute($stmt); $sql = "SELECT id,my_clob FROM clob_stream"; $result = db2_prepare($conn, $sql); db2_execute($result); db2_fetch_row($result); $i = 0; /* Read LOB data */ while ($data = db2_lob_read($result, 2, 6)) { echo "Loop $i: $data "; $i = $i + 1; } $drop = 'DROP TABLE blob_stream'; $result = @db2_exec( $conn, $drop ); $create = 'CREATE TABLE blob_stream (id INTEGER, my_blob CLOB)'; $result = db2_exec( $conn, $create ); $variable = ""; $stmt = db2_prepare($conn, "INSERT INTO blob_stream (id,my_blob) VALUES (1, ?)"); $variable = "THIS IS A BLOB TEST. THIS IS A BLOB TEST."; db2_bind_param($stmt, 1, "variable", DB2_PARAM_IN); db2_execute($stmt); $sql = "SELECT id,my_blob FROM blob_stream"; $result = db2_prepare($conn, $sql); db2_execute($result); db2_fetch_row($result); $i = 0; /* Read LOB data */ while ($data = db2_lob_read($result, 2, 6)) { echo "Loop $i: $data "; $i = $i + 1; } } else { echo 'no connection: ' . db2_conn_errormsg(); } ?> The above example will output: Loop 0: THIS I Loop 1: S A CL Loop 2: OB TES Loop 3: T. THI Loop 4: S IS A Loop 5: CLOB Loop 6: TEST. Loop 0: THIS I Loop 1: S A BL Loop 2: OB TES Loop 3: T. THI Loop 4: S IS A Loop 5: BLOB Loop 6: TEST. SEE ALSO
db2_bind_param(3), db2_exec(3), db2_execute(3), db2_fetch_row(3), db2_prepare(3), db2_result(3). PHP Documentation Group DB2_LOB_READ(3)
All times are GMT -4. The time now is 01:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy