Hi! Welcome to satish24k - It's Not Just Central Government Employeees News, but We Strive To Present You Whatever You Might Be Interested In.......................Chief Editor - kavitaSatish, Just a COMMON MAN with UNCOMMON DREAMS.......... LIFE IS NOT WHAT WE GET FROM BIRTH, IT IS WHAT WE MAKE OUT OF EVERY MOMENT WE LIVE; SO MAKE BEST OUT OF IT.......HAVE A GREAT LIFE

Friday, May 17, 2013

SQL Server Database Consistency Check Options


SQL Server Database Consistency Check Options
 
We can check SQL Server database integrity of all the objects in the specified database by using DBCC CHECKDB command. It helps to check database corruption. DBCC CHECKDB command offers many options to check sql server database integrity. Check this syntax which covers all DBCC CHECKDB command integrity check options:

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
DBCC CHECKDB 
    ( 'database_name' 
            [ , NOINDEX 
                | { REPAIR_ALLOW_DATA_LOSS 
                    | REPAIR_FAST 
                    | REPAIR_REBUILD 
                    } ] 
    )    [ WITH { [ ALL_ERRORMSGS ] 
                    [ , [ NO_INFOMSGS ] ] 
                    [ , [ TABLOCK ] ] 
                    [ , [ ESTIMATEONLY ] ] 
                    [ , [ PHYSICAL_ONLY ] ] 
                    } 
        ]
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,


 
'database_name'
Replace this argument with your database name for which you want to check object allocation and structural integrity. If you have not specified it, it takes current database as a default value. 
 
NOINDEX
This argument used to specify that non clustered indexes for non system tables should not be checked. It decreases the overall execution time because it does not check non clustered indexes for user-defined tables. 

For using following three repair options REPAIR_ALLOW_DATA_LOSS, REPAIR_FAST,  REPAIR_REBUILD, the given database_name must be in single-user mode.

REPAIR_ALLOW_DATA_LOSS: 
This argument used to correct allocation errors, structural row or page errors, and deletion of corrupted text objects. This repair option can result some data loss. The repair may be done under user transactions which allow the user to roll back all the changes made. If this repair are rolled back & the database still contain errors, should be restored from a backup. It can Perform all the repairs actions that done by REPAIR_REBUILD

REPAIR_FAST: 
This option can be done quickly & have no risk of data loss. It used to perform minor repair actions such as repairing extra keys in non clustered indexes. 

REPAIR_REBUILD: 
It can Performs all the repairs actions that done by REPAIR_FAST &  can be done without risk of data loss.

All arguments that are mentioned after “With” in the syntax used to display the error messages.

ALL_ERRORMSGS

It shows an unlimited number of errors per object. 

NO_INFOMSGS
It is used display the current database File Name, Database Name, Total Extend, Used Extent, Field ID and File Group.

TABLOCK
It is a cause to DBCC CHECKDB run faster on a database under heavy load, but it decreased the concurrency available on the database while DBCC CHECKDB is running.

ESTIMATE ONLY
It shows the estimated amount of tempdb space needed to run DBCC CHECKDB with all of the other specified options. 

PHYSICAL_ONLY
It is designed to check physical consistency of the database. It also detects disk errors, controller issues or other hardware-based problems.

Conclusion: You should regularly run consistency checks. If DBCC CHECKDB command indicates any Errors message in the database, it should be corrected immediately.

Courtesy : http://bnjho.blogspot.in
 
@This Article is Copyrighted
For latest updates 
Share and Care


Print Friendly and PDFPrintPrint Friendly and PDFPDF


For Further Reading,
LATEST POSTAL NEWS, TECHNOLOGY TIPS

0 comments:

By Blog Gadgets

Choose Your Subject

2013 WALLPAPERS 7th Pay Commission AADHAR ACCOUNTS AIPEU AIR INDIA AIRF AIRTRAVEL ALLOWANCES AMAGING AMAZING ANNA HAZARE ANOMALY ANTI CORRUPTION MOVEMENT AUTISM BABIES BANKING BIRDS WALLPAPERS BLOGGING BONUS BSNL BUDGET Cadre Restructure Calenders CANCER CASUAL LABOURS CAT CAT Orders CBSE CCL CCS CCS PENSION CCS(JT) Rules 1979 CGHS CHARTS CHILD CARE Child Care Allowance CHILDREN EDUCATION ALLOWANCE CHINA CIRCULARS Compassionate Appointment CONSUMER NEWS Conveyance Allowance Court Orders CPWD CREATIVITY CRICKET. SPORTS WALLPAPERS CSD CSS CVC Cycle Maintenance Allowance DA DA MERGER DEFENCE DEFENSE DIGITAL INDIA DIGITAL LIFE CERTIFICATE DISABLED DOPT DOWNLOAD DPE DRDO eCards ECHS EDUCATION eMO EMPLOYEES NEWS EMPLOYMENT NEWS ENTERTAINMENT EPFO ESTATES EX SERVICEMEN EXAMINATIONS FACEBOOK FAQs FDI FESTIVALS FIGHT FOR JUSTICE FINANCE BILL 2013 FINMIN FLOWERS FORMs FUNNY PICTURES g GADGETS Ganesha Wallpapers GDS GENERAL KNOWLEDGE GENERAL KNOWLEDGE - CURRENT AFFAIRS GOD WALLPAPERS GPF GREETINGS Group B HBA HEALTH HIGH DEFINITION WALLPAPER HOLIDAYS Hostel Subsidy Allowance HRA IAS IBA IDA INCOME TAX INCREMENT INDEPENDENCE DAY INDEX NUMBERS INDIA INSURANCE INVESTMENT IP/ASP IPO Exam ISLAM JOINING TIME KIDS KVS LATEST POSTAL NEWS Latest Releases from PIB LEAVE LOKAYUKTA LOVE LTC MACPS MAKE IN INDIA MEDICAL Meghdoot Millennium MHA MOBILE BANKING MOBILE WALLPAPERS MOF MOTHER MY CORNER NATURE WALLPAPERS NEGATIVE LIST NEWS NPS One Rank One Pension ORDERS ORDINANCE PARLIAMENT NEWS PENSION People you must know PERSMIN PERSONALITY DEVELOPMENT PERSONOLITY DEVELOPMENT PFRDA POLITICS POSTAL TECHNOLOGY Postings PPF Promotions QUESTION PAPERS QUOTES RAILWAY NEWS RAJYASABHA NEWS RBI RECRUITMENT REIMBURSEMENT RELIGION REPUBLIC DAY RESERVATION RESULTS Retirement Age RTI SANATANA DHARMA Sanchaya Post SAPOST SBCO SC SCIENCE SCOVA SECULAR SEXUAL HARASSMENT SKIN CARE SLEEP SMS SMS-GOODNIGHT SPEEDNET ST Study Material TATKAL TEACHERS TECHNOLOGY TECHNOLOGY TIPS TERRORISM TRANSFER TRAVEL Travelling Allowance Troubleshooting Problems in Postal Applications UNION NEWS UPSC VIDEOS Virus Wallpapers Washing Allowance WILD PHOTOGRAPHY WOMAN ಕನ್ನಡಿಗ

Popular Posts of the Month

All Time Popular Posts

 
Blogger Wordpress Gadgets