osql suppress all output without the -o parameter

  • Other than using the -o parameter and the 'xp_cmdshell "cmd", no output', is there a way to suppress all output from an osql command?

  • Use greater than (>) comparison operator to direct output to a file from osql.

    Edited by - Allen_Cui on 05/08/2003 12:25:19 PM

  • Check this out:

    osql -S[servername] -dmaster -E -Q"exec master..xp_cmdshell 'osql -w300 -E -S[servername] -dmaster -Q"""select * from sysdatabases"""',NO_OUTPUT"

  • Just redirect to NUL.

    e.g.

    osql (...whatever...) > NUL

    Jay Madren


    Jay Madren

Viewing 4 posts - 1 through 3 (of 3 total)

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