?
Solved

how do we run DBCC commands?

Posted on 2006-04-27
10
Medium Priority
?
889 Views
Last Modified: 2008-01-09
We are new to MS SQL 2000.

Monday we had a power loss that shut down the servers (including SQL server). Since then the SQL seems to be sluggish, althought the server itself seems to be running fine. Most forums are saying to run a DBCC DBREINDEX (which we have never done but probably should since we have over 100,000 records in the table and we have been modifying and deleteing items for 8 months).

Question: How do you run DBCC commands?

Thanks for the help.
0
Comment
Question by:tdiops
  • 5
  • 5
10 Comments
 
LVL 20

Expert Comment

by:Sirees
ID: 16553960
You can run in Query Analyser
0
 
LVL 2

Author Comment

by:tdiops
ID: 16554006
is DBCC a command line tool?
0
 
LVL 20

Expert Comment

by:Sirees
ID: 16554013
Go to Tools-> Query Analyzer and select the database and run this

DBCC DBREINDEX(yourtablename , '')
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
LVL 20

Expert Comment

by:Sirees
ID: 16554025
>>is DBCC a command line tool? <<

It is a T-SQL command.
 
0
 
LVL 20

Accepted Solution

by:
Sirees earned 2000 total points
ID: 16554034
0
 
LVL 2

Author Comment

by:tdiops
ID: 16554061
checking now....hold please.
0
 
LVL 20

Expert Comment

by:Sirees
ID: 16554095
When DBCC DBREINDEX is used to rebuild indexes, keep in mind that as the indexes on a table are being rebuilt, that the table becomes unavailable for use by your users.
0
 
LVL 2

Author Comment

by:tdiops
ID: 16554147
Sirees, thanks a bunch! It worked. We needed that push in the right direction. Whole nee world now that we know where the QA is. Tnanks, the points are yours!
0
 
LVL 2

Author Comment

by:tdiops
ID: 16554165
it did take them down for about 2 minutes while it was running, but the results so far are fantastic....was very sluggish before...now it is flying. Thanks
0
 
LVL 2

Author Comment

by:tdiops
ID: 16554232
I am posting another question, less points but not as urgent. "How do I setup a Stored Procedure to run DBCC DBREINDEX and how often?" Please check it out. Thanks
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question