How to export table data to .csv fil and send that file to folder using sql commands?
Greetings for the day!!!
I am really hoping that i would get solution for my question. My question is i want to know the logic for exporting the data from oracle table to .csv file and .csv file should be placed in specified folder on desktop. Earlier I was manually exporting the data into .csv files and placed those files into manually created folders. But now i have to do it 200 folders . It is impossible for me to do manually. So please some one help in this , how can i do it automatically using plsql code. I am using oracle 11g.
Thanks in advance!!
why pl/sql? pl/sql can't see a remote desktop.
Just replicate what you used to to manuallly on the cliente side, a shell script (if Unix/Linux) or batch file (if Windows) would do it and you are ready to to.
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Thanks for your suggestion. Mine is windows os. So i am ready to do with batch file. Can you please guide me????
Thanks alot in advance!!!
I am on windows 7 os. Could any one suggest me how to export the data into .csv file and send that file to specifed folder with BATCH FILE PROCESS. Your suggestions help me alot.
Thanks in advance..
If you use windows, you should download Cygwin tools. It give you some of the flexibility of the bash shell, although it is easier to just use bash on Linux. If your windows session can authenticate to the remote server, then you can use rsync within Cygwin to move over what ever files you want to move over. I have a customer that run Windows 2000 and I use cygwin to copy archive logs to a DR server. You can even have rsync delete files on the target side that don't exist on the source side. You should want all of your files to get placed under the C:\ drive and in one folder. When you use Cygwin utilities you should use the linux type path. For example //Cygwin/C/temp. You can use the pwd command in cygwin to get the right path.
this space intentionally left blank
If you know how to ftp a file from one windoze server to another, you already have the solution.
Originally Posted by gita09
There are many options to generate csv files from Oracle, just Google it!.
"The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb
Tags for this Thread
Click Here to Expand Forum to Full Width