none
SSMA 5.2 - Rollback Transaction SSMA$ROLLBACK_TRIGGER$SP

    Întrebare

  • Hi All,

    I am using the latest version of SSMA 5.2 support the Sybase ROLLBACK TRIGGER. It converts the "ROLLBACK TRIGGER" to "ROLLBACK TRANSACTION SSMA$ROLLBACK_TRIGGER$SP".  Where can we find the source for the SSMA$ROLLBACK_TRIGGER$SP. Please let me where this resides. 

    Thanks, Vijay

    8 februarie 2012 18:07

Răspunsuri

  • Hi,

      Rollback transaction is used to simulate rollback trigger in Sybase.  SSMA$ROLLBACK_TRIGGER$SP is the savepoint prior to the statement triggering the trigger.  This savepoint is needed to rollback the transaction relating to the statement in context.  As part of migration planning, it is important for the app/db developers to understand the purpose and context of the rollback triggers applied in their app.  The reason is that you may need to redesign the app to better leverage SQL Server's functionalities.  In the case of Sybase's rollback trigger, SSMA will convert it to SQL Server's rollback transaction.  With transactions, savepoints are needed in order to rollback the proper context.  If you have need to execute a statement that would invoke the trigger created by SSMA after rollback trigger conversion, you will need to create a savepoint called SSMA$ROLLBACK_TRIGGER$SP.  For example, as the result of rollback trigger conversion, the Insert Trigger for myTable has a rollback transaction.  To execute an insert statement on myTable with SSMS, you will need to first create the savepoint SSMA$ROLLBACK_TRIGGER$SP

    Begin transaction

    Save transaction SSMA$ROLLBACK_TRIGGER$SP

    Insert into myTable (mycol) values (1)

    Commit transaction

    • Propus ca răspuns de Peja Tao 10 februarie 2012 03:17
    • Marcat ca răspuns de Peja Tao 15 februarie 2012 07:23
    • Anulare marcare ca răspuns de Vijayaraghavk 7 martie 2012 19:16
    • Marcat ca răspuns de Vijayaraghavk 7 martie 2012 19:17
    9 februarie 2012 15:36
    Moderator

Toate mesajele

  • Hi,

      Rollback transaction is used to simulate rollback trigger in Sybase.  SSMA$ROLLBACK_TRIGGER$SP is the savepoint prior to the statement triggering the trigger.  This savepoint is needed to rollback the transaction relating to the statement in context.  As part of migration planning, it is important for the app/db developers to understand the purpose and context of the rollback triggers applied in their app.  The reason is that you may need to redesign the app to better leverage SQL Server's functionalities.  In the case of Sybase's rollback trigger, SSMA will convert it to SQL Server's rollback transaction.  With transactions, savepoints are needed in order to rollback the proper context.  If you have need to execute a statement that would invoke the trigger created by SSMA after rollback trigger conversion, you will need to create a savepoint called SSMA$ROLLBACK_TRIGGER$SP.  For example, as the result of rollback trigger conversion, the Insert Trigger for myTable has a rollback transaction.  To execute an insert statement on myTable with SSMS, you will need to first create the savepoint SSMA$ROLLBACK_TRIGGER$SP

    Begin transaction

    Save transaction SSMA$ROLLBACK_TRIGGER$SP

    Insert into myTable (mycol) values (1)

    Commit transaction

    • Propus ca răspuns de Peja Tao 10 februarie 2012 03:17
    • Marcat ca răspuns de Peja Tao 15 februarie 2012 07:23
    • Anulare marcare ca răspuns de Vijayaraghavk 7 martie 2012 19:16
    • Marcat ca răspuns de Vijayaraghavk 7 martie 2012 19:17
    9 februarie 2012 15:36
    Moderator
  • Thanks for the reply, But I never see any Save Transaction command created by the SSMA in the new code. 
    7 martie 2012 19:16