[OT] connecting to MS SQL on a different computer (DBD::ODBC)

J

John Bokma

Can anyone give pointer(s) on how to connect to a server which runs MS SQL
using DBD::ODBC? I thought it would be as simple as specifying a host and
port, but I can't seem to get it working, and been googling for quite some
time and not found any solution yet and I am a bit lost in UNC, DNC and
more 3 letter abbreviations :-(
 
A

A. Sinan Unur

Can anyone give pointer(s) on how to connect to a server which runs MS
SQL using DBD::ODBC? I thought it would be as simple as specifying a
host and port, but I can't seem to get it working, and been googling
for quite some time and not found any solution yet and I am a bit lost
in UNC, DNC and more 3 letter abbreviations :-(

From <URL: http://search.cpan.org/~jurl/DBD-ODBC-1.13/ODBC.pm>:

use DBI;
$dbh = DBI->connect('dbi:ODBC:DSN', 'user', 'password')

That would indicate that you need to configure a DSN for the server you
want to access from the Control Panel on the machine from which you want
to access.

Sorry, my knowledge and understanding of ODBC ends there.

Sinan
 
T

Thomas Kratz

John said:
Can anyone give pointer(s) on how to connect to a server which runs MS SQL
using DBD::ODBC? I thought it would be as simple as specifying a host and
port, but I can't seem to get it working, and been googling for quite some
time and not found any solution yet and I am a bit lost in UNC, DNC and
more 3 letter abbreviations :-(

Sorry if I state the obvious, but you seem to be new to this.
You will have to have the SQL-Server ODBC driver installed on the machine
running your script. It is included in the client tools for SQL-Server.

Thomas

--
$/=$,,$_=<DATA>,s,(.*),$1,see;__END__
s,^(.*\043),,mg,@_=map{[split'']}split;{#>J~.>_an~>>e~......>r~
$_=$_[$%][$"];y,<~>^,-++-,?{$/=--$|?'"':#..u.t.^.o.P.r.>ha~.e..
'%',s,(.),\$$/$1=1,,$;=$_}:/\w/?{y,_, ,,#..>s^~ht<._..._..c....
print}:y,.,,||last,,,,,,$_=$;;eval,redo}#.....>.e.r^.>l^..>k^.-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,201
Latest member
KourtneyBe

Latest Threads

Top