Hello Shailesh,
Seems like you may be trying to put a square peg into a round hole.
Sqlite is an embedded database. Meaning it is not "distributed" as such unless
you build the distribution and 2 phase commit logic yourself.
Let me just clarify for a moment, by distributed you mean.
a. 2 databases and 2 host platforms
b. A trasnsaction that originates on host A but uses host b
c. A transaction that upon commit on host a implies a commit on host b.
d. A transaction that upon error of commit logic, host B will enter its
transaction as "in doubt".
e. A transaction that is rolled back on host A will also rollback on host b.
However, Sqlite does have the capability to have two databases. You can attach
a database and run a transaction/rolllback. But I'm not certain that it could
recover from a failure when the databases reside on seperate filesystems
(nfs/san/nas etc) and the DB is utilized by Host B.
Consider this: host A houses A.db and host b houses B.db.
B.db is accessible to both host a and host b (stored on a shared file
system, but host A.db is stored locally )
A process on Host A opens A.db and Attaches B.db, opens a transaction and
modifies data such that writes occur to A.db and B.db (ie journal files are
created and modified data is written out).
Then Lets say Host B becomes unavailble.
Then a Process on Host B attempts to utilize B.db.... I think you'll get a
failure of corruption of some form at this stage since B.db is involved in a
transaction, but the journal file is not available for a recovery.
Hope that helps.
Ken
Shailesh Madhukar Birari <[EMAIL PROTECTED]> wrote: Hello,
I want to implement a distributed database using sqlite. Can some one give
me information of whether SQLite supports two phase commit?
Thanks,
Shailesh.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users