Mnesia -- multiple schemas?
Fri Feb 22 09:20:14 CET 2002
Chris Pressey writes:
> What I would really like would be if Mnesia could add or remove nodes from
> its schema after the schema has been created (perhaps I am living in a
> fantasy world though.) All nodes must be up and have mnesia stopped while
> creating or destroying a schema (but they must have mnesia started when
> creating tables.) This is a bit tiresome to manually set up on a large
> number of nodes, and pretty much rules out ad hoc deployment. If anyone
> knows a nifty trick to make this more painless, I'm all ears :)
To add a node
On one of existing nodes
mnesia:add_table_copy(schema, Node, ram_copies),
mnesia:change_table_copy(schema, Node, disc_copies).
Or on the new node
or mnesia:change_config(extra_db_nodes, [Nodes]),
mnesia:change_table_copy(schema, node(), disc_copies).
Delete the replica of every table on that node
and then delete the schema.
Dan Gudmundsson Project: Mnesia, Erlang/OTP
Ericsson Utvecklings AB Phone: +46 8 727 5762
UAB/F/P Mobile: +46 70 519 9469
S-125 25 Stockholm Visit addr: Armborstv 1
More information about the erlang-questions