
Hi David, On Wed, May 21, 2003 at 04:25:02PM +0100, david.cruz@kpnqwest.pt wrote:
We'd like to have OTRS Tickets linked to our existing Customer database.
All we need is for the Customer info to be taken from a table/view. Since it's in a Microsoft SQL2000 database, we're trying to do this the easy way, by connecting to the sql2k database with FreeTDS and unixODBC.
I just can't figure out how to direct the Customer data through ODBC... [...] Can you help us put this scenario working? I'm thinking about an ODBC backend (like the LDAP backend), but don't know how to do it.
You can use the customer database backend (Kernel::System::CustomerUser::DB) for external database connects. But you need to update from CVS: Kernel/System/DB.pm to 1.27 Kernel/System/CustomerUser/DB.pm to 1.16 You also need the DBD::ODBC (http://search.cpan.org/author/JURL/DBD-ODBC-1.05/) module for DBI to connect to unixODBC DSNs. Copy the "CustomerUser" DB example from Kernel/Config/Defaults.pm into your custom Kernel/Config.pm. Change the table and column names like you need (like your table is). Add to the CustomerUser params [...] Params => { DSN => 'DBI:odbc:yourdsn', User => 'youruser', Password => 'yourpw', Table => 'your_customer_user_table', }, [...]
I did find some lines of code about ODBC in Kernel/System/DB.pm, but didn't understand how to use them.
Kernel/System/DB.pm is a backend module - you just need Kernel/System/CustomerUser/DB.pm. If you need any more help, send a follow up! :)
|)avid ------------------------------------------------- KPNQwest Portugal http://www.KPNQwest.pt
-Martin -- Martin Edenhofer - <martin at edenhofer.de> - http://martin.edenhofer.de/ --