Date: Thu, 1 Feb 2001 12:59:18 -0600 (CST) From: Mike Meyer <mwm@mired.org> To: Max Khon <fjoe@iclub.nsu.ru> Cc: freebsd-database@FreeBSD.ORG Subject: Re: unixODBC help? Message-ID: <14969.45574.378303.836343@guru.mired.org> In-Reply-To: <Pine.BSF.4.21.0102012041290.35759-100000@iclub.nsu.ru> References: <14969.13345.991875.173020@guru.mired.org> <Pine.BSF.4.21.0102012041290.35759-100000@iclub.nsu.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Max Khon <fjoe@iclub.nsu.ru> 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, <mike -- Mike Meyer <mwm@mired.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14969.45574.378303.836343>