Mnesia - tables ???

vipin <>
Tue Sep 27 08:37:56 CEST 2005


Hello all !!!

I've created five database tables, it works fine as long as 'Erlang 
node' (where database is running) is up. When it goes down or i do quit
from the node and again restart the database server on the same node 
then i've lost all the data in the tables. What should i do to make
it persistent ?

when i execute mnesia:info() i found that my all tables are lying in RAM 
(as shown below).  If the problem is wandering around here,
then please tell me how to move these ram_copies to disc_copies ?
(I'm using Erlang-R10B-6.)

=============================================================
()5> mnesia:info().
---> Processes holding locks <---
---> Processes waiting for locks <---
---> Participant transactions <---
---> Coordinator transactions <---
---> Uncertain transactions <---
---> Active tables <---
client_profile : with 109      records occupying 2785     words of mem
client_buddylist: with 2        records occupying 341      words of mem
client_offlinemessages: with 0        records occupying 277      words 
of mem
client_reverse_buddylist: with 2        records occupying 341      words 
of mem
client_online  : with 97       records occupying 2837     words of mem
schema         : with 6        records occupying 951      words of mem
===> System info in version "4.2.2", debug level = none <===
opt_disc. Directory "/home/vipin/elbis/database/" 
is used.
use fallback at restart = false
running db nodes   = []
stopped db nodes   = []
master node tables = []
remote             = []
ram_copies         = [client_buddylist,
                      client_offlinemessages,
                      client_online,
                      client_profile,
                      client_reverse_buddylist]
disc_copies        = [schema]
disc_only_copies   = []
[{,disc_copies}] = [schema]
[{,ram_copies}] = [client_online,
                                 client_reverse_buddylist,
                                 client_offlinemessages,
                                 client_buddylist,
                                 client_profile]
355 transactions committed, 0 aborted, 0 restarted, 0 logged to disc
0 held locks, 0 in queue; 0 local transactions, 0 remote
0 transactions waits for other nodes: []
ok
============================================================

Your suggestions would be welcome.

Cheers,
Vipin




More information about the erlang-questions mailing list