From: bob123 on
Hi,

I do my backup,check .. with MaintenancePlans
I need to execute it by scripts launch by an external scheduler
I can start the job from a script osql
but how can I get the log in the output of the script ?

c:\> osql -E -i backup.sql
blah, blah ...
....
The package executed successfully

The external scheduler need it ...

Thanks in advance
SS2005/SS2008


From: Erland Sommarskog on
bob123 (bob123(a)gmail.com) writes:
> I do my backup,check .. with MaintenancePlans
> I need to execute it by scripts launch by an external scheduler
> I can start the job from a script osql
> but how can I get the log in the output of the script ?
>
> c:\> osql -E -i backup.sql
> blah, blah ...
> ...
> The package executed successfully

Either use the -o option of OSQL to create an output file, or set up
an output file under the Advanced tab in the job-step dialog.

--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx