بتاريخ: 5 نوفمبر 201411 سنة comment_256390 السلام عليكم ورحمة الله وبركاته عندي مجموعه صور كتيره جدا المطلوب إدخالها في جدول في اوراكل 6 دورت كتير على النت لقيت الطريقه دي بس مش فاهاماها حد يقدر يفهمهالي ويفهمني اعمل ايه ؟ CREATE TABLE photoalbum (photolob BLOB); Step 2) Create a file (example photos.txt ) which will contain list of images to be uploa bash-2.05$ cat photos.txt Winter.jpg Water_lilies.jpg Sunset.jpg Blue_hills.jpg Step 3) create a control file required by SQL*Loader to upload data. Create new file called loadphotos.ctl and insert following content into it. load data infile photos.txt into table photoalbum (ext_fname filler char(200), photolob lobfile(ext_fname) terminated by EOF) The meaning of above code is “please load the data listed in the file photos.txt into a table called photoalbum. The data will be loaded into the column of that table called ‘photoblob’ and has lobfile characteristics… that is, it’s binary data. Expect the file names for the binary files being loaded to be up to 200 characters in length. When you reach the end of the list of photos, terminate the load process”. Step 4) Run SQL*Loader Please note that photos.txt is used in control file and we are not giving absolute path, but relative path. So control file and photos.txt should be in same directory. And so also all images. See below. bash-2.05$ pwd /dy/oracle/product/db10g/photo bash-2.05$ ls -lrt total 576 -rw-r–r– 1 db10g oinstall 105542 Jun 2 23:43 Winter.jpg -rw-r–r– 1 db10g oinstall 83794 Jun 2 23:43 Water_lilies.jpg -rw-r–r– 1 db10g oinstall 71189 Jun 2 23:43 Sunset.jpg -rw-r–r– 1 db10g oinstall 28521 Jun 2 23:43 Blue_hills.jpg -rw-r–r– 1 db10g oinstall 127 Jun 2 23:46 loadphotos.ctl -rw-r–r– 1 db10g oinstall 54 Jun 2 23:48 photos.txt bash-2.05$ sqlldr system/manager control=loadphotos.ctl SQL*Loader: Release 10.2.0.1.0 – Production on Sat Jun 2 23:48:21 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.Commit point reached – logical record count 4The above message shows that data is uploaded correctly. You can check the log file generated by SQL Loader at same location.SQL> select count(*) from photoalbum 2 ; تم تعديل 6 نوفمبر 201411 سنة بواسطة Ahmad.Hasan تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.