none
SSMA 5.2 - Rollback Transaction SSMA$ROLLBACK_TRIGGER$SP

    Question

  • 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

    mercredi 8 février 2012 18:07

Réponses

  • 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

    • Proposé comme réponse Peja Tao vendredi 10 février 2012 03:17
    • Marqué comme réponse Peja Tao mercredi 15 février 2012 07:23
    • Non marqué comme réponse Vijayaraghavk mercredi 7 mars 2012 19:16
    • Marqué comme réponse Vijayaraghavk mercredi 7 mars 2012 19:17
    jeudi 9 février 2012 15:36
    Modérateur

Toutes les réponses

  • 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

    • Proposé comme réponse Peja Tao vendredi 10 février 2012 03:17
    • Marqué comme réponse Peja Tao mercredi 15 février 2012 07:23
    • Non marqué comme réponse Vijayaraghavk mercredi 7 mars 2012 19:16
    • Marqué comme réponse Vijayaraghavk mercredi 7 mars 2012 19:17
    jeudi 9 février 2012 15:36
    Modérateur
  • Thanks for the reply, But I never see any Save Transaction command created by the SSMA in the new code. 
    mercredi 7 mars 2012 19:16