<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<blockquote cite="mid:57FFAAC3.1070101@utl.in" type="cite"> Hi
Daniel<br>
<br>
Thank you for the valuable comment, but i have a doubt, since
the dets operations are not transactional in the middle editing
schema.DAT file, if my application gets restart, will it corrupt
the <font face="monospace">schema.DAT <font face="sans-serif">file
and if happens so how can i safe guard the data.? <br>
<br>
Thanks in advance<br>
Arun<br>
</font></font><br>
<div class="moz-cite-prefix">On Thursday 13 October 2016 08:33 PM,
Dániel Szoboszlay wrote:<br>
</div>
<blockquote
cite="mid:CADcfxomTBE3JNYcWCV4+9roorr20q-yjeKGpPqpvqY8LwaiAbg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>When the name of the node changes, you need to repair the
Mnesia schema, as it contains the names of the nodes where
the tables belong.</div>
<div><br>
</div>
<div>Before starting Mnesia open the <font face="monospace">schema.DCD</font>
or <font face="monospace">schema.DAT</font> file (depending
on the storage type of your schema). It will be either a <font
face="monospace">disk_log</font> or a <font
face="monospace">dets</font> file, containing <font
face="monospace">{schema, Tab, Opts}</font> entries. Among
the options you will find the node(s) where the table shall
exist. Simply change the old node name to the new node name
there, and save the new schema under its original file name.
Then you can start Mnesia and all your data will be there.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Daniel</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Thu, 13 Oct 2016 at 12:55 ARUN P <<a
moz-do-not-send="true" href="mailto:arunp@utl.in">arunp@utl.in</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br
class="gmail_msg">
I have a hardware device, will call it SCC ( System
Control Card )<br class="gmail_msg">
on which an erlang application is running which uses mnesia
as the<br class="gmail_msg">
database. The hardware device is a distributed and portable
one and its<br class="gmail_msg">
IP address is dynamically generated based on some physical
conditions.<br class="gmail_msg">
ie, My system set up contains 10 Racks and each Rack has SCC
connected<br class="gmail_msg">
to it, and based on the Rack on which SCC is connected
application will<br class="gmail_msg">
dynamically generate the IP address ie; the IP address of
SCC connected<br class="gmail_msg">
on Rack -1 will be 10.1.1.1 and the erlang node name will be<br
class="gmail_msg">
<a moz-do-not-send="true" href="mailto:SCC@10.1.1.1"
class="gmail_msg" target="_blank">SCC@10.1.1.1</a> and the
IP address of SCC connected on Rack -2 will be<br
class="gmail_msg">
10.1.1.2 the erlang node name will be <a
moz-do-not-send="true" href="mailto:SCC@10.1.1.2"
class="gmail_msg" target="_blank">SCC@10.1.1.2</a> .<br
class="gmail_msg">
<br class="gmail_msg">
The problem domain is :<br class="gmail_msg">
<br class="gmail_msg">
In some situations i will be replacing SCC of Rack-1 to
Rack-2 and<br class="gmail_msg">
as soon as i replace , IP address of SCC will change to
10.1.1.2 and so<br class="gmail_msg">
the erlang node. In this situation I am unable to access the
data stored<br class="gmail_msg">
in mnesia when the SCC was present in Rack-1 and this is
because the on<br class="gmail_msg">
Rack-2 application will create a new schema based on the new
erlang node<br class="gmail_msg">
name. But the prime objective of my system is data
persistence, even<br class="gmail_msg">
though I replace the device on any Rack, I should be able to
access the<br class="gmail_msg">
previously stored data. Can anybody kindly suggest me how to
solve this<br class="gmail_msg">
issue.<br class="gmail_msg">
<br class="gmail_msg">
- All the tables and schema created are disc copy .<br
class="gmail_msg">
<br class="gmail_msg">
Thanks in advance,<br class="gmail_msg">
Arun P<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br
class="gmail_msg">
erlang-questions mailing list<br class="gmail_msg">
<a moz-do-not-send="true"
href="mailto:erlang-questions@erlang.org"
class="gmail_msg" target="_blank">erlang-questions@erlang.org</a><br
class="gmail_msg">
<a moz-do-not-send="true"
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>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>