Deleting mnesia tables

Hakan Mattsson hakan@REDACTED
Fri Sep 6 14:48:43 CEST 2002


On Fri, 6 Sep 2002, Sean Hinde wrote:

Sean> Anyone know an easy way to delete a table which one node thinks exists both
Sean> on itself and on another node, while the other node is down (please don't
Sean> ask!)?

You need to remove the other node from the schema before you can delete the table:

   (one@REDACTED)8> mnesia:create_table(t, [{disc_copies, [one@REDACTED, other@REDACTED]}]).
   {atomic,ok}
   (one@REDACTED)9> rpc:call(other@REDACTED, mnesia, stop, []). 
   stopped
   (one@REDACTED)10> mnesia:delete_table(t).
   {aborted,{not_active,"All replicas on diskfull nodes are not active yet",
			t,
			[other@REDACTED]}}
   (one@REDACTED)11> mnesia:del_table_copy(schema, other@REDACTED).
   {atomic,ok}
   (one@REDACTED)12> mnesia:delete_table(t).                         
   {atomic,ok}
   (one@REDACTED)13> 

/Håkan




More information about the erlang-questions mailing list