SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


DBCC Commands


DBCC Commands

Poll
Can you please explain commonly used in real time DBCC Commands?

0% - 0 votes Hi All,
0% 0 votes
66.67% - 2 votes
66.67% 2 votes
0% - 0 votes This is Rangaraja.im new to learn sql dba.
0% 0 votes
0% - 0 votes Can you please explain commonly used in real time DBCC Commands?
0% 0 votes
33.33% - 1 vote
33.33% 1 vote
0% - 0 votes Regards,
0% 0 votes
0% - 0 votes Rangaraja
0% 0 votes
0% - 0 votes rangarajasqldba@gmail.com
0% 0 votes
Member votes: 3, Guest votes: 0. You don't have permission to vote in this poll
Author
Message
brangaraja
brangaraja
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 82
Hi All,

This is Rangaraja.im fresher.
Can anyone please explain mostly used in real time DBCC Commands?

Regards,
Rangaraja
rangarajasqldba@gmail.com
Hemant.R
Hemant.R
SSC-Enthusiastic
SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)

Group: General Forum Members
Points: 126 Visits: 240
hi ,

please check below link..

http://blog.sqlauthority.com/2007/10/19/sql-server-types-of-dbcc-commands-when-used-as-database-console-commands/

in this commands,most frequetly used command are

DBCC INPUTBUFFER(Spid) to get query

DBCC shrinkfile(file_id ,size) to shrink file
GilaMonster
GilaMonster
SSC Guru
SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)

Group: General Forum Members
Points: 87173 Visits: 45270
Hemant.R (12/14/2012)
DBCC shrinkfile(file_id ,size) to shrink file


I would certainly hope shrink isn't a 'most frequently used command', as one should not shrink database files without good reason.
DBCC Inputbuffer can be mostly replaced with the sys.dm_exec_sql_text DMV.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Perry Whittle
Perry Whittle
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19948 Visits: 17242
DBCC CHECKDB would be one of the most common if you're smart ;-)

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
Jason-299789
Jason-299789
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2081 Visits: 3232
I used to Use DBCC SHOWCONTIG quite a bit for looking at fragmentation but have replaced that with the SQL statements against DMV tables and functions, especially for partitioned tables.

DBCC REINDEX or INDEXDEFRAG, but again i've switched to using ALTER INDEX WITH REBUILD/REORGANISE.

DBCC ShrinkDB normally only after restoring to a db to dev environment with limited space or as an emergancy measure on a log file once its backed up if its very low on disk.

_________________________________________________________________________
SSC Guide to Posting and Best Practices
SQLRNNR
SQLRNNR
SSC-Dedicated
SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)

Group: General Forum Members
Points: 32276 Visits: 18552
DBCC Checkdb would be my vote for most frequently used - or at least should be very high on the list.

DBCC updateusage

DBCC CheckConstraints would be another useful command.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Orlando Colamatteo
Orlando Colamatteo
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14929 Visits: 14396
SQLRNNR (12/14/2012)
DBCC CheckConstraints would be another useful command.

I hope people aren't having to use DBCC CHECKCONSTRAINTS all that often ;-)

DBCC CHECKIDENT is one that comes to mind that I have seen become part of standardized processes although it probably should not have made it that far. It has many valid ad hoc uses, especially in production support and unit testing scenarios.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Hemant.R
Hemant.R
SSC-Enthusiastic
SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)

Group: General Forum Members
Points: 126 Visits: 240
hi ,i m executing DBCC checkdb on weekends for large database , bcoz its taking more time to execute .
Need suggestion whether to execute daily..
Perry Whittle
Perry Whittle
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19948 Visits: 17242
Hemant.R (12/17/2012)
hi ,i m executing DBCC checkdb on weekends for large database , bcoz its taking more time to execute .
Need suggestion whether to execute daily..

Try using the PHYSICAL_ONLY clause during the week and full checkdb at weekend

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
GilaMonster
GilaMonster
SSC Guru
SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)

Group: General Forum Members
Points: 87173 Visits: 45270
If you retain your backups for a week or more, running CheckDB just on weekends is fine. Just be sure that you retain backups (full and log) long enough that restoring from a backup is always an option if you do find corruption.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search