• donne4real (1/6/2010)


    I think I should have added more information. I have 2 tables. It loops through the table to see if a filename exists in both. And if it does, calls the specified batch file (@batfilename). There are different batch files for the different filenames.

    It really depends on what those batch files are doing - but I wouldn't use SQL Server to control this process. I would look at controlling the process from the OS level - and just using calls to SQL Server to get the data from the tables that is needed.

    Powershell would be ideal for this - as well as using SQLCMD and would not require opening up access to xp_cmdshell to process the batch files.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs