Subject: | ODBC DSN Problem |
Date: | Sun, 23 May 2010 23:02:09 +0200 |
To: | "'bug-RT-Authen-ExternalAuth [...] rt.cpan.org'" <bug-RT-Authen-ExternalAuth [...] rt.cpan.org> |
From: | "AnD-Institut (Andreas Kammerer)" <kammerer [...] and.at> |
Hi!
Just a suggestion: I use ODBC to connect to a Windows SQL-Server 2008 instance. I had some Problems to get a proper DSN, so i modified DBI.pm around line 455 to get an override:
# AnD: Using DSN directily from config if having something "special"
my $db_dsn = $config->{'dsn'};
# Use config to create a DSN line for the DBI connection
my $dsn = "dbi:$dbi_driver:database=$db_database;host=$db_server;port=$db_port";
# AnD: Override dsn directly in set in config
if ($db_dsn) {$dsn=$db_dsn;}
# Now let's get connected
And in the RT_SiteConfig.pm:
Set($ExternalSettings, {
'My_Globeman' => {
'type' => 'db',
'dsn' => 'DBI:ODBC:AnD2009',
'server' => 's03-sql',
Ist a little "quick and dirty" ;) - maybe there should be some change tot he string-building oft he dsn, so that parameters which are not given by the config are not included (ie if no port iss et, then dont include 'port=' in the dsn...)
Greetings from Austria,
Andreas Kammerer, CMC
Geschäftsführer
kammerer@and.at - www.and.at
Tel.: +43 7276/4282 101 - Fax: +43 7276/4282 99
Absender dieses Mails ist das AnD-Institut Inh. Andreas Kammerer, Rossanger 7, AT-4722 Peuerbach, Gerichtsstand ist AT-4722 Peuerbach. Wenn Sie keine eMails mehr von uns erhalten möchten, antworten Sie bitte auf dieses Mail mit "UNSUBSCRIBE" im Betreff.