Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Microsoft SQL to Unix command

by hacker_j99 (Beadle)
on May 02, 2001 at 01:05 UTC ( [id://77128]=perlquestion: print w/replies, xml ) Need Help??

hacker_j99 has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I am a novice perl user and have been assigned the task of creating a interface between microsoft SQL and a unix machine. The final product would be unix command displaying the data. Seems like a daunting job of writing the script to query to sql server then sending the data to the buffer, then somehow geting all of it into a command. I believe that I need to use DBI and DBD::ODBC but I have no clue as far as connections and correct modules. Installation is also another factor due to being on a multiple server unix system with lots of paths, but this should ezily be overcome. Any help would be appreciated

Replies are listed 'Best First'.
Re: microsoft SQL to unix buffer
by SilverB1rd (Scribe) on May 02, 2001 at 01:20 UTC
    Just my quick 30 second answer. if you can put a perl script on the server with the database you could then have one on the unix system call the one on the database server and get the data that way. But I would assume that there is a better way. It sound like you need more info on the types of server and how to share them.

    ------
    The Price of Freedom is Eternal Vigilance
Re: Microsoft SQL to Unix command
by wardk (Deacon) on May 02, 2001 at 03:05 UTC

    You will need to talk to your unix sa and request ODBC drivers be purchased/installed.

    should then be able to connect to MSSQL, although I am sure it's not nearly as straightforward as using DBI on the unix box to connect to a RDBMS like Oracle via SQL*Net.

    I think the answer in the other identical post may have some real merit. Perhaps just do the perl on the MSSQL box via Win32::ODBC, and call it via TCPIP from the unix box, passing delimited data. At least this scenario can be done yourself (with a bit of research) as you can just get Win32::ODBC and immediately connect locally on NT. and you can code the perl on the unix box using TCPIP sockets (lots of code on this site to accomplish that).

    good luck, you certainly got an interesting assignment...be sure to post the results of your quest!

Re: Microsoft SQL to Unix command
by asiufy (Monk) on May 02, 2001 at 07:13 UTC
    The search is your friend :)
    This was discussed just a couple of days ago... Check this thread...
    In a nutshell: don't use ODBC unless everything else fails...
Re: Microsoft SQL to Unix command
by AidanLee (Chaplain) on May 02, 2001 at 01:47 UTC
    Well, do look at the DBI documentation available. Also if you have any budget for this I highly recommend "Programming the Perl DBI" from O'reilly by Alligator Descartes & Tim Bunce.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-20 04:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found