<div dir="ltr">Note that this "hack" will only work if you are using a single node system.<div><br></div><div>If you have several nodes you should take a backup, traverse and change the nodename in that backup, install it on all nodes and restart all nodes from backup. see mnesia install_fallback.</div><div><br></div><div>Or you wipe the mnesia dir on the moved node, and use mnesia:change_config to connect to the other nodes,</div><div>use mnesia:change_table_copy_type on schema to disc and use mnesia:add_table_copy(Tab, ...) on the other tabs</div><div>you want a local copy.</div><div><br></div><div>Then you use mnesia:del_table_copy(schema, OldNameName) ..</div><div><br></div><div>/Dan</div><div><br></div><div><br></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Oct 15, 2016 at 3:16 PM Kenneth Lakin <<a href="mailto:kennethlakin@gmail.com">kennethlakin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 10/15/2016 04:09 AM, ARUN P wrote:<br class="gmail_msg">
> but i have a doubt, since the dets operations are not transactional in<br class="gmail_msg">
> the middle editing schema.DAT file, if my application gets restart...<br class="gmail_msg">
<br class="gmail_msg">
Based on Szoboszlay's earlier email to you it sounds like you'll be<br class="gmail_msg">
doing the search and replace on the Mnesia schema file while Mnesia is<br class="gmail_msg">
stopped.<br class="gmail_msg">
<br class="gmail_msg">
>From his message: [0]<br class="gmail_msg">
<br class="gmail_msg">
"Before starting Mnesia open the schema.DCD or schema.DAT file<br class="gmail_msg">
(depending on the storage type of your schema). It will be either a<br class="gmail_msg">
disk_log or a dets file, containing {schema, Tab, Opts} entries. Among<br class="gmail_msg">
the options you will find the node(s) where the table shall exist.<br class="gmail_msg">
Simply change the old node name to the new node name there, and save the<br class="gmail_msg">
new schema under its original file name. Then you can start Mnesia and<br class="gmail_msg">
all your data will be there."<br class="gmail_msg">
<br class="gmail_msg">
So, as long as Mnesia is not started on the node, then -AFAIK- nothing<br class="gmail_msg">
will be writing to the Mnesia schema file.<br class="gmail_msg">
<br class="gmail_msg">
[0] <a href="http://erlang.org/pipermail/erlang-questions/2016-October/090601.html" rel="noreferrer" class="gmail_msg" target="_blank">http://erlang.org/pipermail/erlang-questions/2016-October/090601.html</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
erlang-questions mailing list<br class="gmail_msg">
<a href="mailto:erlang-questions@erlang.org" class="gmail_msg" target="_blank">erlang-questions@erlang.org</a><br class="gmail_msg">
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" class="gmail_msg" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br class="gmail_msg">
</blockquote></div></div>