This discussion is archived
3 Replies Latest reply: Oct 17, 2012 6:39 AM by Linda Lee RSS

Changing the Naming convention of Log Files

958983 Newbie
Currently Being Moderated
Hi,

Is there a way to change the naming convention of log files. Instead of
00000000.jdb, 00000001.jdb, ... to
DB000000.jdb, DB000001.jdb etc

Thanks in advance.
  • 1. Re: Changing the Naming convention of Log Files
    greybird Expert
    Currently Being Moderated
    No, there isn't a way to do that. We didn't anticipate a need to do that -- could you please explain the need?

    Putting a prefix on the file name would unnecessarily limit the total size of the data set, if file names are limited to the 8.dot.3 format as you've shown.

    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
  • 2. Re: Changing the Naming convention of Log Files
    958983 Newbie
    Currently Being Moderated
    Hi mark,

    Example of what I need is that I will put the records of cats, records of dogs and records of birds in one environment. If I want to remove all the records of dogs, I will just delete the log files for dogs if there is a naming convention in the log files. I thought of using a subdirectory in case the log files cant be rename but my problem is that, if I want to search for a certain record, I will search in the 3 directories. Can you give me some solutions in my problem.

    Thanks.
  • 3. Re: Changing the Naming convention of Log Files
    Linda Lee Journeyer
    Currently Being Moderated
    You may want to read http://docs.oracle.com/cd/E17277_02/html/GettingStartedGuide/logfilesrevealed.html for an explanation of why arbitrary deletion of log files will corrupt your data store.

    It is best to stick to the public APIs to manage your data. There are com.sleepycat.je.{Database,Cursor} or com.sleepycat.persist.{PrimaryIndex,  SecondaryIndex, EntityCursor, etc} methods to select and delete data records, or You may also want to consider organizing different types of records into different databases or primary indexes within a single environment, so you can take advantage of the Environment.removeDatabase. But since the user does not explicitly control the mapping of data to log files, you cannot delete data in that way.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points