Tuesday, September 7, 2010

What are some well-known DBCC (Data Base Consistency Check) Commands in Sqlserver 2005?

1. DBCC Shrinkdatabase
2. DBCC SHRINKfile
3. DBCC Showcontig
4. DBCC help
5. DBCC IndexDefrag
6. DBCC CheckDB
7. DBCC CheckFilegroup
8. DBCC OPENTRAN  It shows what are all the open transactions in log
9. DBCC LOGINFO  It gives you status of virtual logs if status=2 then that is in use
10. DBCC DBREINDEX(‘Table name’,’Index anme’,’Fillfactor’)
11. DBCC CHECKIDENT(‘T_B_P Table anme’, RESEED, 45)—it sets seed to 45
12. DBCC SQLPERF( LOGSPACE) —Used to see all databases log file sizes.
EX: DBCC SQLPERF(LOGSPACE);
GO

No comments:

Post a Comment