There was nothing running. To isolate, I made a copy of
the database and renamed it. There was nothing hitting
the database when the DBCC was running during the two
different scenarios.
[quoted text, click to view] >-----Original Message-----
>Is there anything else running when you run the job? DBCC
CHECKDB takes out
>locks on the objects it checks, so it might have to wait
for locks to be
>released by other connections.
>
>--
>Jacco Schalkwijk
>SQL Server MVP
>
>
>"Canaries" <anonymous@discussions.microsoft.com> wrote in
message
>news:555501c42d25$d09852e0$a601280a@phx.gbl...
>> I run the DBCC for a particular database in Query
>> Analyzer, and it takes 3 minutes. I take the same SQL
>> script and place it in a job to be scheduled in
Enterprise
>> Manager, and it takes 1 hour. Why? Please help.
>
>
>.
I checked out the connection properties for Query Analyzer
and used the same settings for the job. It still takes
the long time.
[quoted text, click to view] >-----Original Message-----
>Try adding SET NOCOUNT ON at the beginning of the job
step.
>
>--
>Andrew J. Kelly SQL MVP
>
>
>"Canaries" <anonymous@discussions.microsoft.com> wrote in
message
>news:555501c42d25$d09852e0$a601280a@phx.gbl...
>> I run the DBCC for a particular database in Query
>> Analyzer, and it takes 3 minutes. I take the same SQL
>> script and place it in a job to be scheduled in
Enterprise
>> Manager, and it takes 1 hour. Why? Please help.
>
>
>.
Is there anything else running when you run the job? DBCC CHECKDB takes out
locks on the objects it checks, so it might have to wait for locks to be
released by other connections.
--
Jacco Schalkwijk
SQL Server MVP
[quoted text, click to view] "Canaries" <anonymous@discussions.microsoft.com> wrote in message
news:555501c42d25$d09852e0$a601280a@phx.gbl...
> I run the DBCC for a particular database in Query
> Analyzer, and it takes 3 minutes. I take the same SQL
> script and place it in a job to be scheduled in Enterprise
> Manager, and it takes 1 hour. Why? Please help.
Don't see what you're looking for? Try a search.