From owner-freebsd-database Wed Jan 31 18:26:29 2001 Delivered-To: freebsd-database@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 2B36137B67D for ; Wed, 31 Jan 2001 18:26:12 -0800 (PST) Received: (qmail 43727 invoked by uid 100); 1 Feb 2001 02:26:11 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14968.51523.632241.534945@guru.mired.org> Date: Wed, 31 Jan 2001 20:26:11 -0600 (CST) To: freebsd-database@freebsd.org Subject: unixODBC help? X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Has anyone out there managed to get the unixODBC port to work? Especially talking to the postgres7 port with ODBC enabled? If so, any pointers would be appreciated; the docs seem to refer to tools I don't have. Thanx, http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message From owner-freebsd-database Thu Feb 1 0:22:59 2001 Delivered-To: freebsd-database@freebsd.org Received: from mx.nsu.ru (mx.nsu.ru [193.124.215.71]) by hub.freebsd.org (Postfix) with ESMTP id 2F59737B684 for ; Thu, 1 Feb 2001 00:22:39 -0800 (PST) Received: from iclub.nsu.ru (root@iclub.nsu.ru [193.124.222.66]) by mx.nsu.ru (8.9.1/8.9.0) with ESMTP id OAA06064; Thu, 1 Feb 2001 14:20:27 +0600 (NOVT) Received: from localhost (fjoe@localhost) by iclub.nsu.ru (8.11.1/8.11.1) with ESMTP id f118JfO19921; Thu, 1 Feb 2001 14:20:02 +0600 (NS) (envelope-from fjoe@iclub.nsu.ru) Date: Thu, 1 Feb 2001 14:19:41 +0600 (NS) From: Max Khon To: Mike Meyer Cc: freebsd-database@FreeBSD.ORG Subject: Re: unixODBC help? In-Reply-To: <14968.51523.632241.534945@guru.mired.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, there! On Wed, 31 Jan 2001, Mike Meyer wrote: > Has anyone out there managed to get the unixODBC port to work? > Especially talking to the postgres7 port with ODBC enabled? If so, any > pointers would be appreciated; the docs seem to refer to tools I don't > have. works like a charm here. you do not have to enable ODBC in postgresql7 port because unixODBC has its own PostgreSQL ODBC driver. There is ongoing work to merge unixODBC driver with one PostgreSQL has in its tree. /fjoe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message From owner-freebsd-database Thu Feb 1 0:27:25 2001 Delivered-To: freebsd-database@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 326AC37B67D for ; Thu, 1 Feb 2001 00:27:07 -0800 (PST) Received: (qmail 57908 invoked by uid 100); 1 Feb 2001 08:27:06 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14969.7642.357789.839641@guru.mired.org> Date: Thu, 1 Feb 2001 02:27:06 -0600 (CST) To: Max Khon Cc: freebsd-database@freebsd.org Subject: Re: unixODBC help? In-Reply-To: References: <14968.51523.632241.534945@guru.mired.org> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Max Khon types: > hi, there! > > On Wed, 31 Jan 2001, Mike Meyer wrote: > > > Has anyone out there managed to get the unixODBC port to work? > > Especially talking to the postgres7 port with ODBC enabled? If so, any > > pointers would be appreciated; the docs seem to refer to tools I don't > > have. > > works like a charm here. > you do not have to enable ODBC in postgresql7 port because unixODBC has > its own PostgreSQL ODBC driver. There is ongoing work to merge unixODBC > driver with one PostgreSQL has in its tree. Knowing that you've got it working isn't a lot of help. Can you provide details, or pointers to documentation? Thanx, http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message From owner-freebsd-database Thu Feb 1 1:23: 4 2001 Delivered-To: freebsd-database@freebsd.org Received: from mx.nsu.ru (mx.nsu.ru [193.124.215.71]) by hub.freebsd.org (Postfix) with ESMTP id EE11937B503 for ; Thu, 1 Feb 2001 01:22:32 -0800 (PST) Received: from iclub.nsu.ru (root@iclub.nsu.ru [193.124.222.66]) by mx.nsu.ru (8.9.1/8.9.0) with ESMTP id PAA12125; Thu, 1 Feb 2001 15:18:22 +0600 (NOVT) Received: from localhost (fjoe@localhost) by iclub.nsu.ru (8.11.1/8.11.1) with ESMTP id f119IEG68195; Thu, 1 Feb 2001 15:18:21 +0600 (NS) (envelope-from fjoe@iclub.nsu.ru) Date: Thu, 1 Feb 2001 15:18:13 +0600 (NS) From: Max Khon To: Mike Meyer Cc: freebsd-database@FreeBSD.ORG Subject: Re: unixODBC help? In-Reply-To: <14969.7642.357789.839641@guru.mired.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, there! On Thu, 1 Feb 2001, Mike Meyer wrote: > > > Has anyone out there managed to get the unixODBC port to work? > > > Especially talking to the postgres7 port with ODBC enabled? If so, any > > > pointers would be appreciated; the docs seem to refer to tools I don't > > > have. > > > > works like a charm here. > > you do not have to enable ODBC in postgresql7 port because unixODBC has > > its own PostgreSQL ODBC driver. There is ongoing work to merge unixODBC > > driver with one PostgreSQL has in its tree. > > Knowing that you've got it working isn't a lot of help. Can you > provide details, or pointers to documentation? knowing that it does not work for you does not help much either :) can you tell what is not working? /fjoe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message From owner-freebsd-database Thu Feb 1 2: 2:29 2001 Delivered-To: freebsd-database@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 2D40F37B491 for ; Thu, 1 Feb 2001 02:02:11 -0800 (PST) Received: (qmail 65239 invoked by uid 100); 1 Feb 2001 10:02:10 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14969.13345.991875.173020@guru.mired.org> Date: Thu, 1 Feb 2001 04:02:09 -0600 (CST) To: Max Khon Cc: Mike Meyer , freebsd-database@FreeBSD.ORG Subject: Re: unixODBC help? In-Reply-To: References: <14969.7642.357789.839641@guru.mired.org> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Max Khon types: > hi, there! > On Thu, 1 Feb 2001, Mike Meyer wrote: > > > > > Has anyone out there managed to get the unixODBC port to work? > > > > Especially talking to the postgres7 port with ODBC enabled? If so, any > > > > pointers would be appreciated; the docs seem to refer to tools I don't > > > > have. > > > works like a charm here. > > > you do not have to enable ODBC in postgresql7 port because unixODBC has > > > its own PostgreSQL ODBC driver. There is ongoing work to merge unixODBC > > > driver with one PostgreSQL has in its tree. > > Knowing that you've got it working isn't a lot of help. Can you > > provide details, or pointers to documentation? > knowing that it does not work for you does not help much either :) > can you tell what is not working? Everything. I know, not much help. Let's see.... Well, the user manual talks about OODBConfig and DataManager, but they port didn't install them :-(. Given the clue that I should be looking in the unixODBC port for drivers, I actually got past the previous problem (errors from odbcinst). That now seems to work, with template files lifted from the docs, except to change the database name to one I actually have): su-2.04# odbcinst -i -d -f /tmp/foobar [odbcinst] Driver installed. Usage count increased to 3. Target directory is /usr/lib su-2.04# odbcinst -i -s -f /tmp/foobaz [odbcinst] Sections and Entries from /tmp/foobar have been added to ODBC.INI Though the "Target directory is /usr/lib" worries me somewhat. The isql documentation doesn't actually say what string from the various template files should be used for the DSN. Trying the obvious one generates an error: guru$ isql PostgreSQL [ISQL]ERROR: Could not SQLConnect I don't see any sign of an sql.log file around. The eventual goal is to connect with the Applixware Office data application. Being able to verify that some part of it is working would be a nice start. Thanx, http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message From owner-freebsd-database Thu Feb 1 6:54: 2 2001 Delivered-To: freebsd-database@freebsd.org Received: from mx.nsu.ru (mx.nsu.ru [193.124.215.71]) by hub.freebsd.org (Postfix) with ESMTP id DB3D037B684 for ; Thu, 1 Feb 2001 06:53:14 -0800 (PST) Received: from iclub.nsu.ru (root@iclub.nsu.ru [193.124.222.66]) by mx.nsu.ru (8.9.1/8.9.0) with ESMTP id UAA14193; Thu, 1 Feb 2001 20:48:28 +0600 (NOVT) Received: from localhost (fjoe@localhost) by iclub.nsu.ru (8.11.1/8.11.1) with ESMTP id f11Elv236077; Thu, 1 Feb 2001 20:48:13 +0600 (NS) (envelope-from fjoe@iclub.nsu.ru) Date: Thu, 1 Feb 2001 20:47:56 +0600 (NS) From: Max Khon To: Mike Meyer Cc: freebsd-database@FreeBSD.ORG Subject: Re: unixODBC help? In-Reply-To: <14969.13345.991875.173020@guru.mired.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, there! On Thu, 1 Feb 2001, Mike Meyer wrote: > > > > > Has anyone out there managed to get the unixODBC port to work? > > > > > Especially talking to the postgres7 port with ODBC enabled? If so, any > > > > > pointers would be appreciated; the docs seem to refer to tools I don't > > > > > have. > > > > works like a charm here. > > > > you do not have to enable ODBC in postgresql7 port because unixODBC has > > > > its own PostgreSQL ODBC driver. There is ongoing work to merge unixODBC > > > > driver with one PostgreSQL has in its tree. > > > Knowing that you've got it working isn't a lot of help. Can you > > > provide details, or pointers to documentation? > > knowing that it does not work for you does not help much either :) > > can you tell what is not working? > > Everything. > > I know, not much help. Let's see.... > > Well, the user manual talks about OODBConfig and DataManager, but they > port didn't install them :-(. > > Given the clue that I should be looking in the unixODBC port for > drivers, I actually got past the previous problem (errors from > odbcinst). That now seems to work, with template files lifted from the > docs, except to change the database name to one I actually have): > > su-2.04# odbcinst -i -d -f /tmp/foobar > [odbcinst] Driver installed. Usage count increased to 3. Target directory is /usr/lib > su-2.04# odbcinst -i -s -f /tmp/foobaz > [odbcinst] Sections and Entries from /tmp/foobar have been added to ODBC.INI > > Though the "Target directory is /usr/lib" worries me somewhat. > > The isql documentation doesn't actually say what string from the > various template files should be used for the DSN. Trying the obvious > one generates an error: > > guru$ isql PostgreSQL > [ISQL]ERROR: Could not SQLConnect > > I don't see any sign of an sql.log file around. > > The eventual goal is to connect with the Applixware Office data > application. Being able to verify that some part of it is working > would be a nice start. odbcinst is a bit tricky (was tricky at the time I looked at it) basically, you should have two files in /usr/local/etc: --- cut here (odbcinst.ini) --- [PostgreSQL] Description = PostgreSQL driver Driver = /usr/local/lib/libodbcpsql.so Setup = /usr/local/lib/libodbcpsqlS.so FileUsage = 1 ;Debug = 1 --- cut here --- odbcinst.ini describes which drivers are installed on your system --- cut here (odbc.ini) --- [test] Description = PostgreSQL Driver = PostgreSQL Database = test Servername = localhost Readonly = No --- cut here --- odbc.ini file describe DSNs ("test" in the example above is DSN). You can have multiple DSNs pointing to one database. I hope this will be sufficient for you to start /fjoe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message From owner-freebsd-database Thu Feb 1 10:59:38 2001 Delivered-To: freebsd-database@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 23E5537B67D for ; Thu, 1 Feb 2001 10:59:19 -0800 (PST) Received: (qmail 83867 invoked by uid 100); 1 Feb 2001 18:59:18 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14969.45574.378303.836343@guru.mired.org> Date: Thu, 1 Feb 2001 12:59:18 -0600 (CST) To: Max Khon Cc: freebsd-database@FreeBSD.ORG Subject: Re: unixODBC help? In-Reply-To: References: <14969.13345.991875.173020@guru.mired.org> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Max Khon types: > hi, there! Hello, > On Thu, 1 Feb 2001, Mike Meyer wrote: > > guru$ isql PostgreSQL > > [ISQL]ERROR: Could not SQLConnect > > > > I don't see any sign of an sql.log file around. > > > > The eventual goal is to connect with the Applixware Office data > > application. Being able to verify that some part of it is working > > would be a nice start. > > odbcinst is a bit tricky (was tricky at the time I looked at it) > basically, you should have two files in /usr/local/etc: > --- cut here (odbcinst.ini) --- > [PostgreSQL] > Description = PostgreSQL driver > Driver = /usr/local/lib/libodbcpsql.so > Setup = /usr/local/lib/libodbcpsqlS.so > FileUsage = 1 > ;Debug = 1 > --- cut here --- > > odbcinst.ini describes which drivers are installed on your system > > --- cut here (odbc.ini) --- > [test] > Description = PostgreSQL > Driver = PostgreSQL > Database = test > Servername = localhost > Readonly = No > --- cut here --- > > odbc.ini file describe DSNs ("test" in the example above is DSN). > You can have multiple DSNs pointing to one database. That's pretty much what I've got. The one real difference is that my ports go into /usr/opt, not /usr/local. If unixODBC isn't PREFIX clean, that may break things. But it's not complaining about missing files. After running odbcinst several times, I have: odbcinst.ini: [PostgreSQL] Description = PostgreSQL driver Driver = /usr/opt/lib/libodbcpsql.so Setup = /usr/opt/lib/libodbcpsqlS.so Threading = 2 FileUsage = 3 odbc.ini: [PostgreSQL] Description = Test to Postgres Driver = PostgeSQL Traced = Yes TraceFile = sql.log Database = hotlist UserName = Password = Port = 5432 Protocol = 6.4 ReadOnly = No RowVersioning = No ShowSystemTables = No ShowOidColumn = No FakeOidIndex = No ConnSettings = And with those, I get the connect failure listed above. the odbc.ini is also in ~/.odbc.ini, from running odbcinst as me instead of as root. Turning on the verbose flag, I see: guru$ isql -v PostgreSQL [unixODBC][Driver Manager]Data source name not found, and no default driver specified [ISQL]ERROR: Could not SQLConnect I notice you've got a "Debug" value commented out. Is there some set of things I can add to enable more debugging output? Any other suggestions? Thanx, http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message