February 15, 2008 at 12:48 pm
Can I write to DOS window from a stored procedure?
I have a batch:
REM ------------------ Conversion (runs as Transaction ! ) ----------------------
echo Running Conversion...
echo [MasterConversion.sql] >> %name_of_log%
osql -b -n -S %PCDCS_server% -d %PCDCS_db% -U %PCDCS_User% -P %PCDCS_Password% -i "MasterConversion.sql" >> %name_of_log%
if %ERRORLEVEL% NEQ 0 goto sql_error
Echo Conversion completed
When MasterConversion.sql is running
I would like to write to that same DOS window
where the batch is writing.
I don't want all output. That's why I have >> %name_of_log%
I want to write only specific info from MasterConversion.sql
Thanks,
Robert
February 15, 2008 at 1:43 pm
Look up xp_cmdshell in BOL. Be cautious how you implement this as it has security issues.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply