I am trying to connect to a remote MSSQL server that is at a specific IP address.
I am running Perl on Windows
I have the DBI modules installed.
My perl script is able to connect to a MSSQL server that is on my local network.
All other programs (ODBC administrator, SQL Management Studio, Local C# programs) are able to connect to the remote server, but my PERL script is not.
I have tried creating a system DSN, and tried several suggested styles for the connect string, but each time I get an error that says the Data Source Name or default dreiver is not specified.
dbi:ODBC:$dsn;
dbi:ODBC:DSN=$dsn;
When I build a proper DSN-less connect string the connection fails with an error that says invalid connection:
dbi:ODBC:Driver={SQL Server};Server=$ipaddress;Database=$database;UID=$uid;PWD=$pwd;
dbi:ODBC:Driver={SQL Server};Server=$ipaddress:1433;Database=$database;UID=$uid;PWD=$pwd;
These connect strings work in other programs (written in various languages) on this computer, they simply don't work in my Perl program.
I must stress these things:
The Perl program is able to connect to a database on my LAN by simply changing the ip-address of the remote server with a server name on the local network.
Other programs are able to connect to the remote server, using the same connect string with the ip-address.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.