Welcome Guest ( Log In | Register )


 
 
 
 
 
 

 
 
Oracle 

Performance Tuning Reference poster
 
Oracle training in Linux 

commands
 
Oracle training Weblogic Book
 
Easy Oracle Jumpstart
 
Oracle training & performance tuning books
 
Burleson Consulting Remote DB Administration
 
 
 
Reply to this topicStart new topic
> how to create a txt file from PL/SQL procedure
Sathish
post Aug 18 2008, 02:04 AM
Post #1


Newbie
*

Group: Members
Posts: 6
Joined: 12-August 08
Member No.: 31,659



Hi,

I have a procedure that contains a varchar2 variable,now i need to create a text file in from procedure and move varchar2 content into the file.

Can any one help?

Thanks in advance
Go to the top of the page
 
+Quote Post
SteveC
post Aug 18 2008, 02:48 AM
Post #2


Advanced Member
***

Group: Members
Posts: 2,835
Joined: 11-March 08
Member No.: 18,933



Look at utl_file.

http://download.oracle.com/docs/cd/B19306_...le.htm#BABGGEDF
Go to the top of the page
 
+Quote Post
Sathish
post Aug 18 2008, 09:00 AM
Post #3


Newbie
*

Group: Members
Posts: 6
Joined: 12-August 08
Member No.: 31,659



QUOTE (SteveC @ Aug 18 2008, 01:19 PM) *




Hi,

I am using oracle client.I need to create text file in my system using Utl_File.File_Type.how to give dir path?
Go to the top of the page
 
+Quote Post
SteveC
post Aug 18 2008, 09:46 AM
Post #4


Advanced Member
***

Group: Members
Posts: 2,835
Joined: 11-March 08
Member No.: 18,933



Thanks for providing your information in bits and pieces. Let's answer this incompletely a few more times until we have all of the relevant information from you, okay? You will need to use an external procedure call (e.g., Java) to write something on your client. Or, have the server write the file to a shared file system. What does on the client really mean? One of your local hard drives or somewhere on the NFS your client has access to?
Go to the top of the page
 
+Quote Post
Sathish
post Aug 19 2008, 12:14 AM
Post #5


Newbie
*

Group: Members
Posts: 6
Joined: 12-August 08
Member No.: 31,659



QUOTE (SteveC @ Aug 18 2008, 08:17 PM) *
Thanks for providing your information in bits and pieces. Let's answer this incompletely a few more times until we have all of the relevant information from you, okay? You will need to use an external procedure call (e.g., Java) to write something on your client. Or, have the server write the file to a shared file system. What does on the client really mean? One of your local hard drives or somewhere on the NFS your client has access to?



Hi SteveC,

I need to create a dir in my local hard disk.Because,server is not accessable by me.

My core objective :

I have data in varchar2 variable,it has huge length.So,i could not able to display using dbms_output.put_line due to stack overflow.I need to store this in my hard disk as a txt file.

Suggest me if any other ways to get back my data from varchar variable.

Thanks in advance.
Go to the top of the page
 
+Quote Post
SteveC
post Aug 19 2008, 01:51 AM
Post #6


Advanced Member
***

Group: Members
Posts: 2,835
Joined: 11-March 08
Member No.: 18,933



Select statement, procedure, function? Spool the output to a file.
http://dba-oracle.com/t_oracle:__write_a_f...a_client_pc.htm
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 1st November 2014 - 03:10 AM