Problems with indexing files from my hard disk

Hi everybody,
I'm a newbie to oracle and i'm trying to index files from my hard disk with oracle text. After i created a simple text file (path: 'c:\tmp\test.txt') and filled it with a short text, i executed the following lines without an error message:
grant connect, resource, ctxapp to myuser;
create table myuser.testtab(id number primary key, text BFILE);
create or replace directory test_dir as 'c:\tmp';
grant read on directory test_dir to myuser;
insert into myuser.testtab (id, text) values (1, BFILENAME('test_dir','test.txt'));
create index myuser.idx_test on myuser.testtab(text) indextype is ctxsys.context;
the record in the table testtab is stored, but the index table is empty. After i tried to get information about the bfile with java i got an SQLException with the Error-Code ORA-22285 after executing the following lines:
BFILE file = null;
try{
rset = stmt.executeQuery("select text from testtab where id = 1");
if (rset.next()) {
file = ((OracleResultSet) rset).getBFILE(1);
System.out.println("Result from fileExists: " + file.fileExists()); //This is the line where the exception is thrown
} catch (Exception e){
e.printStackTrace();
I would be obliged for any information to this problem.
Thanks in advance,
Chris J.
PS: i'm using Oracle 11.2g on Windows 7

I got your problem. Drop all the directory,table and index. Log in as "myuser" and do all the things. See the demo below. Don't use myuser.object name When executing the commands from "myuser".
SQL> conn sys@xe as sysdba
Enter password: ******
Connected.
SQL> create table hr.testtab(id number primary key, text BFILE);
Table created.
SQL> create or replace directory test_dir as 'c:\';
Directory created.
SQL> grant read on directory test_dir to hr;
Grant succeeded.
SQL> insert into hr.testtab (id, text) values (1, BFILENAME('test_dir','test.txt'));
1 row created.
SQL> ed
Wrote file afiedt.buf
  1* create index hr.idx_test on hr.testtab(text) indextype is ctxsys.cont
SQL> /
Index created.
SQL> select * from ctxsys.CTX_INDEX_ERRORS;
ERR_INDEX_OWNER                ERR_INDEX_NAME                 ERR_TIMES
ERR_TEXTKEY
ERR_TEXT
HR                             IDX_TEST                       31-AUG-10
AAAEjaAABAAAKsKAAA
DRG-50857: oracle error in drstldef
ORA-22285: non-existent directory or file for FILEEXISTS operation
SQL> conn hr@xe
Enter password: **
Connected.
SQL> select * from CTX_USER_INDEX_ERRORS;
ERR_INDEX_NAME                 ERR_TIMES ERR_TEXTKEY
ERR_TEXT
IDX_TEST                       31-AUG-10 AAAEjaAABAAAKsKAAA
DRG-50857: oracle error in drstldef
ORA-22285: non-existent directory or file for FILEEXISTS operation
SQL> conn sys@xe as sysdba
Enter password: ******
Connected.
SQL> drop directory test_dir;
Directory dropped.
SQL> conn hr@xe
Enter password: **
Connected.
SQL> create or replace directory test_dir as 'c:\';
Directory created.
SQL> drop table testtab;
Table dropped.
SQL> create table testtab(id number primary key, text BFILE);
Table created.
SQL> set serverout on
SQL> DECLARE
  2   v_file BFILE := BFILENAME ('TEST_DIR', 'test.txt');
  3   BEGIN
  4   IF DBMS_LOB.FILEEXISTS (v_file) = 1 THEN
  5  DBMS_OUTPUT.PUT_LINE ('File exists.');
  6   ELSIF DBMS_LOB.FILEEXISTS (v_file) = 0 THEN
  7  DBMS_OUTPUT.PUT_LINE ('File does not exist');
  8  ELSE
  9   DBMS_OUTPUT.PUT_LINE ('Unable to test existence');
10   END IF;
11   END;
12  /
File exists.
SQL> insert into testtab values (1,BFILENAME ('TEST_DIR', 'test.txt'));
1 row created.
SQL> create index idx_test on testtab(text) indextype is ctxsys.context;
Index created.
SQL> select * from CTX_USER_INDEX_ERRORS;
no rows selected

Similar Messages

  • Deleting the old Archive Log Files from the Hard Disk

    Hello All,
    I want to delete the old archive files of Oracle. These files are very old and consuming very huge disk space.
    Is there any way by which I can delete these files from the Hard Disk?
    Can I directly delete them using the Operating System Command?
    Will it cause any dilfference to the normal functioning of my Database?
    If I need to delete these files, do I need to bring the database down?
    Please guide me.
    I need to do this activity to make some space free on the Hard Disk.
    Thanks in advance.
    Himanshu

    Hi.
    Keep archived logs from time of last backup and forward to currenct time on disk together with the backup itself. And keep older archived logs together with older warm/cold backupfiles on tape as long as there is enough capasity or following your recovery strategy. This way you might be able to roll forward a recovery without restoring these files from tape which often the faster.
    Older archived logs can be deleted manually, with scheduled OS script or automatically with RMAN.
    Good luck
    rgds
    Kjell Ove

  • Problem with NEF files from Nikon D4

    Hi everyone. I find a problem with nef files from my Nikon D4. When files are open in ViewNX2 (free viewer software from Nikon) they are perfect, as shooted... but in ACR they are very different... I use LR4 or CS5 with ACR 6.7 and the difference seems to be linked at D-Lighting function. My impression is that ACR dont read this option and picture are very very dark that original shootings. Anyone have this problem?

    This question used to be answered in the FAQ before they revised it.  So, here we go again.  ViewNX is capable of reading all of the in-camera settings such as, camera profile, saturation, sharpness and other settings.  It is capable of doing this because it is Nikon Software, and they have the ability to program it to read the settings from their raw images.  Lightroom does not read those settings from Nikon cameras or any other brand of camera.  Part of the reason is that different camera makers store those settings differently.
    When I first started using Lightroom I adjusted one of my images that represented what I normally shoot until it looked the way I wanted it.  Then I saved those adjustments as my default settings for the camera.  From that point onward, whenever I import images those settings are automatically applied, and it takes care of the vast majority of my images.  Of course, I still have to make individual adjustments.  But my default settings greatly reduce the amount of how they work that I have to do.
    Active D-lighting is is one of those features that Lightroom does not recognize.  You would be well advised not to use it, or else create a preset to simulate its effect.  It will provide no benefit to your Lightroom work.
    This is a fundamental difference with Lightroom, and something that must be understood and implemented if you are going to use the program effectively.
    I realize this question was asked in the ACR forum and I referenced Lightroom throughout.  But the principle is the same, and the recommended procedure is the same.

  • I just stared having problems with importing files from nikon D810 into LR 5.7 it pop a window saying it can not read files on working on a imac 27" running yosemite on my mac pro after a few times it finally was able to read files and import them into LR

    I just stared having problems with importing files from nikon D810 into LR 5.7 it pop a window saying it can not read files on working on a imac 27" running yosemite on my mac pro after a few times it finally was able to read files and import them into LR I never had this problem before was there some kind of update that could of cause this?

  • No permission to access files from previous hard disk

    I've just changed to a new hard disk and could not open files saved from old hard disk. Message given when i tried to open those files is that i do not have permission. What can be the problem and what is a possible solution?

    If you do a Get Info on the volume, try the "ignore ownership on this volume" item at the bottom. You will have to authenticate by ckicking on the "padlock" before you can change the option.

  • Cannot copy files from external hard disks

    This is happening often enough to be really painful:
    I insert a hard disk. I browse the files on it. I open a new window of Finder and drag some files from the external hard disk into my own machine (OSX Leopard 10.5.5). It croaks, telling me some "permissions" are wrong (Error -36).
    Browsing Google and Macosxhints and all of that, the suggestions indicate that I should "repair permissions", "repair disk", and reboot. All done. Still doesnt work.
    What now? I never had this problem with Windows. What's with this permissions drivel on OSX and how can I fix it once and for all? I only use my machine to browse on Firefox/Safari, talk with Skype, edit with Coda/Transmit, and then Office documents. Which of these tools changes these mysterious permissions so that I have to keep "repairing" again and again???
    Thanks for any pointers or advice!

    I am on shaky ground here because I am totally ignorant about about Windoze and MS-DOS. What I can tell you, though, is that the Unix underpinning of Mac OS X is heavily reliant on the concept of "ownership" which, apart from other factors, has security implications. FAT32 has absolutely no concept of file ownership. (That's why Microsoft encourages everyone to use NTFS instead - mainly for the security implications).
    You need advice - Sorry! - from someone more knowledgeable than me as to how to change both the format (to Mac OS Extended, Journaled) and the Partition Scheme (to GUID) *+while preserving your data+*. I presume that you would need to find a temporary home for that data, after which altering the drive's structures would take only a moment - but as to how to then correctly replace the data onto that drive I would prefer not to say. I would guess that simply transferring the data back onto the drive now with a 'Mac-appropriate' structure would suffice - but PLEASE do not entrust your data to my 'guess'.
    Wait patiently for someone who knows how to advise you to respond in this thread, or post again with a possibly more descriptive/pertinent title.
    Sorry not to have been of any help.
    Andreas

  • Reoccuring HANGING problem with transferring files from old MACBOOK

    ok, so I recently bought a iMac and i wanted to transfer my music and photo files from my older (waterdamaged a while back but still works fine) macbook. I've tried basically every method to try and get this done.
    I've tried migration assistant, transferring the files through a shared wireless network, through firewire/disk target mode, but all of those methods i tried resulted in hanging very early on in the transferring and copying operation.
    I believe it must have something to do with my macbook's hard drive, but i have no idea what to do at this point. Could someone please help me?

    the thing is tho, the hard drive had no problems copying and transferring for over a year after the damage, while i continued to use it. I don't a reason why it wouldn't work now when i finally want to move a larger number of files at once (itunes music folder, iphoto library)

  • Not able to delete file from external hard disk

    I connected my external hard disk to my macbook pro. But am not able to delete any file since it says the file cannot be deleted when I move it to trash. Could you let me know how to delete a file from the external hard disk?

    How is your HDD formatted? NTFS? FAT?
    Did you write files with rights? When you strike +I on any file, you can see its rights; if you're read-only, you may change your file's rights.

  • Permissions problem when copying files from external hard drive

    Hi.
    I have recently reinstalled leopard (wiped the hard drive clean) on my macbook pro. (10.5.4). I had used Time Machine so I have a complete backup. But I only wanted a few of the files so I didn't do a backup restore. I went into the file directory of the backup on my external hard drive and dragged the folders I wanted back over to my laptop.
    But I'm in permissions **** though! When I want to copy them over I get an alert saying you may not have privilege to do this and asks for my password. I enter my password and it copies fine. But every time I want to do anything with those files (like move them, or delete them) I have to re enter a password.
    So, inside of the terminal I do a "ls -al" command to see whats going on and find that everything is the same as a natively created folder except for a '@' on the permissions column. I do a "ls -al@' to see more details and I get this:
    drwxr-xr-x@ 6 xenition staff 204 Jul 20 17:08 Assets
    com.apple.metadata:_kTimeMachineNewestSnapshot 50
    com.apple.metadata:_kTimeMachineOldestSnapshot 50
    I did run repair permissions from Disk Utility and it didn't solve it. How can I resolve the permissions on these files?
    Message was edited by: risingtiger

    run ls -aleO on the copied files and see if there are any ACLs or flags.
    BTW, another (and possibly better) way to restore files from an old TM drive is via TM interface. control-click on TM in the dock and choose "browse other TM disks" select a disk to browse and go at it. when you try to restore something you'll be prompted for a location to restore it to and maybe a password.

  • Problems with Sony XDCAM PHU-60 hard disk unit

    Hello,
    I have footage that was shot using an EX3 and recorded to the PHU-60 hard disk unit. I've been using this since September with no problems. Today when I went to transfer the footage to my computer the PHU-60 is not mounting. I connected it back to my camera and the footage is there. I tried connecting the camera to the computer and it still won't mount. I really need to get this footage from the PHU-60 onto my computer. Any suggestions? Has anyone else had problems like this with the PHU-60?
    Mac Pro
    Sony EX3
    PHU-60 hard disk
    FCP 6.0.5

    After several restarts and trying multiple USB cables I have it working.

  • Problem with downloading file from FTP server

    Hello all
    I have uploaded a file from an application i developed and i want to download this file from another application. The code is
    public static void FTPcon() throws FtpException{
       String hostname = "my.ftp.server";
       String username = "myusername";
       String password = "mypass";
       Ftp ftp = new Ftp(hostname,username,password);
       ftp.setHostname(hostname);
            ftp.setUsername(username);
            ftp.setPassword(password);
            ftp.connect();
            ftp.setBinary();
            ftp.download("file.dat");
            ftp.disconnect();
    }The error i receive is java.io.FileNotFoundException: public.dat (The system cannot find the file specified) but the file is on the server.
    Thanks in advance for any help

    Cotton thank you for your reply
    Any other sugestions please?The server disagrees. So...
    - the file does not existThe file exists.I checked it with an FTP client program.
    - the file has a different nameThe file name is correct
    - you are connected to the wrong serverI am connecting to the correct server
    - you are in the wrong ftp directoryThe file is placed in the home directory
    - the ftp library you are using is broken (less
    likely)I am using the library from jscape.I dont think is broken because i can upload the file from the first application.
    >
    FTP isn't somehow broken in Java. I use it all the
    time. The problem is something listed above. I would
    check all of the first four if I were you because
    that's most likely where the problem is.Message was edited by:
    flightcaptain

  • I tried to empty the trash, full of back up file from my hard disk and it just says: "The operation can't be completed because an unexpected error occurred (error code -8003)"

    I have an external hard disk of 319.73 GB that I use as back up memory and where I put all the movies and other files that I can't leave on the computer as they occupy too much memory space . One day I was deleting all the previous dated back up to have more space on it , but had to stop the trash for doing it cause it was taking too long and now every time that I try to empty the trash it just says "The operation can’t be completed because an unexpected error occurred (error code -8003)" and even if I press CONTINUE it won't empting it . I'm not really pratical with this things and I tried already to find out the solution here and on Google but apparently nobody ever had a similar error code and I don't know what else to do.
    I've a MacBook Pro with a Mac OS X 10.6.8 Version.
    Thanks again for the help and sorry if I did some english mistakes !
    PEACE & LOVE

    Hey donnie90,
    It seems like this article might be the best for helping you address this issue:
    You can't empty the Trash or move a file to the Trash
    http://support.apple.com/kb/ht1526
    Thanks for coming to the Apple Support Communities!
    Regards,
    Braden

  • Problems with RAW files from Nikon D4

    At the moment I'm using LR 4.1 rc and PS CS 6 beta. I tried to send a D4 raw file from LR to PS, but PS didn't open it.
    The next thing I tried was to open D4 raws directly with PS CS 6, no success either.
    The raw files from my D200 aren't any problem.
    So is there knowledge wether PS CS 6 is supporting Nikon D4 RAWs or not? If it should be supported, what could be my problem?
    Thx in advance
    Dominik

    See this link for full details on camera support in Camera Raw versions:
    http://blogs.adobe.com/lightroomjournal/2012/03/raw-support-in-lightroom-and-camera-raw.ht ml
    Snip taken from link above:
    You’ll also note that ACR7, available with Photoshop CS6 beta, is lagging the most in updated camera support.  This is based on when we lock down or “bake” the code for each release.   Even though ACR7 was only released last week it was “baked” before Lightroom 4.0 and Camera Raw 6.7.  Similarly, Lightroom 4.0 was finalized before Camera Raw 6.7.  We’ll get Lightroom and Camera Raw in sync soon but in the interim, here’s the latest incremental support list for each product, relative to Camera Raw 6.6 and Lightroom 3.6:
    Photoshop CS6 beta with ACR7
    Canon PowerShot S100V
    Fuji FinePix X-S1
    NOTE:
    ACR7.1 will have the superset of all currently supported cameras in ACR6.7 and LR4.1 plus a few extras.

  • Problem with reading files from folders - please help

    Hi!
    I have 2 folders (folder1 and folder2) on 2 different locations. Now i will say few things about my program.
    First folder is input folder. Different applications generate XML files and put them inside folder1.
    Then i have my application which i use to manipulate with those folders. Basically, i have 2 threads. One is checking if there are files in folder1 and other thread is moving manipulated files from folder1 to folder2.
    I face this problem. XML files are much faster generated then manipulated. Example: for every 3 incoming files into folder1 i have 1 manipulated and stored file into folder2. This way i face problem that some older files are never manipulated, they are stuck in folder1 basically forever.
    Could someone help me to solve this problem? I do not know how to select files form folder1 ordered by "date modified time".
    Tnx for your time and help!

    Do not crosspost! I'll lock this thread.

  • Problem with JPEG files from Leica M and GPS data

    It seems there's a serious bug in Camera Raw 8, hosted in Bridge CS6 on an MS Windows machine, with regard to GPS metadata.
    When using a Leica M (Typ 240) with a multi-function handgrip then both the DNG files (DNG is Leica's native raw format) and the JPEG files out of the camera will include GPS position data in the respective EXIF metadata sections. However, Bridge refuses to display the JPEG files' GPS data (while there's no problem with the GPS data in the DNG files). Worse yet—when loading a JPEG file in Camera Raw for some parametric adjustments and saving the file then the GPS data will be entirely gone! (Again, no problems with the DNG files' GPS data.)
    I suppose that Camera Raw 8 hosted in Bridge CC as well as Lightroom 5 are suffering from the same issue.

    Nobody? Absolutely nobody?? Zalman? Eric? Anyone?
    If you need more input from me then please talk to me.

Maybe you are looking for

  • WRT1990AC shuts down 2.4GHz WLAN as soon as external drive is connected

    I have a very weird problem with my newly bought WRT1900AC Everything works fine, but as soon as I connect my USB Drive to the router (be it on the USB1 or USB2 port), the 2.4GHz WLAN is no longer working. Curiously enough, the router still thinkgs,

  • Need advice on Lenovo ThinkServe​r TS200v - 098119U - I'm a newbie to Lenov

    I'm looking to buy this server: Lenovo ThinkServer TS200v Intel Core i5-650 3.20 GHz 2GB DDR3 500GB HDD Server But I would like to increase the ram from 2G to 4 G and add an additional 500GB HDD.  The OS is also missing and I plan on buying: Lenovo M

  • Data missing from ecc to psa

    Hi All, I have got a issue when iam loading data from ECC(SAP R/3). There are some 40 lakhs record in R/3 when i checked in extractor checker, But when its getting loaded into BW upto PSA the request is automatically showing the status green and data

  • Photoshop CS6 - eventSave callback

    Hi everybody, I'm trying to develop my first plugin and I'm experiencing a problem. I'd like to export a file in a very specific format whenever I save a PSD file, without having to save it in a different step. The purpose of this file is to be fed t

  • Rush charges for processing order type OR

    Hello friends, I have a scenario where we need to add  a fee of $50.00 for processing the order type OR for rush (one time fee added to the order with one or multiple line items). we do not want create a material and have a price to it and add the ma