Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2005

    Unanswered: Perl connecting to MS SQL server.

    I was wondering if there is a command-line utility that would connect to MS SQL server and would work just like MySQL client for unix?
    If anyone knows could you please give us a link?
    Also, a lot of those clients you just "get in" them and you can't really use the output to redirect to a file or pipe it through grep. Such utilities are quite "human-driven" and it would be nice if I could have a utility where I could pass to to it something like "Select * from customers" and then to pipe the output and then do something else with it and then trigger a process, etc.
    As a side note I am missing this a lot especially using ncftp. Sometimes while working with it I need to put ncftp in the background so I can do something on the local filesystem before I could get back to it, or I need to save the output of the "ls -al" command to a local file or something like that.
    Is this possible with the current utilities like mysql-client or ncftp? If not, such tool can be written pretty easily with perl - does anyone know of one?
    Roumen Semov

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    For MS-SQL 7.0 and later, OSQL.EXE works nicely. For versions up to 7.0, ISQL.EXE is what you want.

    Assuming you have MDAC_TYP.EXE installed to give you the necessary drivers, you can even do this without even using an executable.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts