How to join existing distributed mnesia database

chandru <>
Tue Feb 14 13:13:46 CET 2006


On 

mnesia:add_table_copy(schema, , ram_copies).

erl -sname 

mnesia:start().
mnesia:change_config(extra_db_nodes, []).
mnesia:change_table_copy_type(schema, node(), disc_copies).

lists:foreach(fun(X) -> mnesia:add_table_copy(X, node(), disc_copies)
end, mnesia:system_info(tables) -- [schema]).

cheers
Chandru

On 14/02/06, Taavi Talvik <> wrote:
> Hello!
>
> Lets say, I have created schema on ,
> all distribution is enabled etc. Fiew tables are created.
> i.e.
>
>         mnesia:create_schema(['']).
>
>         mnesia:create_table(my_table,
>                                               [{disc_copies,
> ['']},
>                                                {type, set},
>                                                {attributes,
> record_info(fields, my_table)}]),
>
> Now I want to add 
>
> How can I get second system, lets say  to situation
> where all schema and tables are fully replicated
> i.e. equivalent to situation, where they have worked together
> from beginning
>
>         mnesia:create_schema(['', '']).
>
>         mnesia:create_table(my_table,
>                                               [{disc_copies, ['',
> '']},
>                                                {type, set},
>                                                {attributes,
> record_info(fields, my_table)}]),
>
>
> best regards,
> taavi
>
>



More information about the erlang-questions mailing list