Home > Archive > MS SQL Server Tools > October 2005 > server agent scheduled job - running procedure is very slow









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author server agent scheduled job - running procedure is very slow
Michal Å trobl

2005-10-27, 7:55 am

Hi, I have a problem whith procedure running by server agent scheduled job.
If I initiate this procedure by Query Analyser, is running more than 100x
quicker. Procedure make loading input data from text file, about 100 000
record count and start next SQL queries.

But, I don´t know what to make for increasing performance. Like scheduled
job is this very slow...

Thanks for all ideas
Andrew J. Kelly

2005-10-27, 7:55 am

Do you have SET NOCOUNT ON at the beginning of the block of code in the Job?

--
Andrew J. Kelly SQL MVP


"Michal Strobl" < Michaltrobl@discussi
ons.microsoft.com> wrote in message
news:C0CAF1BE-0C85-46CB-B3EB- DCFFFB06F1D2@microso
ft.com...
> Hi, I have a problem whith procedure running by server agent scheduled
> job.
> If I initiate this procedure by Query Analyser, is running more than 100x
> quicker. Procedure make loading input data from text file, about 100 000
> record count and start next SQL queries.
>
> But, I don´t know what to make for increasing performance. Like scheduled
> job is this very slow...
>
> Thanks for all ideas



Michal Å trobl

2005-10-27, 7:55 am

Yes.

Andrew J. Kelly pÃ_Å¡e:

> Do you have SET NOCOUNT ON at the beginning of the block of code in the Job?
>
> --
> Andrew J. Kelly SQL MVP
>
>
> "Michal Strobl" < Michaltrobl@discussi
ons.microsoft.com> wrote in message
> news:C0CAF1BE-0C85-46CB-B3EB- DCFFFB06F1D2@microso
ft.com...
>
>
>

Michal Å trobl

2005-10-27, 7:55 am

Exactly, we have in job 3 steps. Each step calls own procedure. On begining
of code each procedure we call SET NOCOUNT ON.

Andrew J. Kelly pÃ_Å¡e:

> Do you have SET NOCOUNT ON at the beginning of the block of code in the Job?
>
> --
> Andrew J. Kelly SQL MVP
>
>
> "Michal Strobl" < Michaltrobl@discussi
ons.microsoft.com> wrote in message
> news:C0CAF1BE-0C85-46CB-B3EB- DCFFFB06F1D2@microso
ft.com...
>
>
>

Tibor Karaszi

2005-10-27, 7:55 am

Try scheduling a CmdExec job and use OSQL.EXE to execute the proc.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/

Blog: http:// solidqualitylearning
.com/blogs/tibor/



"Michal Å_trobl" < Michaltrobl@discussi
ons.microsoft.com> wrote in message
news:6309661F-D85A-472F-9058- 5270388CB646@microso
ft.com...[color=darkred]
> Exactly, we have in job 3 steps. Each step calls own procedure. On begining
> of code each procedure we call SET NOCOUNT ON.
>
> Andrew J. Kelly pÃ_Å¡e:
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com