[Monetdb-developers] Re : Re : ODBC, no database selected

Stefan Manegold Stefan.Manegold at cwi.nl
Wed Sep 10 10:24:06 CEST 2008


On Wed, Sep 10, 2008 at 01:17:49AM -0700, sylver_b wrote:
> That will do fine and i can scrap the perl tool all together if this can do the job - I will try that .

Good. --- In fact bulk-loading via COPY INTO is by far the fasted way to
load data into MonetDB.

>  any idea for the ODBC issue ? is it maintained by you guys (cwi ) ?

ODBC is maintained at CWI by Sjoerd.
I guess, Sjoerd will have a look at it as soon as his time allows.

Stefan

> Thanks
> 
> 
> 
> 
> ----- Message d'origine ----
> De : Stefan Manegold <Stefan.Manegold at cwi.nl>
> À : sylver_b <sylver_b at yahoo.com>
> Cc : monetdb-developers at lists.sourceforge.net
> Envoyé le : Mercredi, 10 Septembre 2008, 9h06mn 57s
> Objet : Re : [Monetdb-developers] ODBC, no database selected
> 
> On Wed, Sep 10, 2008 at 12:21:46AM -0700, sylver_b wrote:
> > Hi Stefan,
> > 
> > I've started the DB with the following commands :
> > 1. merovingian
> > 2. monetdb create demo
> > 3. monetdb start demo
> > 3. mclient -lsql  --time -d demo
> > 
> > I get the prompt straight away, but i have to specify the db - mclient
> > -lsql , says: !please specify a database - i don't have any other DB at
> > the moment, just evaluating monetdb to migrate a call detail records
> > application ; for that purpose i've developed a simple ETL tool in perl
> > that extract specific fields from a CSV file and insert them in the DB.
> > Maybe there is a better way to do that ?
> 
> In case you need the perl part only for extracting and loading, a simple
> work around to get a quick start, in case you/we do not manage to get the
> perl interface working for you quickly, would be to either load all fields
> from your CSV file using sql "COPY ... INTO .. FROM ..." command (cf.,
> http://monetdb.cwi.nl/SQL/Documentation/Data-Manipulation.html), or extract
> the desired fileds into a separate CSV file, first, and then load using
> "COPY ... INTO .. FROM ..." (e.g., via mclient) ...
> 
> Stefan
> 
> > by the way , ps faux gives me :
> > root     11224  0.0  0.0  63160  1816 pts/2    Sl   00:17   0:00 merovingian
> > root     11229  0.0  1.7 107680 69816 ?        Ssl  00:17   0:00  \_ /root/MonetDB/bin/mserver5 --config=/root/MonetD
> > B/etc/monetdb5.conf --dbname=demo --dbinit=include sql; --set monet_daemon yes --set mapi_open true --set mapi_port 0
> >  --set monet_vault_key /root/MonetDB/var/MonetDB5/dbfarm/demo/.vaultkey
> > 
> > Please advise,
> > Thanks
> > SB
> > 
> > 
> > 
> > 
> > ----- Message d'origine ----
> > De : Stefan Manegold <Stefan.Manegold at cwi.nl>
> > À : sylver_b <sylver_b at yahoo.com>
> > Cc : monetdb-developers at 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 at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/monetdb-developers
> > 
> > 
> > -- 
> > | Dr. Stefan Manegold | mailto:Stefan.Manegold at 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       |
> > 
> > 
> > 
> >      
> -- 
> | Dr. Stefan Manegold | mailto:Stefan.Manegold at 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       |
> 
> 
> 
>       
> -------------------------------------------------------------------------
> 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 at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-developers


-- 
| Dr. Stefan Manegold | mailto:Stefan.Manegold at 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       |




More information about the developers-list mailing list