run .bat file on different domain

  • Hi,

    I need to run a .bat file on a server which is on different domain. I have been domain-userid/password to access the file. How do I do that is SSIS?

    Thanks,

    Ramu

  • you have create seperate ssis package to call .bat in that domain.

    and then call this.bat package in main package using sql account.

  • Are these trusted domains so you could just give authority for the SQL Server Agent user to run the file directly?

  • I agree that Alan's solution would be best, assuming that the other domain has a trust with the domain from which you're running the SSIS package.

    Just curious, what operation is the batch file performing on the remote machine?

    Tim Mitchell, Microsoft Data Platform MVP
    Data Warehouse and ETL Consultant
    TimMitchell.net | @Tim_Mitchell | Tyleris.com
    ETL Best Practices

  • The two domains are not trusted.

  • Is the batch file something that you can schedule separately on the remote server? If you're doing a data extraction with that batch file, perhaps you could run it with Windows Scheduler and pick up the file with an FTP Task.

    Tim Mitchell, Microsoft Data Platform MVP
    Data Warehouse and ETL Consultant
    TimMitchell.net | @Tim_Mitchell | Tyleris.com
    ETL Best Practices

  • The next option assumine it does not have to be a .bat file is you can create a .NET program that as part of its configuration inpersonates the username and logon of the other domain and it runs the code that would be on the batch file.

    As other people have said this only work for a batch process that is called from the SQL Server. If the other machine needs to initiate the call it is easier but not as secure. Create a machine account on the sql server with public rights so it can't do much but login and create a SQL server login with rights to write to one table ( or the minimum needed). The process starts, logs into the SQL Server using SQL authentication, and writes to a table the data that is needed. The table has either a CLR or trigger function that does the processing and has the elivated privilidges necessary to process and insert the data to the production tables you need. We do this with vendor where we have to process batch data from them.

    I hope that help and I am sure a good network engineer can give you more suggestions.

Viewing 7 posts - 1 through 6 (of 6 total)

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