[Monetdb-developers] ODBC, no database selected

sylver_b sylver_b at yahoo.com
Wed Sep 10 01:56:47 CEST 2008


Hi Eveyone,

I'm trying to connect to monetdb with this time, ODBC - but still no luck.

Here is the output of my script :

./monetdb2.pl
DBI connect('DSN_MonetDB','monetdb',...) failed: [unixODBC][MonetDB][ODBC Driver 1.0]Client unable to establish connection (SQL-08001)(DBD: db_login/SQLConnect err=-1) at ./monetdb2.pl line 6
[unixODBC][MonetDB][ODBC Driver 1.0]Client unable to establish connection (SQL-08001)(DBD: db_login/SQLConnect err=-1)

cat monetdb2.pl
#!/usr/bin/perl

use DBI();


my $dbh = DBI-> connect('dbi:ODBC:DSN_MonetDB', 'monetdb', 'monetdb', {database => demo}) or die ($DBI::errstr . "\n");

if (!$dbh)
{
  print "$DBI::err\n$DBI::errstr\n$DBI::state";
}
else
{
  $dbh->disconnect if ($dbh);
}

  my $sth = $dbh->prepare('SELECT * FROM env() env');
  $sth->execute;
  $sth->dump_results;

This the merovingian output :
tail -f /root/MonetDB/var/log/merovingian.log
MSG demo[11229]: # MonetDB server v5.6.0, based on kernel v1.24.0
MSG demo[11229]: # Serving database 'demo'
MSG demo[11229]: # Compiled for i686-pc-linux-gnu/32bit with 32bit OIDs dynamically linked
MSG demo[11229]: # Copyright (c) 1993-2008 CWI, all rights reserved
MSG demo[11229]: # Visit http://monetdb.cwi.nl/ for further information
MSG demo[11229]: # Listening for connection requests on mapi:monetdb://ulys:50001/
ERR merovingian[11224]: client error: no database specified
MSG merovingian[11224]: database 'demo' already running since 2008-09-10 00:17:32, up min/avg/max: 30/2181/7036, crash average: 0.00 0.00 0.00 (6-5=0)
MSG merovingian[11224]: proxying client 127.0.0.1:59244 for database 'demo' to mapi:monetdb://ulys:50001/
MSG merovingian[11224]: client has 127.0.0.1:59244 disconnected from proxy

ERR merovingian[11224]: client error: no database specified

This is the content of my odbc.ini & odbcinst.ini :

[DSN_MonetDB]
Description     = ODBC Driver for MonetDB SQL Server
Driver          = /root/MonetDB/lib/libMonetODBC.so
Port            = 50000
Host            = localhost
Database        = demo
User            = monetdb
Password        = monetdb
Debug           = 1
Trace           = 1
DebugFile       = /var/log/odbc-debugfile.log
TraceFile       = /var/log/odbc-tracefile.log

odbcinst.ini
[DSN_MonetDB]
Description     = ODBC Driver for MonetDB SQL Server
Driver          = /root/MonetDB/lib/libMonetODBC.so
Setup           = /root/MonetDB/lib/libMonetODBCs.so
FileUsage       = 1
CommLog         = 1
Debug           = 1

I also tried with PHP odbc, same result - how to specify the DB right from the script ? 


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20080909/112d5a2b/attachment.html>


More information about the developers-list mailing list