다음을 통해 공유


Package.ProtectionLevel 속성

정의

패키지에 대한 보호 수준을 가져옵니다.

public:
 property Microsoft::SqlServer::Dts::Runtime::DTSProtectionLevel ProtectionLevel { Microsoft::SqlServer::Dts::Runtime::DTSProtectionLevel get(); void set(Microsoft::SqlServer::Dts::Runtime::DTSProtectionLevel value); };
[Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyCategory(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "PropertyCategorySecurity")]
[Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "PackageProtectionLevelDesc")]
public Microsoft.SqlServer.Dts.Runtime.DTSProtectionLevel ProtectionLevel { get; set; }
[<Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyCategory(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "PropertyCategorySecurity")>]
[<Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "PackageProtectionLevelDesc")>]
member this.ProtectionLevel : Microsoft.SqlServer.Dts.Runtime.DTSProtectionLevel with get, set
Public Property ProtectionLevel As DTSProtectionLevel

속성 값

DTSProtectionLevel

DTSProtectionLevel 열거형의 값입니다.

특성

예제

다음 예제에서는 패키지를 로드한 다음 패키지에 할당된 속성을 포함하여 ProtectionLevel 여러 패키지 속성을 검색합니다.

Class PackageTest  
    {  
        static void Main(string[] args)  
        {  
            // The variable pkg points to the location of the  
            // ExecuteProcess package sample  
            // installed with the samples.  
            string pkg = @"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";  

            Application app = new Application();  
            Package p = app.LoadPackage(pkg, null);  

            // Once the package is loaded, this sample can  
           // query on several properties  
            long cc = p.CertificateContext;  
            string cfn = p.CheckpointFileName;  
            DTSProtectionLevel pl = p.ProtectionLevel;  
            DTSPackageType dpt = p.PackageType;  

            Console.WriteLine("CertificateContext = " + cc);  
            Console.WriteLine("CheckpointFileName = " + cfn);  
            Console.WriteLine("ProtectionLevel = " + pl);  
            Console.WriteLine("PackageType = " + dpt);  
        }  
    }  
Class PackageTest  
    {  
        Shared  Sub Main(ByVal args() As String)  
            ' The variable pkg points to the location of the  
            ' ExecuteProcess package sample  
            ' installed with the samples.  
            Dim pkg As String =  "C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx"   

            Dim app As Application =  New Application()   
            Dim p As Package =  app.LoadPackage(pkg,Nothing)   

            ' Once the package is loaded, this sample can  
           ' query on several properties  
            Dim cc As Long =  p.CertificateContext   
            Dim cfn As String =  p.CheckpointFileName   
            Dim pl As DTSProtectionLevel =  p.ProtectionLevel   
            Dim dpt As DTSPackageType =  p.PackageType   

            Console.WriteLine("CertificateContext = " + cc)  
            Console.WriteLine("CheckpointFileName = " + cfn)  
            Console.WriteLine("ProtectionLevel = " + pl)  
            Console.WriteLine("PackageType = " + dpt)  
        End Sub  
    }  

샘플 출력:

CertificateContext = 0

CheckpointFileName =

ProtectionLevel = EncryptSensitiveWithUserKey

PackageType = Default

설명

패키지 보호 수준을 설정하는 방법에 대한 자세한 내용은 패키지의 중요한 데이터에 대한 Access Control 참조하세요.

적용 대상