Set-SqlSensitivityClassification
데이터베이스에 있는 열의 정보 유형 및/또는 민감도 레이블 및 정보 유형을 설정합니다.
Syntax
Set-SqlSensitivityClassification
-ColumnName <String[]>
[-SuppressProviderContextWarning]
[-SensitivityRank <SensitivityRank>]
[-InformationType <String>]
[-SensitivityLabel <String>]
[<CommonParameters>]
Set-SqlSensitivityClassification
-ColumnName <String[]>
-ConnectionString <String>
[-SensitivityRank <SensitivityRank>]
[-InformationType <String>]
[-SensitivityLabel <String>]
[<CommonParameters>]
Set-SqlSensitivityClassification
-ColumnName <String[]>
-ServerInstance <PSObject>
-DatabaseName <String>
[-Credential <PSCredential>]
[-SensitivityRank <SensitivityRank>]
[-InformationType <String>]
[-SensitivityLabel <String>]
[<CommonParameters>]
Set-SqlSensitivityClassification
-ColumnName <String[]>
-Path <String>
[-SensitivityRank <SensitivityRank>]
[-InformationType <String>]
[-SensitivityLabel <String>]
[<CommonParameters>]
Set-SqlSensitivityClassification
-ColumnName <String[]>
-InputObject <Database>
[-SensitivityRank <SensitivityRank>]
[-InformationType <String>]
[-SensitivityLabel <String>]
[<CommonParameters>]
Description
Set-SqlSensitivityClassification cmdlet은 데이터베이스에 있는 열의 정보 유형 및/또는 민감도 레이블을 설정합니다.
SSMS(SQL Server Management Studio) 릴리스 17.5 이상을 사용하여 열의 정보 유형 및 민감도 레이블 및 정보 유형도 설정할 수 있습니다.
SSMS(SQL Server Management Studio) 릴리스 17.5 이상, 확장 속성 카탈로그 뷰 또는 Get-SqlSensitivityClassification cmdlet을 사용하여 열의 정보 유형 및 민감도 레이블 및 정보 유형을 볼 수 있습니다.
Module requirements: version 21+ on PowerShell 5.1; version 22+ on PowerShell 7.x.
예제
예제 1: Windows 인증 사용하여 단일 열에 정보 유형 및 민감도 레이블 설정
PS C:\> Set-SqlSensitivityClassification -ServerInstance "MyComputer\MainInstance" -Database "myDatabase" -ColumnName "Sales.Customers.first_name" -InformationType "Name" -SensitivityLabel "Confidential - GDPR" -SensitivityRank "Low"
Column InformationType SensitivityLabel SensitivityRank
------ --------------- ---------------- ---------------
Sales.Customers.first_name Name Confidential - GDPR Low
열 Sales.Customers.first_name
의 정보 유형 및 민감도 레이블을 각각 설정 Name
하십시오 Confidential - GDPR
. 정보 유형 및 민감도 레이블의 값은 아래에 제공된 기본값으로 제한되며 Tab 키를 사용하여 가져올 수 있습니다.
예제 2: Windows 인증 사용하여 단일 열의 정보 형식 설정
PS C:\> Set-SqlSensitivityClassification -ServerInstance "MyComputer\MainInstance" -Database "myDatabase" -ColumnName "Sales.Customers.first_name" -InformationType "Personal"
Column InformationType SensitivityLabel SensitivityRank
------ --------------- ---------------- ---------------
Sales.Customers.first_name Personal
열 Sales.Customers.first_name
의 정보 유형을 .로 Personal
설정합니다. 민감도 레이블은 이전에 설정된 경우 설정되지 않습니다.
예제 3: 연결 매개 변수를 사용하여 단일 열의 민감도 레이블 설정
PS C:\> Set-SqlSensitivityClassification -ServerInstance "MyComputer\MainInstance" -Database "myDatabase" -Credential (Get-Credential "sa") -ColumnName "Sales.Customers.ip_address" -SensitivityLabel "Confidential"
Column InformationType SensitivityLabel SensitivityRank
------ --------------- ---------------- ---------------
Sales.Customers.ip_address Confidential
SQL Server 로그인을 Confidential
사용하도록 열 Sales.Customers.ip_address
의 민감도 레이블을 설정합니다. 이 열의 정보 형식은 설정되지 않은 상태로 유지됩니다. 이 명령은 인증을 완료하기 위한 암호를 묻는 메시지를 표시합니다.
예제 4: 현재 경로 컨텍스트를 사용하여 여러 열의 정보 유형 및 분류 레이블 설정
PS C:\> $columns = @("Sales.Customers.first_name" , "Sales.Customers.last_name")
PS C:\> Set-Location "SQLSERVER:\SQL\MyComputer\MainInstance\Databases\MyDatabase"
PS SQLSERVER:\SQL\MyComputer\MainInstance> Set-SqlSensitivityClassification -ColumnName $columns -InformationType "Name" -SensitivityLabel "Confidential - GDPR" -SensitivityRank "Critical"
WARNING: Using provider context. Server = MyComputer, Database = MyDatabase.
Column InformationType SensitivityLabel SensitivityRank
------ --------------- ---------------- ---------------
Sales.Customers.first_name Name Confidential - GDPR Critical
Sales.Customers.last_name Name Confidential - GDPR Critical
열의 정보 유형 및 민감도 레이블을 설정하고 열 Sales.Customers.first_name
Sales.Customers.last_name
이름의 배열을 cmdlet에 인수로 제공하여 설정합니다. 모든 열은 동일한 정보 유형 및 민감도 레이블을 받습니다. 데이터베이스 연결 정보는 .에서 만든 Set-Location
컨텍스트에서 가져옵니다.
매개 변수
-ColumnName
정보 유형 및 민감도 레이블이 설정된 열의 이름입니다.
Type: | String[] |
Aliases: | Column |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ConnectionString
데이터베이스에 연결할 연결 문자열을 지정합니다. 이 매개 변수가 있으면 다른 연결 매개 변수는 무시됩니다.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Credential
데이터베이스에 연결하는 데 사용되는 자격 증명을 지정합니다.
Type: | PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DatabaseName
데이터베이스의 이름을 지정합니다. 이 cmdlet은 ServerInstance 매개 변수에 지정된 인스턴스에서 이 데이터베이스에 연결합니다.
DatabaseName 매개 변수를 지정하지 않으면 현재 경로가 SQLSERVER:\SQL 폴더와 데이터베이스 이름을 모두 지정하는지 여부에 따라 사용되는 데이터베이스가 달라집니다. 경로가 SQL 폴더와 데이터베이스 이름을 모두 지정하는 경우 이 cmdlet은 경로에 지정된 데이터베이스에 연결합니다.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InformationType
열에 저장된 정보 유형을 설명하는 이름입니다. SensitivityLabel, InformationType 또는 둘 다에 대한 값을 제공해야 합니다. 가능한 값은 제한되며 확장할 수 없습니다.
Type: | String |
Accepted values: | Networking, Contact Info, Credentials, Credit Card, Banking, Financial, Other, Name, National ID, SSN, Health, Date Of Birth |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-InputObject
이 cmdlet에서 사용하는 데이터베이스를 나타내는 SQL Server 관리 개체(SMO)를 지정합니다.
Type: | Database |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Path
이 cmdlet이 작업을 실행하는 SQL Server 인스턴스의 경로를 지정합니다. 이 매개 변수의 값을 지정하지 않으면 cmdlet은 현재 작업 위치를 사용합니다.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SensitivityLabel
열에 저장된 데이터의 민감도를 설명하는 이름입니다. SensitivityLabel, InformationType 또는 둘 다에 대한 값을 제공해야 합니다. 가능한 값은 제한되며 확장할 수 없습니다.
Type: | String |
Accepted values: | Public, General, Confidential, Confidential - GDPR, Highly Confidential, Highly Confidential - GDPR |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SensitivityRank
민감도 순위를 정의하는 미리 정의된 값 집합을 기반으로 하는 식별자입니다. Advanced Threat Protection과 같은 다른 서비스에서 해당 순위에 따라 변칙을 검색하는 데 사용할 수 있습니다.
Type: | SensitivityRank |
Accepted values: | None, Low, Medium, High, Critical |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServerInstance
데이터베이스 엔진 인스턴스의 이름을 지정하는 서버 인스턴스(문자열) 또는 SQL Server 관리 개체(SMO) 개체의 이름을 지정합니다. 기본 인스턴스의 경우 컴퓨터 이름인 MyComputer만 지정합니다. 명명된 인스턴스의 경우 ComputerName\InstanceName 형식을 사용합니다.
Type: | PSObject |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SuppressProviderContextWarning
이 cmdlet은 cmdlet에 대한 데이터베이스 컨텍스트를 설정하기 위해 현재 SQLSERVER:\SQL 경로 설정의 데이터베이스 컨텍스트에서 이 cmdlet이 사용되었다는 경고를 표시하지 않습니다.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
입력
System.String[]
Microsoft.SqlServer.Management.Smo.Database
System.String
출력
System.Object