On Wed, Jul 15, 2009 at 12:45:28AM -0500, Vijay Sankar wrote:
> [email protected] wrote:
>> Quoting Vijay Sankar <[email protected]>:
>>
>>   
>>> I am trying to access a database hosted on a Microsoft SQL Server 
>>> 2005 using FreeTDS and iodbc from OpenBSD 4.5 -stable (also tried 
>>> OpenBSD -current as of today). Unfortunately none of the documents I 
>>> have read so far or the various trials/tests have helped. I can use 
>>> tsql and access the SQL Server but I am not able to use iodbcadm-gtk 
>>> to add a DSN
>>>
>>> etc.
>>>     
>>
>> [cut]
>>
>>   
>>> I hope the list can give me any advice or pointers on what is the 
>>> best way to access data from a SQL Server 2005 database from OpenBSD
>>>
>>> Thanks very much,
>>>
>>> Vijay
>>>     
>>
>> I cannot give you a direct answer, but what do you mean by "the best way to
>> access data from a SQL Server 2005 database?"
>>
>> What are you trying to do - the *best* way may be determined by that.
>>
>> Do you have to use FreeDTS or iODBC?  Or is that just something you have 
>> tried?
>>
>> Is there anything in one of the languages that might help (PHP, Perl, 
>> Tcl?) Maybe not (doesn't seem to be anything directly ported, so you 
>> might need to do
>> a bit of work here), but might be another avenue to explore, depending on 
>> what
>> you are trying to do.
>>
>> If you are only needing to SELECT, then it might be easier to knock up a web
>> service or similar on a Windows box and return the data as XML or whatever 
>> (not
>> exactly neat, but better than nothing at all - again, depends on what you 
>> need
>> to achieve here.)  Not sure if SQL Server 2005 has any built-in web service
>> style stuff.
>>
>> HTH.
>>   
> Thanks for your thoughts on this. I am not very sure about how to solve  
> the following problem.
>
> I have an OpenBSD Server that is hosting a Plone-based web site and we  
> need to read and write a few tables located on a Microsoft SQL Server.  
> Integration with Plone is not strictly necessary but that is what I am  
> working towards. I am able to access the SQL Server using FreeTDS but  
> not sure how to use iodbc in this situation or if it is the right tool.  
> I can conceivably replicate the data to a sqlite or MySQL database and  
> then use py-sqlalchemy but all that seems too complicated.
>
> I did not get the odbc.ini and odbcinst.ini references to non-existent  
> files such as /home/openlink/lib/oplodbc.so.1. While looking into that I  
> got the impression that building the tdsodbc shared library was the way  
> to access the SQL Server. But that did not work. Now the more I read,  
> the more confused I get as to what is the correct way to do this. 
>
> That was the reason for asking what is the best way to access SQL Server  
> Databases from OpenBSD.
>
> Anyways, I am working my way through it and will be grateful for any  
> pointers or advice.
>
> Vijay
>

well i use some Sql server db's at my job and it's easier like:

# pkg_add -v freetds; pkg_add -v sqsh;

edit /etc/freetds.conf (very useful comments).

and connect using sqsh:

# sqsh -U user ...

see sqsh(1).

but the truth is that the "real work" is done with a custom perl script.
(using DBD::Sybase)

Saludos.

-- 
DISCLAIMER: http://goldmark.org/jeff/stupid-disclaimers/ 
This message will self-destruct in 3 seconds.

Reply via email to