----- Message d'origine ----
De : Stefan Manegold <Stefan.Manegold@cwi.nl>
À : sylver_b <sylver_b@yahoo.com>
Cc : monetdb-developers@lists.sf.net
Envoyé le : Mercredi, 10 Septembre 2008, 6h19mn 03s
Objet : Re: [Monetdb-developers] ODBC, no database selected
Hi "sylver_b",
just a simple &
quick saniy check:
How did you start your MonetDB server?
Can you connect with `mclient -lsql`?
Stefan
On Tue, Sep 09, 2008 at 04:56:47PM -0700, sylver_b wrote:
> 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 ?
>
>
>
>
-------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
>
http://moblin-contest.org/redirect.php?banner_id=100&url=/> _______________________________________________
> Monetdb-developers mailing list
>
Monetdb-developers@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/monetdb-developers--
| Dr. Stefan Manegold
| mailto:
Stefan.Manegold@cwi.nl |
| CWI, P.O.Box 94079 |
http://www.cwi.nl/~manegold/ |
| 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 |
| The Netherlands | Fax : +31 (20) 592-4312 |