DtsContainer.IsolationLevel Propiedad

Definición

Obtiene o establece el nivel de aislamiento de la transacción en el objeto DtsContainer.

public:
 property System::Data::IsolationLevel IsolationLevel { System::Data::IsolationLevel get(); void set(System::Data::IsolationLevel value); };
[Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyCategory(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "PropertyCategoryTransactions")]
[Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "IsolationLevelDesc")]
public System.Data.IsolationLevel IsolationLevel { get; set; }
[<Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyCategory(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "PropertyCategoryTransactions")>]
[<Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "IsolationLevelDesc")>]
member this.IsolationLevel : System.Data.IsolationLevel with get, set
Public Property IsolationLevel As IsolationLevel

Valor de propiedad

Un valor entero que corresponde al nivel de aislamiento.

Atributos

Ejemplos

En el ejemplo de código siguiente se crea un Package, que es una clase que hereda de DtsContainer. Package muestra el uso de varias propiedades heredadas.

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  

namespace Microsoft.SqlServer.SSIS.Samples  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            Application app = new Application();  
            Package pkg = new Package();  

            // Package name must be assigned.  
            pkg.Name = "My DtsContainer inheritance test package";  

            // Display the values that manually assigned.  
            Console.WriteLine("Package Name: {0}", pkg.Name);  

            // Packages are assigned the following default values when created.  
            Console.WriteLine("Package ID:           {0}", pkg.ID);  
            Console.WriteLine("FailPackageOnFailure: {0}", pkg.FailPackageOnFailure);  
            Console.WriteLine("FailParentOnFailure:  {0}", pkg.FailParentOnFailure);  
            Console.WriteLine("Locale ID:            {0}", pkg.LocaleID);  
            Console.WriteLine("Is DefaultLocaleID?   {0}", pkg.IsDefaultLocaleID);  
            Console.WriteLine("Isolation Level:      {0}", pkg.IsolationLevel);  
            Console.WriteLine("LoggingMode:          {0}", pkg.LoggingMode);  
            Console.WriteLine("MaximumErrorCount:    {0}", pkg.MaximumErrorCount);  
            Console.WriteLine("TransactionOption:    {0}", pkg.TransactionOption);  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace Microsoft.SqlServer.SSIS.Samples  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            Dim app As Application =  New Application()   
            Dim pkg As Package =  New Package()   

            ' Package name must be assigned.  
            pkg.Name = "My DtsContainer inheritance test package"  

            ' Display the values that manually assigned.  
            Console.WriteLine("Package Name: {0}", pkg.Name)  

            ' Packages are assigned the following default values when created.  
            Console.WriteLine("Package ID:           {0}", pkg.ID)  
            Console.WriteLine("FailPackageOnFailure: {0}", pkg.FailPackageOnFailure)  
            Console.WriteLine("FailParentOnFailure:  {0}", pkg.FailParentOnFailure)  
            Console.WriteLine("Locale ID:            {0}", pkg.LocaleID)  
            Console.WriteLine("Is DefaultLocaleID?   {0}", pkg.IsDefaultLocaleID)  
            Console.WriteLine("Isolation Level:      {0}", pkg.IsolationLevel)  
            Console.WriteLine("LoggingMode:          {0}", pkg.LoggingMode)  
            Console.WriteLine("MaximumErrorCount:    {0}", pkg.MaximumErrorCount)  
            Console.WriteLine("TransactionOption:    {0}", pkg.TransactionOption)  
        End Sub  
    End Class  
End Namespace  

Salida del ejemplo:

Nombre del paquete: Mi paquete de prueba de herencia dtsContainer

Id. de paquete: {2C2FAA96-35BA-4C5E-A39A-C5D7D30A0D79}

FailPackageOnFailure: False

FailParentOnFailure: False

Identificador de configuración regional: 1033

¿DefaultLocaleID? Falso

Nivel de aislamiento: serializable

LoggingMode: UseParentSetting

MaximumErrorCount: 1

TransactionOption: compatible

Comentarios

El valor predeterminado de esta propiedad es -1 o No especificado. Para obtener más información sobre los valores disponibles, vea las enumeraciones IsolationLevel que se usan en el espacio de nombres System.Data, en ADO y en OLE DB.

En la tabla siguiente se enumeran los valores disponibles para la IsolationLevel propiedad .

Valor Nivel de aislamiento
-1 Sin especificar
16 Chaos
256 ReadUncommitted
4096 ReadCommitted
65536 RepeatableRead
1 048 576 Serializable

Se aplica a