J'ai deux noeuds et j'essaie de créer une table distante. Pour mettre en place, je fais ce qui suit:Table distante monetdb: impossible d'enregistrer
sur chaque hôte:
$ monetdbd create /opt/mdbdata/dbfarm
$ monetdbd set listenaddr=0.0.0.0 /opt/mdbdata/dbfarm
$ monetdbd start /opt/mdbdata/dbfarm
Sur le premier hôte:
$ monetdb create w0
$ monetdb release w0
Sur seconde:
$ monetdb create mst
$ monetdb release mst
$ mclient -u monetdb -d mst
password:
Welcome to mclient, the MonetDB/SQL interactive terminal (Dec2016-SP4)
Database: MonetDB v11.25.21 (Dec2016-SP4), 'mapi:monetdb://nkcdev11:50000/mst'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>create table usr (id integer not null, name text not null);
operation successful (0.895ms)
sql>insert into usr values(1,'abc'),(2,'def');
2 affected rows (0.845ms)
sql>select * from usr;
+------+------+
| id | name |
+======+======+
| 1 | abc |
| 2 | def |
+------+------+
2 tuples (0.652ms)
sql>
En premier:
$ mclient -u monetdb -d w0
password:
Welcome to mclient, the MonetDB/SQL interactive terminal (Dec2016-SP4)
Database: MonetDB v11.25.21 (Dec2016-SP4), 'mapi:monetdb://nkcdev10:50000/w0'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>create remote table usr_rmt (id integer not null, name text not null) on 'mapi:monetdb://nkcdev11:50000/mst';
operation successful (1.222ms)
sql>select * from usr_rmt;
(mapi:monetdb://[email protected]/mst) Cannot register
project (
table(sys.usr_rmt) [ usr_rmt.id NOT NULL, usr_rmt.name NOT NULL ] COUNT
) [ usr_rmt.id NOT NULL, usr_rmt.name NOT NULL ] REMOTE mapi:monetdb://nkcdev11:50000/mst
sql>
$
$ monetdb discover
location
mapi:monetdb://nkcdev10:50000/w0
mapi:monetdb://nkcdev11:50000/mst
Quelqu'un peut-il me pousser dans la bonne direction?
[EDIT - Résolu]
Le problème a été auto-infligée, le nom de la table à distance doit être exactement le même que le nom de la table locale, j'avais usr_rmt comme le nom de la table à distance.
Merci Joeri. –