Accessing an AS400 File Share from SQL

  • I need to get to a file share on an AS400 from SQL Server. Regular users map a drive from their workstation an which saves their AS400 login and password in the drive mapping, however; since no-one is logged in on the SQL Server, a simple drive map won't work.

    I have a feeling the answer will be to implement Host Integration Server and have that handle the NT account to AS400 account mapping. Is there a more obvious alternative I'm missing? Does anyone know anything about Host Integration Server? We've never used it here.

  • In the Professional DTS book, Brian Knight talks about this. He has some experience, but he's having a baby (well not him, his wife) today, so he might not get back on for a few days.

    You can map a drive from the server, just log in as the SQL Server account and build the mapping. IT should save and be visible from the server.

    Steve Jones

    steve@dkranch.net

  • Thanks Steve. That makes sense. My Network guy didn't think it would work that way, but I have a feeling it will. I'll let you know if it works or not.

    John

  • pls do. I have a number of servers where this works.

    Steve Jones

    steve@dkranch.net

  • Does the drive to map require a login to connect to the AS400 share. If so you may need to also have the SQL Server account and password with access on the AS400. And SQL Agent if running this has to be running under that login. This would be the only credentials SQL is passing for the share to open. Would that not be correct Steve?

  • Maybe try to ftp it? I've been away from my beloved as/400's for over a year now (sniff), but in the past I've simply created an ftp script, using ftp with the -S parm.

    If you don't mind me asking, what is host integration server?


    -Ken

  • Host Integration Server is M$'s .NET bridge server. It allows you to do cool stuff like map an NT login or group to an AS400 login and manage permissions in the M$ world. It also comes with ODBC drivers.

  • Final solution!

    Our network support guys couldn't get the drive letter to work for the account sql logs in as. I used vb script called from a job to create a drive mapping and move the files from the AS400 share. Works like a charm.

    An Abbreviated example follows:

    Set WshNetwork = WScript.CreateObject("WScript.Network")

    WshNetwork.MapNetworkDrive "Y:", AS400SharePath, false, "AS400Login", "AS400Password"

  • Glad to hear. I should have known this when I first saw as I have this same problem with Novell servers that I have done that way for over 2 years, I am looking into a new possibility though and will post if anything comes of it.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply