17.07.2015 Views

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2 – Data Classification and Rolesaforementioned catalog view INFORMATION_SCHEMA.COLUMNS catalogview, to assign this sensitivity class to all columns in our database, as shown inListing 2-9.USE HomeLending;GOSELECT'exec sp_addextendedproperty ' +'@name=''Sensitivity_Class'',' +'@value=''Medium'',' +'@level0type=''SCHEMA'',' +'@level0name=''' + TABLE_SCHEMA + ''',' +'@level1type=''TABLE'',' +'@level1name=''' + TABLE_NAME + ''',' +'@level2type=''COLUMN'',' +'@level2name=''' + COLUMN_NAME + ''';'FROMINFORMATION_SCHEMA.COLUMNS;Listing 2-9: Assigning the medium sensitivity data classification to all columns.This query will produce a complete sp_addextendedproperty statementfor each column in the database. We can then copy the results into anotherquery window and execute it to create and assign the default value to allcolumns.If a particular column needs to be assigned a higher or lower sensitivity class,then we can manually update the Sensitivity_Class extended property ona case-by-case basis, using either the Object Explorer in SQL ServerManagement Studio or another system stored procedure, calledsp_updateextendedproperty. The arguments of this system storedprocedure are identical to the sp_addextendedpropery system storedprocedure.In our HomeLending database, we have a table namedBorrower_Identification, which contains the various data thatidentifies an individual. The Identification_Value column of this tablecontains the values of social security numbers, driver's license numbers,passport numbers and unique tax payer reference numbers. Based upon oursensitivity class definitions, the column named Identification_Valueshould be elevated to the "High" sensitivity class. The script shown in Listing2-10 uses the sp_updateextendedproperty system stored procedure tochange the value of this extended property from "Medium" to "High":55

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!