Hi ,
Oracle EE 8.1.7.0.0 on MS WIndows Advanced Server 2000 SP3
We have a proc which is using utl_file .
procedure test_dump_csv
as
l_rows number;
begin
l_rows := SK_dump_csv(
'select SIKEY, SERIAL, SKUCODE, BATCHCODE, BATCHDATE, BATCHEXPIRYDATE,
SKUSERIAL, UOMCODE, WHCATCODE, WHAREACODE, RATE, ORDERQTY,EXECQTY,
AMOUNT, BALINVQTY, ADDUID, ADDUIDTIME, EDITUID, EDITUIDTIME, CNFMUID,
CNFMUIDTIME, STATUS, RETURNQTY,SOSKUDTLSERIAL, MAINSTOCKBAL,
LASTCHANGEDRATE, LASTCHANGEDAMT, BATCHKEY, CHARGEAMT, FILLTYPE,
BALSTNQTY, SCHEDDATE,TOTITRQTY, ALLOCKEY, ALLOCQTY, TD, EXCISE,
TDPERC, EXCISERATETYPE, EXCISERATE, EXCISEINCL, NEWEXCISEAMT,
NEWEXCISERATE,NEWTDAMT, NEWTDPERC from WHSISKUDTL where rownum <
1000',',','l:\oracle\oradata\fostest\Testing','tes t1.csv');
end;
Here we are finding 1000 rows using function SK_Dump_CSV. This works
fine. But when I use more than 1000 rows in procedure , it gives me
error ORA-06510 & 6512
Proc gets compiled for rownum < 2001 but execution gives problem.
I tried compiling & running proc in another instance which runs on
HP-UX 11.0. There it gives no problem for rownum > 1000 .
WHat can be the issue on NT ?
Any help/pointers in this is highly appreciated ...
Regards,
Mahesh Hardikar 2 3494
Well, I am guessing you're calling DBMS_SQL - did you verify DBMS_SQL execution
is OK ? ha*******@yahoo.com (Mahesh Hardikar) wrote in message news:<4a**************************@posting.google. com>... Hi ,
Oracle EE 8.1.7.0.0 on MS WIndows Advanced Server 2000 SP3
We have a proc which is using utl_file .
procedure test_dump_csv as l_rows number; begin l_rows := SK_dump_csv( 'select SIKEY, SERIAL, SKUCODE, BATCHCODE, BATCHDATE, BATCHEXPIRYDATE, SKUSERIAL, UOMCODE, WHCATCODE, WHAREACODE, RATE, ORDERQTY,EXECQTY, AMOUNT, BALINVQTY, ADDUID, ADDUIDTIME, EDITUID, EDITUIDTIME, CNFMUID, CNFMUIDTIME, STATUS, RETURNQTY,SOSKUDTLSERIAL, MAINSTOCKBAL, LASTCHANGEDRATE, LASTCHANGEDAMT, BATCHKEY, CHARGEAMT, FILLTYPE, BALSTNQTY, SCHEDDATE,TOTITRQTY, ALLOCKEY, ALLOCQTY, TD, EXCISE, TDPERC, EXCISERATETYPE, EXCISERATE, EXCISEINCL, NEWEXCISEAMT, NEWEXCISERATE,NEWTDAMT, NEWTDPERC from WHSISKUDTL where rownum < 1000',',','l:\oracle\oradata\fostest\Testing','tes t1.csv'); end;
Here we are finding 1000 rows using function SK_Dump_CSV. This works fine. But when I use more than 1000 rows in procedure , it gives me error ORA-06510 & 6512 Proc gets compiled for rownum < 2001 but execution gives problem.
I tried compiling & running proc in another instance which runs on HP-UX 11.0. There it gives no problem for rownum > 1000 .
WHat can be the issue on NT ?
Any help/pointers in this is highly appreciated ...
Regards, Mahesh Hardikar
Well ,
We have a function
CREATE OR REPLACE function SK_dump_csv( p_query in varchar2,
p_separator in varchar2 default
',',
p_dir in varchar2 ,
p_filename in varchar2 )
return number
is
l_output utl_file.file_type;
l_theCursor integer default dbms_sql.open_cursor;
l_columnValue varchar2(2001);
l_status integer;
l_colCnt number default 0;
l_separator varchar2(10) default '';
l_cnt number default 0;
begin
dbms_output.put_line(p_dir || ' - ' || p_filename);
l_output := utl_file.fopen( p_dir, p_filename, 'w' );
dbms_sql.parse( l_theCursor, p_query, dbms_sql.native );
for i in 1 .. 255 loop
begin
dbms_sql.define_column( l_theCursor, i, l_columnValue,
3000 );
l_colCnt := i;
exception
when others then
if ( sqlcode = -1007 ) then exit;
else
raise;
end if;
end;
end loop;
dbms_sql.define_column( l_theCursor, 1, l_columnValue, 3000 );
l_status := dbms_sql.execute(l_theCursor);
loop
exit when ( dbms_sql.fetch_rows(l_theCursor) <= 0 );
l_separator := '';
for i in 1 .. l_colCnt loop
dbms_sql.column_value( l_theCursor, i, l_columnValue );
utl_file.put( l_output, l_separator || l_columnValue );
l_separator := p_separator;
end loop;
utl_file.new_line( l_output );
l_cnt := l_cnt+1;
end loop;
dbms_sql.close_cursor(l_theCursor);
utl_file.fclose( l_output );
return l_cnt;
end SK_dump_csv;
Procedure is calling this function .
Also , the proc runs for rownum < 2000 but o/p is not proper on NT.
When we give rownum < 2001 , procedure does not run only giving
ORA-6510 - 6512 errors.
Mahesh rc***@panix.com (Robert C) wrote in message news:<25**************************@posting.google. com>... Well, I am guessing you're calling DBMS_SQL - did you verify DBMS_SQL execution is OK ? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Souhail |
last post by:
Hi all,
I have a problem to put lines with about 3000 characters in my output
file using UTL_FILE.put package.
I'm using Oracle 7 !! So I can not specify the line size in
UTL_FILE.FOPEN...
|
by: Candy Robinson |
last post by:
I have created a directory for the path name I use for a UTL_FILE.OPEN
call, but when I run my call I get error ORA-29280 invalid directory
path. What am I failing to do? Thanks for your help,
...
|
by: Peter Weidner |
last post by:
Hello friends
I have a problem with UTL_File under Oracle 9.2i there - operating
system Windows 2000 Professional.
Following: I have a procedure in a Package, that reads from an
Utl_File and...
|
by: Shilpesh |
last post by:
I have an issue in usage of utl_file package. I have setup
utl_file_dir parameters correctly on the database side.
Basically my goal is to convert csv files into table-structure. I do
not know...
|
by: Prasanna |
last post by:
Hi All
Nice to be in this Forum.
I have questions to ask on UTL_FILE :roll:
Let me explain the concept
1.When the net is down the user will take the records into on
floppy(CLIENT
2.When the net...
|
by: djramesh04 |
last post by:
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 33
ORA-06512: at "SYS.UTL_FILE", line 436
ORA-06512: at "CPLNMGR.PARSE_STRING", line 13
ORA-06512: at line 1
CREATE OR...
|
by: orajit |
last post by:
I have created one file
c;/temp/test.txt
000|23102007
001|21102007|23102007|GB11223344
001|20102007|22102007|GB11223345
001|19102007|22102007|GB11223346
999|3
The highlighted text are...
|
by: Mahesh Hardikar |
last post by:
Hi ,
Oracle EE 8.1.7.0.0 on MS WIndows Advanced Server 2000 SP3
We have a proc which is using utl_file .
procedure test_dump_csv
as
l_rows number;
begin
|
by: abulafia |
last post by:
Originally posted by Julia Sats
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |