DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2008

    sql loader with pdf files

    Greetings all- My first question/post.

    I have a couple hundred pdf files on our file system. Each pdf name matches a record in a table in our Oracle database. I want to load the pdf files into their matching record in this Oracle table. I tried to write a php script to do this, but the files are somehow becoming corruptted and cannot be read back out on a web page. I thought to try to use sql loader.

    I've done a couple sql loader programs before, but never something like this. Is it possible to use sql loader to get a file (pdf) from a file system and insert it into a table based on the file name matching the file_name field in the table?

    I'm not even sure how to go about this. I do know I'd have to read the files or filenames from the file-system. Then in the sql-loader program I'd need some sort of where clause that says "insert this file into 'pdf_table' where the pdf filename matches the filename in the file_name field"

    Are there any tutorials for doing this sort of task?
    Thanks for any help!

  2. #2
    Join Date
    Mar 2007
    Ft. Lauderdale, FL
    I assume you are planning to store your pdf files into LOB columns, is that correct?

    Assuming I'm correct, sqlloader do allows to load data into LOBs; probably a whole chapter in Oracle documentation references such a feature.
    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
    Nov 2008
    The pdf files will be in a BLOB field.

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