Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

DBCC Commands Expand / Collapse
Can you please explain commonly used in real time DBCC Commands?
Poll ResultsVotes
Hi All,
0%
0
 
66.67%
2
This is Rangaraja.im new to learn sql dba.
0%
0
Can you please explain commonly used in real time DBCC Commands?
0%
0
 
33.33%
1
Regards,
0%
0
Rangaraja
0%
0
rangarajasqldba@gmail.com
0%
0
Member Votes: 3, Anonymous Votes: 0. You don't have permission to vote within this poll.
Author
Message
Posted Friday, December 14, 2012 4:20 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, September 23, 2013 7:48 AM
Points: 3, Visits: 64
Hi All,

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

Regards,
Rangaraja
rangarajasqldba@gmail.com
Post #1396578
Posted Friday, December 14, 2012 4:53 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, March 3, 2014 4:05 AM
Points: 47, Visits: 236
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

Post #1396585
Posted Friday, December 14, 2012 5:45 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:25 PM
Points: 43,008, Visits: 36,164
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 2008, MVP
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

Post #1396599
Posted Friday, December 14, 2012 6:37 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:38 PM
Points: 6,350, Visits: 13,675
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"
Post #1396616
Posted Friday, December 14, 2012 7:56 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 9:31 AM
Points: 876, Visits: 2,392
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
Post #1396674
Posted Friday, December 14, 2012 9:20 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 2:50 PM
Points: 21,744, Visits: 15,435
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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1396726
Posted Friday, December 14, 2012 11:59 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 7:19 PM
Points: 7,127, Visits: 12,655
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
Post #1396773
Posted Monday, December 17, 2012 12:00 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, March 3, 2014 4:05 AM
Points: 47, Visits: 236
hi ,i m executing DBCC checkdb on weekends for large database , bcoz its taking more time to execute .
Need suggestion whether to execute daily..
Post #1397105
Posted Monday, December 17, 2012 1:07 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:38 PM
Points: 6,350, Visits: 13,675
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"
Post #1397123
Posted Monday, December 17, 2012 1:25 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:25 PM
Points: 43,008, Visits: 36,164
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 2008, MVP
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

Post #1397125
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse