vendredi 18 décembre 2015

Force readonly when connecting to sqlite file

On many front ends, I wish to enforce my scripts using a readonly connection to a sqlite3 file mirrored from a master server.

Is there's a way to say DBI to do this ?

For the moment, I'm doing this:

       $dbHand = DBI->connect("dbi:SQLite:dbname=$dbName", $dbUser, $dbPass, {
            PrintError => 0,
            RaiseError => 1,
            AutoCommit => 1,
    }) or die $DBI::errstr;

And get full access.

  • I'm not perl fluent, I have to maintain/evolve existing
  • (I don't want to deal with file permissions)

Aucun commentaire:

Enregistrer un commentaire