Re: how do you run multiple DBCC commands in one job

From: Keith Kratochvil (sqlguy.back2u_at_comcast.net)
Date: 09/02/04


Date: Thu, 2 Sep 2004 12:21:51 -0500

Do it the easy way. Create multiple job steps (one step per DBCC command).
You will be able to output the results of each job step to a file. Look on
the advanced tab for each job step -- creating the file should be easy
enough.

-- 
Keith
"Rob" <anonymous@discussions.microsoft.com> wrote in message
news:009101c4910e$31fadbb0$a401280a@phx.gbl...
> Hello:
>
> I'd like to create a job to run multiple DBCC commands in
> sequence, one after the other upon successful execution of
> the preceeding step (and not using the WAIT FOR TIME/DELAY
> clause).
>
> I could create a multiple step CMDEXEC job, with each step
> containing its own DBCC command. However, I am afraid that
> upon executing this job, SQL Server may run all these DBCC
> commands at the same time without allowing each step to
> complete in its entirety, as SQL Server will not verify
> the completion of a the command passed within a CMDEXEC
> type task.
>
> Any suggestions on how to make the afore-mentioned process
> work, will be very helpful and appreciated. Thank you in
> advance.


Relevant Pages

  • Re: index rebuilds
    ... which explain when and how to reduced fragmentation in indexes. ... Microsoft SQL Server Storage Engine ... > DBCC DBREINDEX can rebuild all indexes for a single table. ... > DBCC command for each table. ...
    (microsoft.public.sqlserver.server)
  • RE: DBCC LOG
    ... DBCC LOG is undocumented DBCC command in SQL Server 2000, ... Some Useful Undocumented SQL Server 7.0 and 2000 DBCC Commands ... Microsoft Online Partner Support ...
    (microsoft.public.sqlserver.tools)
  • Re: Corrupted Record
    ... After running that DBCC command I ... >> I have a SQL Server 2000 database and I apparently ... >> Enterprise Manager to freeze and I have to bring up ... >> How can I get rid of this corrupted record? ...
    (microsoft.public.sqlserver.setup)