I was wondering if there is a way to find out restore progress of the
job. If I run restore in QA, I can use STATS option to control restore
progress statistics but this information is not accessible when restore
executed as a part of a job.
Thanks,
Igor
Hi,
You can do it using a batch file and call the batch file inside the SQL
Agent -- Jobs (Command
1. Batch file should be:-
OSQL -Uuser -Ppassword -Sserver -d dbname -Q"backup database pubs to
pubsbak' with init, stats=10 -oc:\backup.log
2. Then schedule the batch using SQL Agent job with type as "Operating
system command".
3. During job you could open the c:\backup.log to get the status
I hope this will work out.. I have not tested this so far

could test and get back.
Thanks
Hari
SQL Server MVP
"Igor Marchenko" <igormarchenko@.hotmail.com> wrote in message
news:eRAVJRkOFHA.1500@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I was wondering if there is a way to find out restore progress of the
> job. If I run restore in QA, I can use STATS option to control restore
> progress statistics but this information is not accessible when restore
> executed as a part of a job.
>
> Thanks,
> Igor
>
|||It worked nicely. Thanks a lot, Hari! I have found another way. When
scheduling a job in EM, you can specify Output file in Advanced tab of the
task. Stats progress is being logged into this file.
Igor
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:OynaXakOFHA.3880@.tk2msftngp13.phx.gbl...
> Hi,
> You can do it using a batch file and call the batch file inside the SQL
> Agent -- Jobs (Command
> 1. Batch file should be:-
> OSQL -Uuser -Ppassword -Sserver -d dbname -Q"backup database pubs to
> pubsbak' with init, stats=10 -oc:\backup.log
> 2. Then schedule the batch using SQL Agent job with type as "Operating
> system command".
> 3. During job you could open the c:\backup.log to get the status
> I hope this will work out.. I have not tested this so far

> could test and get back.
> Thanks
> Hari
> SQL Server MVP
>
> "Igor Marchenko" <igormarchenko@.hotmail.com> wrote in message
> news:eRAVJRkOFHA.1500@.TK2MSFTNGP09.phx.gbl...
>
No comments:
Post a Comment