-
-
Notifications
You must be signed in to change notification settings - Fork 854
Open
Labels
confirmedLabel to be used by maintainers that confirm a bug does exist for the given issueLabel to be used by maintainers that confirm a bug does exist for the given issuefeature
Description
Summary of new feature
- Support add/removing/updating of data classification for a table column
Proposed technical details (if applicable)
- Classification Information types and Sensitivity are stored as extended properties on tables
- The values are GUID's, I've found a mapping table here GUID Mapping
- Below is the SQL code that was added when adding a Classification to TABLE1 and Column 'EXPIRATION_TS'. the classfication was Information type: [NA] and Sensitivity: General
EXEC sys.sp_addextendedproperty
@name = N'sys_information_type_id',
@value = N'',
@level0type = N'SCHEMA',
@level0name = N'dbo',
@level1type = N'TABLE',
@level1name = N'TABLE1',
@level2type = N'COLUMN',
@level2name = N'EXPIRATION_TS';
GO
EXEC sys.sp_addextendedproperty
@name = N'sys_information_type_name',
@value = N'',
@level0type = N'SCHEMA',
@level0name = N'dbo',
@level1type = N'TABLE',
@level1name = N'TABLE1',
@level2type = N'COLUMN',
@level2name = N'EXPIRATION_TS';
GO
EXEC sys.sp_addextendedproperty
@name = N'sys_sensitivity_label_id',
@value = N'684a0db2-d514-49d8-8c0c-df84a7b083eb',
@level0type = N'SCHEMA',
@level0name = N'dbo',
@level1type = N'TABLE',
@level1name = N'TABLE1',
@level2type = N'COLUMN',
@level2name = N'EXPIRATION_TS';
GO
EXEC sys.sp_addextendedproperty
@name = N'sys_sensitivity_label_name',
@value = N'General',
@level0type = N'SCHEMA',
@level0name = N'dbo',
@level1type = N'TABLE',
@level1name = N'TABLE1',
@level2type = N'COLUMN',
@level2name = N'EXPIRATION_TS';
GOHere is the same but with the Information Type set to Other
EXEC sys.sp_addextendedproperty
@name = N'sys_information_type_id',
@value = N'9C5B4809-0CCC-0637-6547-91A6F8BB609D',
@level0type = N'SCHEMA',
@level0name = N'dbo',
@level1type = N'TABLE',
@level1name = N'Table1',
@level2type = N'COLUMN',
@level2name = N'EXPIRATION_TS';
GO
EXEC sys.sp_addextendedproperty
@name = N'sys_information_type_name',
@value = N'Other',
@level0type = N'SCHEMA',
@level0name = N'dbo',
@level1type = N'TABLE',
@level1name = N'Table1',
@level2type = N'COLUMN',
@level2name = N'EXPIRATION_TS';
GO
EXEC sys.sp_addextendedproperty
@name = N'sys_sensitivity_label_id',
@value = N'684a0db2-d514-49d8-8c0c-df84a7b083eb',
@level0type = N'SCHEMA',
@level0name = N'dbo',
@level1type = N'TABLE',
@level1name = N'Table1',
@level2type = N'COLUMN',
@level2name = N'EXPIRATION_TS';
GO
EXEC sys.sp_addextendedproperty
@name = N'sys_sensitivity_label_name',
@value = N'General',
@level0type = N'SCHEMA',
@level0name = N'dbo',
@level1type = N'TABLE',
@level1name = N'Table1',
@level2type = N'COLUMN',
@level2name = N'EXPIRATION_TS';
GOLatest version of dbatools as of writing
- dbatools 1.0.83
Metadata
Metadata
Assignees
Labels
confirmedLabel to be used by maintainers that confirm a bug does exist for the given issueLabel to be used by maintainers that confirm a bug does exist for the given issuefeature