DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: How to export table data to .csv fil and send that file to folder using sql commands?

  1. #1
    Join Date
    Apr 2013
    Posts
    3

    How to export table data to .csv fil and send that file to folder using sql commands?

    Hi friends!!!

    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!!

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    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.

  3. #3
    Join Date
    Apr 2013
    Posts
    3
    Hi Paul,

    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!!!

  4. #4
    Join Date
    Apr 2013
    Posts
    3
    Hi,,,

    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..

  5. #5
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    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.

  6. #6
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492
    Quote Originally Posted by gita09 View Post
    Hi,,,

    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 know how to ftp a file from one windoze server to another, you already have the solution.
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width