Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Using DBD::ODBC and cygwin to connect to MS SQL?

by Tommy (Chaplain)
on Jul 13, 2016 at 15:13 UTC ( #1167694=note: print w/replies, xml ) Need Help??


in reply to Re: Using DBD::ODBC and cygwin to connect to MS SQL?
in thread Using DBD::ODBC and cygwin to connect to MS SQL?

Thanks for the reply, soonix. This is all new territory for me. I've only ever worked with databases running on Linux/UNIX servers before. I'd like to keep it as simple as possible, but I've read that I need to set up unixodbc and freetds to get this to work. Am I missing something?

The reference I've been using so far is this StackOverflow post. How do you recommend I do it?

Tommy
A mistake can be valuable or costly, depending on how faithfully you pursue correction
  • Comment on Re^2: Using DBD::ODBC and cygwin to connect to MS SQL?

Replies are listed 'Best First'.
Re^3: Using DBD::ODBC and cygwin to connect to MS SQL?
by soonix (Canon) on Jul 13, 2016 at 18:11 UTC
    Well, to find out wether the stumbling block is Perl, ODBC, some driver or even the database configuration, I'd try to connect to the database via the most simple tool. "Simple" in this case means: pre-existing and easily configured.

    If you're on Windows, you might have MS Access or Excel, both of which can connect to "external" sources, hidden under something like "Import external data".

    There probably is the possibility to use native MSSQL. I'd try this first to see if the database is reachable at all.
    I know cygwin Perl only from hearsay, but chances are that instead of DBD::ODBC you could also use DBD::ADO (I use this with Strawberry Perl), which AFAIK uses the same "native" drivers as Excel/Access.

    Then I'd try ODBC (probably under "other", where you will have to select in a next step some "data source". If it is not already set up for you, you'll need it for Perl, too, anyway.

    After you got that working, you can extract the connection string from the connection's properties within Excel/Access

    updated "set up" url

        Hi! You can easily use an existing ODBC connection on windows by just installing DBD::ODBC.
        From the OP I can't see whether he has an existing, functioning ODBC connection or not.
        To rule that out, I'd try to connect to the database from a "standard" tool (first via "native" Driver, then via ODBC).

        BTW in your gist, this should go into the missing 01_setup_Windows.md :-)

        Your cue about 32- vs. 64- bit is very important. From my last adventure in this area ISTR that Google (or even perlmonk's Super Search) had all necessary info about this point, but of course I didn't write it down :-/

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2022-11-29 04:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?