Hello,
I am try to find which job is in progress.
Then I start a job A. run a statement like:
select * from sysjobhistory where job_id = 'A' and
run_status = 4
it return nothing, even I know the job it is running.
Can anybody tell me how to get information about those job
in progress from MSDB database?
Thanks in advance...Don't feel bad about not finding it. It isn't in the database. It is
actually in the shared memory between SQL Agent and SQL Server. I don't
know of any way to access it either.
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
"Harry G" <anonymous@.discussions.microsoft.com> wrote in message
news:04ad01c3d6f7$aa1624f0$a101280a@.phx.gbl...
> Hello,
> I am try to find which job is in progress.
> Then I start a job A. run a statement like:
> select * from sysjobhistory where job_id = 'A' and
> run_status = 4
> it return nothing, even I know the job it is running.
> Can anybody tell me how to get information about those job
> in progress from MSDB database?
> Thanks in advance...|||Hi,
Please execute the procedure
exec msdb..sp_help_job @.job_id = 0x3F2224EAAFD7A9418A4643AF5C020379,
@.job_aspect = N'job'
(replcae the jobid with your job id)
current_execution_status =1 then Job executing
current_execution_status =4 then not Running
Thanks
Hari
MCDBA
"Harry G" <anonymous@.discussions.microsoft.com> wrote in message
news:04ad01c3d6f7$aa1624f0$a101280a@.phx.gbl...
> Hello,
> I am try to find which job is in progress.
> Then I start a job A. run a statement like:
> select * from sysjobhistory where job_id = 'A' and
> run_status = 4
> it return nothing, even I know the job it is running.
> Can anybody tell me how to get information about those job
> in progress from MSDB database?
> Thanks in advance...
Showing posts with label progress. Show all posts
Showing posts with label progress. Show all posts
Wednesday, March 21, 2012
How to find the in Progress job in MSDB database
Hello,
I am try to find which job is in progress.
Then I start a job A. run a statement like:
select * from sysjobhistory where job_id = 'A' and
run_status = 4
it return nothing, even I know the job it is running.
Can anybody tell me how to get information about those job
in progress from MSDB database?
Thanks in advance...Don't feel bad about not finding it. It isn't in the database. It is
actually in the shared memory between SQL Agent and SQL Server. I don't
know of any way to access it either.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
"Harry G" <anonymous@.discussions.microsoft.com> wrote in message
news:04ad01c3d6f7$aa1624f0$a101280a@.phx.gbl...
Please execute the procedure
exec msdb..sp_help_job @.job_id = 0x3F2224EAAFD7A9418A4643AF5C020379,
@.job_aspect = N'job'
(replcae the jobid with your job id)
current_execution_status =1 then Job executing
current_execution_status =4 then not Running
Thanks
Hari
MCDBA
"Harry G" <anonymous@.discussions.microsoft.com> wrote in message
news:04ad01c3d6f7$aa1624f0$a101280a@.phx.gbl...
I am try to find which job is in progress.
Then I start a job A. run a statement like:
select * from sysjobhistory where job_id = 'A' and
run_status = 4
it return nothing, even I know the job it is running.
Can anybody tell me how to get information about those job
in progress from MSDB database?
Thanks in advance...Don't feel bad about not finding it. It isn't in the database. It is
actually in the shared memory between SQL Agent and SQL Server. I don't
know of any way to access it either.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
"Harry G" <anonymous@.discussions.microsoft.com> wrote in message
news:04ad01c3d6f7$aa1624f0$a101280a@.phx.gbl...
quote:|||Hi,
> Hello,
> I am try to find which job is in progress.
> Then I start a job A. run a statement like:
> select * from sysjobhistory where job_id = 'A' and
> run_status = 4
> it return nothing, even I know the job it is running.
> Can anybody tell me how to get information about those job
> in progress from MSDB database?
> Thanks in advance...
Please execute the procedure
exec msdb..sp_help_job @.job_id = 0x3F2224EAAFD7A9418A4643AF5C020379,
@.job_aspect = N'job'
(replcae the jobid with your job id)
current_execution_status =1 then Job executing
current_execution_status =4 then not Running
Thanks
Hari
MCDBA
"Harry G" <anonymous@.discussions.microsoft.com> wrote in message
news:04ad01c3d6f7$aa1624f0$a101280a@.phx.gbl...
quote:
> Hello,
> I am try to find which job is in progress.
> Then I start a job A. run a statement like:
> select * from sysjobhistory where job_id = 'A' and
> run_status = 4
> it return nothing, even I know the job it is running.
> Can anybody tell me how to get information about those job
> in progress from MSDB database?
> Thanks in advance...
Monday, March 12, 2012
How to find out restore progress of the job
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
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
Probably you
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
Probably you
> could test and get back.
> Thanks
> Hari
> SQL Server MVP
>
> "Igor Marchenko" <igormarchenko@.hotmail.com> wrote in message
> news:eRAVJRkOFHA.1500@.TK2MSFTNGP09.phx.gbl...
>
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...
>
How to find out restore progress of the job
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,
IgorHi,
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
Probably you
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
Probably you
> could test and get back.
> Thanks
> Hari
> SQL Server MVP
>
> "Igor Marchenko" <igormarchenko@.hotmail.com> wrote in message
> news:eRAVJRkOFHA.1500@.TK2MSFTNGP09.phx.gbl...
>
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,
IgorHi,
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...
>
How to find out restore progress of the job
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,
IgorHi,
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 :) Probably you
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 :) Probably you
> 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
>
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,
IgorHi,
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 :) Probably you
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 :) Probably you
> 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
>
Subscribe to:
Posts (Atom)