• For deploying sp's (which are located in a script called C:\mySP.sql) you can use:

    SET @mySQL = 'CALL isql -S' + @InstanceName + ' -E -i"C:\mySP.sql" < and the rest of your isql options>'

    EXEC sp_executesql @mySQL

    Ofcourse this only works if the file is located on your machine hosting SQL Server. If you're working remotely (as most people are) you can put the "CALL isql"-commands in a temp-table, select all rows from this table and put them in a batch-file:

    CREATE TABLE #tmp (cmd VARCHAR(4000))

    -- Do the following for all your instances

    BEGIN

       INSERT #tmp (cmd) VALUES ('CALL isql -S' + @InstanceName + ' -E -i"C:\mySP.sql" < and the rest of your isql options>')

    END

    -- when you're finished

    SELECT cmd FROM #tmp

    -- Paste the result in a *.bat file and execute it

    Grtz, Lex