DBCC CHECKDB with Data Purity

Introduction (DBCC CHECKDB Command):

In this article, I am going to tell you how you can check the database issues or value issues in your database using the DBCC CHECKDB WITH DATA_PURITY and then I will show you how to repair your SQL Server Database with other alternatives.

DBCC CHECKDB could be a command that checks the logical and physical integrity of all the objects within the mere info and maybe run on daily basis.

Explanation

In this section, we learned that what actually the DBCC CHECKDB command is. Now let’s jump into detail that contains what is data purity? Why it is used? And how you can use this option with the above command.

What is Data purity?

Data purity issues occur when the value which is stored in a column is out of range for the data type.

What is the use of it?

Sometimes due to massive information database columns values are out of range and we are not aware of this and think kinds of errors make the cause of crashing of the whole database and make it slower. This effect can slow down whole Software including its loading and response time.

Working of Data purity with DBCC CHECKDB…!

By Adding the DATA_PURITY choice causes the CHECKDB command to appear for column values that area unit invalid or out of varying. Any information that was created in SQL Server Studio can embrace the DATA_PURITY check by default. However, if the information is being upgraded from earlier versions, you need to run the command with the DATA_PURITY choice and then the command will fix any information problems.

Therefore, to verify that the database has the DATA_PURITY choice enabled, you have to verify if the flag is enabled.

How to run DBCC CHECKDB command with Data Purity!

The syntax to check the data purity is the following:

DBCC CHECKDB (database name) WITH DATA_PURITY

For example,

DBCC CHECKDB SALESDB WITH DATA_PURITY

When this command is activated, it’ll ensure if there is a unit any information problems within the mere info.

Once that the issues/errors are fixed, then the DBCC CHECKDB column can check the column worth integrity by default as known as you don’t have to specify the DATA_PURITY any longer.

Note: if this method is not working and your database is corrupt, you can use another software to repair your database.

Use SQL Database Repair Software

Before getting started you need to download the software Stellar Repair for MS SQL here:

When you successfully download and install the Stellar Repair for MS SQL. You can see a button on the top bar called select database.

This will load a screen to browse for the database as shown below.

Step 1: Click on the desktop icon and run the software. After successful launching stop all the services of the MS SQL Server if you ran in another software. The software you will see a window look like below window.

Stellar Repair for MS SQL

Step 2: After shutting down the MS SQL Server or taking the database offline, you can click on the “Select Database” icon. The software opens a new window box and provide you the facility to select the corrupt database files. If you select a full database then you can select the file from the right side in the tree structure of the database and its objects.

Step 3: After selecting the file click on the “Repair” button. It will take some seconds or minutes. When it will complete all the operations. A new dialog window is an open and looks like this:

Step 4: When all the objects are repaired you will see a list of the tree structures where you can select the table or the database object that you want to repair or recover. See the below image:

Multiple Save Options

In addition, this tool is programmed to provide many safe options that automatically increase the usability of the software. You can save the repaired SQL Server database files in the desired location in CSV, Excel and HTML formats. In this way, this skilled software can be very useful for you, because these different formats do not require the SQL server 2012 to be installed on the system to open the file. If you select the .mdf file extension for save new recover of repaired file it will save as a new database.  See the image below:

Conclusion:

In this article we Studied what is Data purity and how to use the DBCC CHECKDB command with data purity and also, we studied if CHECKDB has problems with a corrupt database, you can use Stellar Repair for MS SQL Server to repair your database. Basically, we study how we can use the Stellar Repair for repair and recover our databases and the object of the databases. We learn how we can operate this software and get a useful results

Leave a Reply

Your email address will not be published. Required fields are marked *