Cannot see / enumerate DSN ODBC using perl in Windows
am 19.08.2007 15:26:23 von Eadmund
Hi,
I've moved my working W2k3 Activestate Perl 5.8 system to another
server, but now, when I list my ODBC data sources (my @dsns = DBI-
>data_sources('ODBC')) I get a blank, not my system DSN (which IS
configured and working), which DOES appear using the same code on my
old system, urmmm?
I'm assuming that this is a windows security/permissions issue, in
that the account running the perl script does not have access to the
ODBC system DSNs. I have absolutley no idea where to permission this
up, as there appears to be no ODBC/SYSTEM DSN service, or special
security group I can find, any ideas???
Thanks
Ed (eadmund@letterbee.com)
Re: Cannot see / enumerate DSN ODBC using perl in Windows
am 20.08.2007 10:30:02 von Martin.Evans
Eadmund@letterbee.com wrote:
> Hi,
>
> I've moved my working W2k3 Activestate Perl 5.8 system to another
> server, but now, when I list my ODBC data sources (my @dsns = DBI-
>> data_sources('ODBC')) I get a blank, not my system DSN (which IS
> configured and working), which DOES appear using the same code on my
> old system, urmmm?
>
> I'm assuming that this is a windows security/permissions issue, in
> that the account running the perl script does not have access to the
> ODBC system DSNs. I have absolutley no idea where to permission this
> up, as there appears to be no ODBC/SYSTEM DSN service, or special
> security group I can find, any ideas???
>
> Thanks
>
> Ed (eadmund@letterbee.com)
>
>
Are you saying that when you logon to your 2003 box as user X you can
run up the odbc administrator and see a SYSTEM DSN , you can run another
app that uses that SYSTEM DSN but Perl's data_sources run as the same
user does not return the DSN?
Unless there is something under 2003 which associates certain
permissions with executables I cannot see how the system would
differentiate between user X running non-perl apps and perl. Of course
there could be a bug in DBD::ODBC (looking now I see it does not report
any errors but would just return an empty list if it errored).
What is the name of the SYSTEM DSN you have created?
Assuming nothing else occurs, if I sent you some C code (and/or an
executable) could you compile/run it on this machine? It would simply be
calls to SQLDataSources with error reporting.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com