Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Connect to remote MSSQL database with DBD-ODBC?

by JamesNC (Chaplain)
on Dec 14, 2005 at 13:03 UTC ( #516612=note: print w/ replies, xml ) Need Help??


in reply to Connect to remote MSSQL database with DBD-ODBC?

When you created the DSN using the ODBC Data Source Administrator (make sure you created a System DSN ) which is in the Control Panel under Administrative Tools. Did you get a successful test? If you did, then you could be having issues with the fact that your script is not running with the same credentials as you. Because NTLM is used by default you can do a $dbh=DBI->connect( 'dbi:ODBC:DSN_Name' ) or die $!. Your dba has to set up a seperate account for remote logins. They may give you a hassel about it, but I remember running into a similar problem once and NTLM was the issue. If however, you tested the DSN and it fails, then it is not MSSQL Server, but your network ( make sure the ports are open, a lot of firewall teams block everything now days ). Also, make sure your dba gives you the right group permissions for all the databases you want to access. You can google for tutorials. They abound for using DBI and setting up DSN and DSN-less connections.
JamesNC


Comment on Re: Connect to remote MSSQL database with DBD-ODBC?
Re^2: Connect to remote MSSQL database with DBD-ODBC?
by FinnR (Novice) on Dec 14, 2005 at 14:27 UTC
    JamesNC wrote: "Your dba has to set up a seperate account for remote logins."

    Seems like I need to set up this account / settings without the help of the customer... since their database admin doesn't seem to have any experience with how to do make that happen. I seems like it will be part of my job to make it work... The database server has been on the intranet for years (not connected to the Internet), but they now want to publish some of the data on the net - via a publishing tool (Perl) hosted on our server.

    I know this is not a direct Perl-question (even though my Perl-code won't do any real work until I get that database connection up and running), but have you got any ideas on exactly how to set up an account for remote logins, that can be used for a connection via a ODBC DSN called by Perl on a remote machine?
      Why don't you google for how to add user accounts? How to add user accounts to MSSQL This link seems relevant. Since this is pretty much OT at this point. You need to dig into the docs. ciao, JamesNC
        No problem, I'll dig. Just thought if someone had the answer right in their pocket, they might wanted to share the result of their own sweat and tears.

        Thanks again. Wiedersehen. / FinnR

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2014-12-19 04:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (70 votes), past polls