zoukankan      html  css  js  c++  java
  • [转]Configure a Package to Use Transactions SSIS

    本文转自:http://msdn.microsoft.com/en-us/library/ms141144.aspx

    When you configure a package to use transactions, you have two options:

    • Have a single transaction for the package. In this case, it is the package itself that initiates this transaction, whereas individual tasks and containers in the package participate in this single transaction.

    • Have multiple transactions in the package. In this case, the package supports transactions, but individual tasks and containers in the package actually initiate the transactions.

    The following procedures describe how to configure both options.

    In this option, the package itself initiates a single transaction. You configure the package to initiate this transaction by setting the TransactionOption property of the package to Required.

    Next, you enlist specific tasks and containers in this single transaction. To enlist a task or container in a transaction, you set the TransactionOption property of that task or container to Supported.

    To configure a package to use a single transaction

    1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want to configure to use a transaction.

    2. In Solution Explorer, double-click the package to open it.

    3. Click the Control Flow tab.

    4. Right-click anywhere in the background of the control flow design surface, and then click Properties.

    5. In the Properties window, set the TransactionOption property to Required.

    6. On the design surface of the Control Flow tab, right-click the task or the container that you want to enroll in the transaction, and then click Properties.

    7. In the Properties window, set the TransactionOption property to Supported.

      Note Note

      To enlist a connection in a transaction, enroll the tasks that use the connection in the transaction. For more information, see Integration Services (SSIS) Connections.

    8. Repeat steps 6 and 7 for each task and container that you want to enroll in the transaction.

    In this option, the package itself supports transactions but does not start a transaction. You configure the package to support transactions by setting the TransactionOption property of the package to Supported.

    Next, you configure the desired tasks and containers inside the package to initiate or participate in transactions. To configure a task or container to initiate a transaction, you set the TransactionOption property of that task or container to Required.

    To configure a package to use multiple transactions

    1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want to configure to use transaction.s

    2. In Solution Explorer, double-click the package to open it.

    3. Click the Control Flow tab.

    4. Right-click anywhere in the background of the control flow design surface, and then click Properties.

    5. In the Properties window, set the TransactionOption property to Supported.

      Note Note

      The package supports transactions, but the transactions are started by task or containers in the package.

    6. On the design surface of the Control Flow tab, right-click the task or the container in the package for which you want to start a transaction, and then click Properties.

    7. In the Properties window, set the TransactionOption property to Required.

    8. If a transaction is started by a container, right-click the task or the container that you want to enroll in the transaction, and then click Properties.

    9. In the Properties window, set the TransactionOption property to Supported.

      Note Note

      To enlist a connection in a transaction, enroll the tasks that use the connection in the transaction. For more information, see Integration Services (SSIS) Connections.

    10. Repeat steps 6 through 9 for each task and container that starts a transaction.

  • 相关阅读:
    error: declaration of 'cv::Mat R ' shadows a parameter
    Java网络编程(二)
    排序算法(二)
    Java网络编程(一)
    排序算法(一)
    Python文件访问模式
    Python文件与异常
    递归
    SQL命令的六个主要类别
    iOS-生成Bundle包-引入bundle-使用bundle
  • 原文地址:https://www.cnblogs.com/freeliver54/p/3699378.html
Copyright © 2011-2022 走看看