in reply to File rights?

This topic is discussed at length in the "Safe ways to lock a database section" of the latest DB_File docs. A small excerpt:

Safe ways to lock a database

Starting with version 2.x, Berkeley DB  has internal 
support for locking.  The companion module to this one,
BerkeleyDB, provides an interface to this locking 
functionality. If you are serious about locking Berkeley 
DB databases, I strongly recommend using BerkeleyDB.

If using BerkeleyDB isn't an option, there are a number 
of modules available on CPAN that can be used to implement
locking.

The docs name these modules, as well as some alternative locking schemes. Good luck !

Replies are listed 'Best First'.
Re: Re: File rights?
by HDrider (Initiate) on Apr 30, 2001 at 21:26 UTC
    Thanks, I went and checked out these links. My problem is I
    I don't need to lock the files, they are read only when searched.

    What I need is for mutiple users to be able to search the db files at the same time.

    HDrider
    Never sneeze while wearing a full face helmet.

      Locking isn't just for writes. If you read the links, you'll find mention of creating multiple copies for readers. Also, the BerkelyDB module is mentioned, which supports the single writer/multiple reader scenario you are describing (without making copies).

      Not to be terse, but go back and read it again :)

        Oooppps, reckon you mean this passage

        Tie::DB_Lock A DB_File wrapper which creates copies of the database file for read access, so that you have a kind of a multiversioning concurrent read system. However, updates are still serial. Use for databases where reads may be lengthy and consistency problems may occur.

        Now I have to figure out how to use this. I'm still pretty much a rookie at this. Sigh. It never ends.

        HDrider
        Only riders understand why dogs love to stick their heads out of car windows.