我有两个节点,正在尝试创建一个远程表。为了进行设置,我执行以下操作:
在每台主机上:
$ monetdbd create /opt/mdbdata/dbfarm
$ monetdbd set listenaddr=0.0.0.0 /opt/mdbdata/dbfarm
$ monetdbd start /opt/mdbdata/dbfarm在第一台主机上:
$ monetdb create w0
$ monetdb release w0第二次:
$ 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>在第一个:
$ 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://monetdb@nkcdev11/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有没有人能把我推向正确的方向?
编辑-已解决
这个问题是自己造成的,远程表名称必须与本地表名完全相同,我将usr_rmt作为远程表名称。
发布于 2017-05-05 20:43:38
乍一看,你想做的事情应该是可行的。
最近,我在远程表访问方面遇到了类似的问题,尽管这是在非发布版本中遇到的,请参阅bug 6289。(该错误报告中提到的MonetDB版本号不正确。)您正在经历的可能是也可能不是相同的潜在问题。
周末过后,我将检查是否可以在、-SP4和开发版本上重现您的示例。
Joeri
https://stackoverflow.com/questions/43787816
复制相似问题