All -
Thanks in advance for the help. Im trying to set up just the ODBC driver
on a Linux client to connect to my MonetDB instance which is running on
another host. I should probably just ask the simple question first, which
is "is there any documentation somewhere, or can someone tell me some steps
to do this easily?". I wasn't able to find anything instructing on how to
do just that.
Ive done the following manually, but if there is a documented way, or a
better way, please point me in …
[View More]the right direction.
If I try to test my connection with isql, this is what I see:
isql -v MonetDB
[08001][unixODBC][MonetDB][ODBC Driver 11.19.11]Client unable to establish
connection
[ISQL]ERROR: Could not SQLConnect
All of the obvious stuff has been checked - the server is definitely up and
running and I can connect to it via JDBC via SQLWorkbench, I can use
mclient on both the db host as well as this Ubuntu box Im trying to connect
from and mclient connects just fine. I can telnet to the host on port
50000... etc.
Any ideas why I might be getting this error? To set up the ODBC driver, I
did this:
1) I copied libMonetODBC.so and libMonetODBCs.so from the
libmonet-client-odbc package into /usr/lib/x86_64-linux-gnu/odbc
2) I added this to /etc/odbcinst.ini
[MonetDB]
Description = MonetDB Driver
Driver = libMonetODBC.so
Setup = libMonetODBCs.so
UsageCount = 2
3) I added this DSN to /etc/odbc.ini
[MonetDB]
Description = Connection for MonetDB
Driver = MonetDB
Database = voc
Servername = 172.17.0.204
User = voc
Password = voc
Port = 50000
Thank you very much!
- - Dan
*Dan Bartow* [Product Design]
---------------------------------------------------------
*SOASTA*
www.linkedin.com/in/danbartowwww.twitter.com/perfdan
This email and any attachments thereto may contain private, confidential
and privileged material for the sole use of the intended recipient. Any
review, copying or distribution of this email (or any attachments thereto)
by others is strictly prohibited. If you are not the intended recipient,
please contact the sender immediately and permanently delete the original
and any copies of this email and any attachments thereto.
[View Less]
# here's a reproducible example using R code to repeat the sampling 1000
times. in both SAMPLE examples below, the database pulls the 2 less than
200 times out of 1000. shouldn't it be close to 500 out of 1000? this
seems not random (misleading to users?) sorry if i'm misunderstanding
something.. thank you!!
# start in an empty directory somewhere
# setwd( "C:/My Directory/MonetDB" )
# # # # # # # # # START OF SETUP - no editing required
library(MonetDB.R)
batfile <-
…
[View More]monetdb.server.setup(
database.directory = paste0( getwd() , "/MonetDB" ) ,
monetdb.program.path =
ifelse(
.Platform$OS.type == "windows" ,
"C:/Program Files/MonetDB/MonetDB5" ,
""
) ,
dbname = "test" ,
dbport = 50000
)
pid <- monetdb.server.start( batfile )
db <- dbConnect( MonetDB.R() , "monetdb://localhost:50000/test" , wait =
TRUE )
# # # END OF SETUP
dbGetQuery( db , "SELECT 1 AS col UNION ALL SELECT 2 AS col" )
out <- NULL
for ( i in 1:1000 ){
out <- c( out , dbGetQuery( db , "SELECT * FROM ( SELECT 1 AS col UNION ALL
SELECT 2 AS col ) AS temp SAMPLE 0.5" ) )
}
# not random
table( unlist( out ) )
# 1 2
# 880 120
out <- NULL
for ( i in 1:1000 ){
out <- c( out , dbGetQuery( db , "SELECT * FROM ( SELECT 1 AS col UNION
ALL SELECT 2 AS col ) AS temp SAMPLE 1" ) )
}
# ALSO not random
table( unlist( out ) )
# 1 2
# 856 144
[View Less]