Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 1º Crie a tabela que ficará registrada as transações
- CREATE TABLE LOG_Transaction (
- base nvarchar(100)
- ,currentime datetime
- ,trans nvarchar(100)
- ,object_type nvarchar(20)
- ,transaction_type nchar(1)
- ,num_of_cols_in_key int
- ,list_of_key_cols_tab_del nvarchar(255)
- ,list_of_cols_val_tab_del nvarchar(255)
- ,error int
- ,error_mes nvarchar (200) );
- -- Coloque esse insert dentro da transaction - Antes da linha :
- -- -- Select the return values
- -- -- select @error, @error_message
- INSERT INTO LOG_Transaction
- VALUES (DB_NAME()
- ,GETDATE()
- ,'TransactionNotification' -- ou PostNotification
- ,@object_type
- ,@transaction_type
- ,@num_of_cols_in_key
- ,@list_of_key_cols_tab_del
- ,@list_of_cols_val_tab_del
- ,@error
- ,@error_message)
Add Comment
Please, Sign In to add comment