Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Posts
    4

    Unanswered: accessing a remote Windows database

    I'm trying to figure out how to access a Windows database (SQL server) from a Linux server. I'm trying to use Win32::ODBC and I've got a lot of information on how to make a connection, running queries, extracting the data, but the piece that I'm missing is what do you do if your database in NOT local ?? I'm assuming accessing remote databases is something developers do, so I'm a little confused on why I can't find any data about this. Can you provide any information ?

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    In the strictly ADO microsoft world, you can supply a Data Source parameter on your connection string. The data source would be the name or IP (hopeflully name) of the server the database lives on.

    Also, you may have better luck in trying to get the DBI's/DBM's for perl and SQL Server.

  3. #3
    Join Date
    Aug 2003
    Posts
    4
    I'm not very familar with the windows world (I'm in the Linux/Unix) ... can you possibly give some examples/references of what you mean ? Basically, someplace where I can see some sample code

    Thanks !!

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    If you have a connection string that you are passing to the connection object, it would look like this in Windows:

    "DSN=SomeDSNName;UID=UserName;Password=Somethi ng"

    The ODBC DSN (Data Source Name) will direct the request to the correct driver, server, and in some cases the database as well. If you do not have a DSN available, you have to supply these yourself:

    "Provider=SQLOLEDB;UID=UserName;Password=something ;Data Source=ServerName;Database=DatabaseName"

    As for examples from a UNIX/Linux world, I am at a total loss. I was not even sure that ODBC existed on Linux. Hope this helps.

  5. #5
    Join Date
    Aug 2003
    Posts
    4
    I think I need to use the DBI::Proxy, I just have to make sure the correct modules are loaded on the windows machine

    How do I access a MS Windows based database from UNIX/Linux using DBI::Proxy?
    On the UNIX/Linux machine install DBI and all the modules to support DBD::Proxy.
    On the Windows system install DBI, all the modules for DBD::Proxy, and DBD::ODBC.
    Define a system DSN (using ODBC connection manager) to the Windows database.
    Using the ODBC Test connection, test the ODBC connection.

    I just know much about loading modules on Windows. Any thoughts on that ??

    Thanks for your help so far.

Posting Permissions

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