Is there any alternative for DBMS_OUTPUT.PUT_LINE?
I have to get the data from tables into a flatfile through a stored procedure. I could just run a query and spool the data into flat file. But a single query is not enough to get my result, hence I have to use the stored procedure. From stored procedure, is DBMS_OUTPUT.PUT_LINE the only way to get the result? I am getting an error of buffer 1000000 exceeding for DBMS_OUTPUT.PUT_LINE. My data is exceeding 10,00,000. Is there any other way that i could spool the result.
But for now i am trying on client box, and i am getting the below error.
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "SYS.UTL_FILE", line 98
ORA-06512: at "SYS.UTL_FILE", line 157
ORA-06512: at "VIMALA.SP_FLATFILE", line 39
ORA-06512: at line 1
text_io package is part of Oracle forms, this isn't stored package.
U can't use this package in sqlplus or in any store procedures.
If u going to use text_io then u should:
-- create some Oracle forms application
-- us functions/procedures from text_io package into this application only.
If u going to use utl_file u must setup in init.ora:
UTL_FILE_DIR = *
(or some path, that can be mapping from oracle server box)
for example:
UTL_FILE_DIR = /data/io_from_database ...
Bookmarks