Skip to main content

DBCC CHECKDB

Checks the logical and physical integrity of all the objects in the specified database.

DBCC CHECKDB('Galaxy');

Message Results:


DBCC results for 'Galaxy'.
Service Broker Msg 9675, State 1: Message Types analyzed: 14.
Service Broker Msg 9676, State 1: Service Contracts analyzed: 6.
Service Broker Msg 9667, State 1: Services analyzed: 3.
Service Broker Msg 9668, State 1: Service Queues analyzed: 3.
Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0.
Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0.
Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0.
Service Broker Msg 9605, State 1: Conversation Priorities analyzed: 0.
DBCC results for 'sys.sysrscols'.
There are 1309 rows in 23 pages for object "sys.sysrscols".
DBCC results for 'sys.sysrowsets'.
There are 135 rows in 2 pages for object "sys.sysrowsets".
DBCC results for 'sys.sysallocunits'.
There are 166 rows in 3 pages for object "sys.sysallocunits".
DBCC results for 'sys.sysfiles1'.
There are 2 rows in 1 pages for object "sys.sysfiles1".
DBCC results for 'sys.syspriorities'.
There are 0 rows in 0 pages for object "sys.syspriorities".
DBCC results for 'sys.sysfgfrag'.
There are 2 rows in 1 pages for object "sys.sysfgfrag".
DBCC results for 'sys.sysphfg'.
There are 1 rows in 1 pages for object "sys.sysphfg".
DBCC results for 'sys.sysprufiles'.
There are 2 rows in 1 pages for object "sys.sysprufiles".
DBCC results for 'sys.sysftinds'.
There are 0 rows in 0 pages for object "sys.sysftinds".
DBCC results for 'sys.sysowners'.
There are 15 rows in 1 pages for object "sys.sysowners".
DBCC results for 'sys.sysprivs'.
There are 131 rows in 1 pages for object "sys.sysprivs".
DBCC results for 'sys.sysschobjs'.
There are 233 rows in 5 pages for object "sys.sysschobjs".
DBCC results for 'sys.syscolpars'.
There are 1596 rows in 35 pages for object "sys.syscolpars".
DBCC results for 'sys.sysnsobjs'.
There are 1 rows in 1 pages for object "sys.sysnsobjs".
DBCC results for 'sys.syscerts'.
There are 0 rows in 0 pages for object "sys.syscerts".
DBCC results for 'sys.sysxprops'.
There are 0 rows in 0 pages for object "sys.sysxprops".
DBCC results for 'sys.sysscalartypes'.
There are 34 rows in 1 pages for object "sys.sysscalartypes".
DBCC results for 'sys.systypedsubobjs'.
There are 0 rows in 0 pages for object "sys.systypedsubobjs".
DBCC results for 'sys.sysidxstats'.
There are 505 rows in 11 pages for object "sys.sysidxstats".
DBCC results for 'sys.sysiscols'.
There are 649 rows in 6 pages for object "sys.sysiscols".
DBCC results for 'sys.sysbinobjs'.
There are 23 rows in 1 pages for object "sys.sysbinobjs".
DBCC results for 'sys.sysaudacts'.
There are 0 rows in 0 pages for object "sys.sysaudacts".
DBCC results for 'sys.sysobjvalues'.
There are 596 rows in 136 pages for object "sys.sysobjvalues".
DBCC results for 'sys.sysclsobjs'.
There are 16 rows in 1 pages for object "sys.sysclsobjs".
DBCC results for 'sys.sysrowsetrefs'.
There are 0 rows in 0 pages for object "sys.sysrowsetrefs".
DBCC results for 'sys.sysremsvcbinds'.
There are 0 rows in 0 pages for object "sys.sysremsvcbinds".
DBCC results for 'sys.sysxmitqueue'.
There are 0 rows in 0 pages for object "sys.sysxmitqueue".
DBCC results for 'sys.sysrts'.
There are 1 rows in 1 pages for object "sys.sysrts".
DBCC results for 'sys.sysconvgroup'.
There are 0 rows in 0 pages for object "sys.sysconvgroup".
DBCC results for 'sys.sysdesend'.
There are 0 rows in 0 pages for object "sys.sysdesend".
DBCC results for 'sys.sysdercv'.
There are 0 rows in 0 pages for object "sys.sysdercv".
DBCC results for 'sys.syssingleobjrefs'.
There are 152 rows in 1 pages for object "sys.syssingleobjrefs".
DBCC results for 'sys.sysmultiobjrefs'.
There are 1232 rows in 9 pages for object "sys.sysmultiobjrefs".
DBCC results for 'sys.sysguidrefs'.
There are 0 rows in 0 pages for object "sys.sysguidrefs".
DBCC results for 'sys.syscompfragments'.
There are 0 rows in 0 pages for object "sys.syscompfragments".
DBCC results for 'sys.sysftstops'.
There are 0 rows in 0 pages for object "sys.sysftstops".
DBCC results for 'sys.sysqnames'.
There are 97 rows in 1 pages for object "sys.sysqnames".
DBCC results for 'sys.sysxmlcomponent'.
There are 99 rows in 1 pages for object "sys.sysxmlcomponent".
DBCC results for 'sys.sysxmlfacet'.
There are 112 rows in 1 pages for object "sys.sysxmlfacet".
DBCC results for 'sys.sysxmlplacement'.
There are 18 rows in 1 pages for object "sys.sysxmlplacement".
DBCC results for 'sys.sysobjkeycrypts'.
There are 0 rows in 0 pages for object "sys.sysobjkeycrypts".
DBCC results for 'sys.sysasymkeys'.
There are 0 rows in 0 pages for object "sys.sysasymkeys".
DBCC results for 'sys.syssqlguides'.
There are 0 rows in 0 pages for object "sys.syssqlguides".
DBCC results for 'sys.sysbinsubobjs'.
There are 3 rows in 1 pages for object "sys.sysbinsubobjs".
DBCC results for 'sys.syssoftobjrefs'.
There are 213 rows in 3 pages for object "sys.syssoftobjrefs".
DBCC results for 'HCROPsConfigurationCodestest'.
There are 1099 rows in 6 pages for object "HCROPsConfigurationCodestest".
DBCC results for 'HCROPsBreakdownOfPettyCash'.
There are 2 rows in 1 pages for object "HCROPsBreakdownOfPettyCash".
DBCC results for 'HCROPsStockRegister'.
There are 4 rows in 1 pages for object "HCROPsStockRegister".
DBCC results for 'HCROPs_AuditTrail'.
There are 601 rows in 65 pages for object "HCROPs_AuditTrail".
DBCC results for 'HCROPsWaterBillRegister'.
There are 1 rows in 1 pages for object "HCROPsWaterBillRegister".
DBCC results for 'Table_1'.
There are 183 rows in 8 pages for object "Table_1".
DBCC results for 'HCROPsProductSetup'.
There are 565 rows in 5 pages for object "HCROPsProductSetup".
DBCC results for 'HCROPsUserSetup'.
There are 7 rows in 1 pages for object "HCROPsUserSetup".
DBCC results for 'HCROPsStampRegister'.
There are 6 rows in 1 pages for object "HCROPsStampRegister".
DBCC results for 'CIF_Report_Archive'.
There are 14 rows in 1 pages for object "CIF_Report_Archive".
DBCC results for 'CIF_RFCD_FC_DebitCardInformation'.
There are 534 rows in 34 pages for object "CIF_RFCD_FC_DebitCardInformation".
DBCC results for 'ErrorLog'.
There are 16 rows in 7 pages for object "ErrorLog".
DBCC results for 'AuditTrail'.
There are 530 rows in 41 pages for object "AuditTrail".
DBCC results for 'HCROPs_ErrorLog'.
There are 393 rows in 310 pages for object "HCROPs_ErrorLog".
DBCC results for 'CIF_CardPro_IRIS_USDDATA'.
There are 157 rows in 7 pages for object "CIF_CardPro_IRIS_USDDATA".
DBCC results for 'HCROPsStampRequisition'.
There are 17 rows in 1 pages for object "HCROPsStampRequisition".
DBCC results for 'HCROPsStampRegisterHistory'.
There are 6 rows in 1 pages for object "HCROPsStampRegisterHistory".
DBCC results for 'CIF_UsdCountry'.
There are 211 rows in 2 pages for object "CIF_UsdCountry".
DBCC results for 'BTS_WorkOrder'.
There are 0 rows in 0 pages for object "BTS_WorkOrder".
DBCC results for 'BTS_VendorBill'.
There are 0 rows in 0 pages for object "BTS_VendorBill".
DBCC results for 'BTS_StaffBill'.
There are 0 rows in 0 pages for object "BTS_StaffBill".
DBCC results for 'HCROPsCardRegisterHistory'.
There are 1 rows in 1 pages for object "HCROPsCardRegisterHistory".
DBCC results for 'BTS_Vendor'.
There are 0 rows in 0 pages for object "BTS_Vendor".
DBCC results for 'HCROPsPettyCashRegisterHistory'.
There are 4 rows in 1 pages for object "HCROPsPettyCashRegisterHistory".
DBCC results for 'HCROPsUserProductInfo'.
There are 30 rows in 1 pages for object "HCROPsUserProductInfo".
DBCC results for 'HCROPsCardRegister'.
There are 20 rows in 1 pages for object "HCROPsCardRegister".
DBCC results for 'HCROPsBspDollarRegister'.
There are 7 rows in 1 pages for object "HCROPsBspDollarRegister".
DBCC results for 'HCROPsGeneratorFuelRegister'.
There are 4 rows in 1 pages for object "HCROPsGeneratorFuelRegister".
DBCC results for 'HCROPsPettyCashRegister'.
There are 4 rows in 1 pages for object "HCROPsPettyCashRegister".
DBCC results for 'HCROPsChequeBookRegister'.
There are 7 rows in 1 pages for object "HCROPsChequeBookRegister".
DBCC results for 'HCROPsArchiveKeyRegister'.
There are 14 rows in 1 pages for object "HCROPsArchiveKeyRegister".
DBCC results for 'HCROPsChequeBookRegisterHistory'.
There are 4 rows in 1 pages for object "HCROPsChequeBookRegisterHistory".
DBCC results for 'HCROPsUserInfo'.
There are 4 rows in 1 pages for object "HCROPsUserInfo".
DBCC results for 'HCROPsPayOrderStockRegister'.
There are 11 rows in 1 pages for object "HCROPsPayOrderStockRegister".
DBCC results for 'HCROPsPayOrderStockRegisterHistory'.
There are 6 rows in 1 pages for object "HCROPsPayOrderStockRegisterHistory".
DBCC results for 'FATCABankInfo'.
There are 1 rows in 1 pages for object "FATCABankInfo".
DBCC results for 'CIF_ReportMaster'.
There are 14 rows in 1 pages for object "CIF_ReportMaster".
DBCC results for 'HCROPsConfigurationCodes'.
There are 1154 rows in 8 pages for object "HCROPsConfigurationCodes".
DBCC results for 'HCROPsMaterialRequisiton'.
There are 8 rows in 1 pages for object "HCROPsMaterialRequisiton".
DBCC results for 'CIF_ReportConfiguration'.
There are 58 rows in 1 pages for object "CIF_ReportConfiguration".
DBCC results for 'FATCA_BAL_INFO'.
There are 1 rows in 1 pages for object "FATCA_BAL_INFO".
DBCC results for 'sys.queue_messages_1977058079'.
There are 0 rows in 0 pages for object "sys.queue_messages_1977058079".
DBCC results for 'FATCA_CURRENCY'.
There are 2 rows in 1 pages for object "FATCA_CURRENCY".
DBCC results for 'sys.queue_messages_2009058193'.
There are 0 rows in 0 pages for object "sys.queue_messages_2009058193".
DBCC results for 'sys.queue_messages_2041058307'.
There are 0 rows in 0 pages for object "sys.queue_messages_2041058307".
DBCC results for 'sys.filestream_tombstone_2073058421'.
There are 0 rows in 0 pages for object "sys.filestream_tombstone_2073058421".
DBCC results for 'OtherBankInfoAll'.
There are 539 rows in 26 pages for object "OtherBankInfoAll".
DBCC results for 'sys.syscommittab'.
There are 0 rows in 0 pages for object "sys.syscommittab".
CHECKDB found 0 allocation errors and 0 consistency errors in database 'Galaxy'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

MSDN
The command “DBCC CHECKDB(<db name>)” checks the logical and physical integrity of all the objects in the specified database. If corruption has occured for any reason, the DBCC CHECKDB command will find it, and tell you exactly where the problem is. DBCC CHECKDB has a few optional arguments to help fix your corrupt database. Depending on how bad it is, you may need to use the “REPAIR_ALLOW_DATA_LOSS”, which, as the name applies, will fix  your database, but some data might get lost. You should _always_ try to recover your database using a backup before using the “REPAIR_ALLOW_DATA_LOSS”argument. Other corruptions which can be fixed without data loss, could be inconsistency between the table and the indexes. Let’s say one of your nonclustered indexes for some reason miss a couple of rows – then a index rebuild will fix it. This argument is called REPAIR_REBUILD.

Comments

Popular posts from this blog

What is RDBMS?

In our crucial programming world, RDBMS is stand for Relational Database Management Systems is based on the Relational Model that maintain data records and index in tables. Generally, the term "Relations" are maintained in RDMS.  In a relational database,store the data into collection of tables, which might be related by common fields (database table columns). RDBMS also provide relational operators to manipulate the data stored into the database tables. Most RDBMS use SQL as database query language. There are several objects are included in RDBMS like ,Indexes,Synonyms,Tables,Views Clusters,Constraints,Database links,Database triggers. Most popular RDBMS  are Oracle, MS-SqlServer, MySql,DB2. etc.

What are the difference between DDL, DML , DCL and TCL commands?

Database Command Types DDL Data Definition Language  (DDL) statements are used to define the database structure or schema.  -           CREATE - to create objects in the database -           ALTER - alters the structure of the database -           DROP - delete objects from the database -           TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed -           COMMENT - add comments to the data dictionary -           RENAME - rename an object DML Data Manipulation Language  (DML) statements are used for managing data in database. DML commands are not auto-committed. It means changes made by DML command are not permanent to d...

Identify and Delete duplicate Records in SQL Server

      S cenario: I have accumulated data into SQL Server database from three different servers (oracle, O2 and oracle) for a financial reporting. After data accumulated , we found more duplicate rows; business requirement was to remove all duplicate rows because of final data will be import to another system. For this purpose, I want to write script to find out duplicate rows from my table. Finally, I want to delete only duplicate rows not original row. Original row means if i have total 2 rows those same or duplicate, so I want to delete only one row that is duplicate. Let’s go............................ Step 1: Create a student Table below Script: CREATE TABLE [Students] (     [ID] [int] NULL,     [Name] [varchar] ( 50 ) NULL,     [address] [varchar] ( 50 ) NULL,     [contact] [varchar] ( 50 ) NULL,     [email] [varchar] ( 50 ) NULL ...