We have the following in a bat file:
REM This BAT file uses the userid and password of the account that is running the BAT file.
REM %1 = SQLServer name
REM %2 = database
REM %3 = path to .sql and .log files folder
REM %4 = file name w/o the file extension for .sql and .log files
osql -S %1 -E -d %2 -i "%3%4.sql" -o "%3%4.log" -b
We have another version that requires username and password.
In SSIS we send the 'varaiables' this needs in the Arguments part of the execute process task and the Executable portion points to this bat file.
Let me know if you need more than this.
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.