Guest User

Untitled

a guest
Nov 21st, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. -- 1º Crie a tabela que ficará registrada as transações
  2. CREATE TABLE LOG_Transaction (
  3. base nvarchar(100)
  4. ,currentime datetime
  5. ,trans nvarchar(100)
  6. ,object_type nvarchar(20)
  7. ,transaction_type nchar(1)
  8. ,num_of_cols_in_key int
  9. ,list_of_key_cols_tab_del nvarchar(255)
  10. ,list_of_cols_val_tab_del nvarchar(255)
  11. ,error int
  12. ,error_mes nvarchar (200) );
  13.  
  14. -- Coloque esse insert dentro da transaction - Antes da linha :
  15. -- -- Select the return values
  16. -- -- select @error, @error_message
  17. INSERT INTO LOG_Transaction
  18. VALUES (DB_NAME()
  19. ,GETDATE()
  20. ,'TransactionNotification' -- ou PostNotification
  21. ,@object_type
  22. ,@transaction_type
  23. ,@num_of_cols_in_key
  24. ,@list_of_key_cols_tab_del
  25. ,@list_of_cols_val_tab_del
  26. ,@error
  27. ,@error_message)
Add Comment
Please, Sign In to add comment