Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6696975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:24:18+00:00 2026-05-26T06:24:18+00:00

setup_mnesia(Name) -> ?VALUE(application:start(mnesia)), ?VALUE(mnesia:create_schema([node()|[Name]])), ?VALUE(mnesia:create_table(muppet, [ {attributes, record_info(fields, muppet)}, {disc_copies, [foo@kos13]}])), ?VALUE(mnesia:wait_for_tables([muppet], infinity)), ok.

  • 0
setup_mnesia(Name) ->
    ?VALUE(application:start(mnesia)),
    ?VALUE(mnesia:create_schema([node()|[Name]])),
    ?VALUE(mnesia:create_table(muppet, [
                        {attributes, record_info(fields, muppet)},
                        {disc_copies, [foo@kos13]}])),
    ?VALUE(mnesia:wait_for_tables([muppet], infinity)),
    ok.

result is

“application : start ( mnesia )” = ok

“mnesia : create_schema ( [ node ( ) | [ Name ] ] )” = {error,
{foo@kos13,
{already_exists,
foo@kos13}}}

“mnesia : create_table ( muppet , [ { attributes , record_info (
fields , muppet ) } , { disc_copies , [ foo@kos13 ] } ] )” = {aborted,
{bad_type,
muppet,
disc_copies,
foo@kos13}}

EDITED, ADDED
if rewrite both processes to call application:start after mnesia:create_schema it spits out “Cannot install fallback”. In current directory appear two files – FALLBACK.BUP and foo@kos13131851070846165246847780.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:24:18+00:00Added an answer on May 26, 2026 at 6:24 am

    If your schema is a ram_copies type, mnesia cannot allow any other table to reside on disc, all tables you create in a ram_copies schema will also be in RAM.

    Another thing, specify a mnesia dir like this:

    erl -name MY_NODE_NAME -mnesia dir '"./Databases/MY_NODE_NAME_DATABASE"'
    

    Where, ./Databases/MY_NODE_NAME_DATABASE must be an existing folder. After this, then you can create your schema and tables as documented.

    Another thing you can do if your schema is in RAM is the function: mnesia:change_table_copy_type(Table_name, On_which_Node, To_new_type). After changing the schema type to disc_copies or disc_only_copies, then you can change the type of your tables as well to disc. If the schema is a disc_copies type as it normally will be, you can have tables of any nature you want, whether RAM, Disc or Disc_only_copies.

    Its possible to get rid of unwanted schemas using mnesia:delete_schema/1, but be very careful with this method.

    Any thing beyond this , please do refer to the mnesia users guide.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Setup : I have a Struts web application where I use displaytag elements to
Setup C# WinForms Application. Summary Binding a dictionary to a datagridview. Updating the dictionary
I want to learn a functional language and Mnesia seems killer app enough for
Setup: Django 1.1.2, MySQL 5.1 Problem: Blob.objects.filter(foo = foo) \ .filter(status = Blob.PLEASE_DELETE) \
I setup two arrays: 1) the class names and the value names 2) the
Setup: I'm creating a .NET WinForms application in C# to allow our technical support
I setup associations in my models: class User extends AppModel { var $name =
Setup Have you ever had the experience of going into a piece of code
Setup I have a website that draws RSS feeds and displays them on the
Setup is following: Drupal project, one svn repo with trunk/qa/production-ready branches, vhosts for every

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.