Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Use DBI for pc-name\SQLEXPRESS

by FloydATC (Deacon)
on Aug 06, 2018 at 11:20 UTC ( [id://1219941]=note: print w/replies, xml ) Need Help??


in reply to Re: Use DBI for pc-name\SQLEXPRESS
in thread Use DBI for pc-name\SQLEXPRESS

I don't use "DSN=" in my working code, just the exact DSN name as it appears between brackets in my odbc.ini

Works fine against several different instances with different versions, default and named instances both Express, Standard and Enterprise.

my $dbh = DBI->connect("dbi:ODBC:$instance", "########", "########");

For the sake of completeness, here are some example entries (anonymized) from odbc.ini:

[SRV2] Description = A default instance and port specified because server isn +'t running a "browser" listener. Driver = FreeTDS Server = n.n.n.n Port = 1433 Database = whatever TDS_Version = 9.0 try server login = yes [SRV1-INST1] Description = A named instance, no port specified because so it will u +se the "browser" listening port Driver = FreeTDS Server = n.n.n.n\INST1 Database = whatever TDS_Version = 9.0 try server login = yes
-- FloydATC

I got 99 problems, most of them have to do with printers.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1219941]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-19 05:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found