set xact_abort on
go

begin transaction
go

INSERT INTO dbo.Permessi
  VALUES ('BAZ', 'Bazaar', 3, 1, 'Bazaar', 'Bazaar_ttip')
INSERT INTO dbo.Permessi
  VALUES ('BAZ_RA', 'BazaarRA', 3, 3, 'BazaarRA', 'BazaarRA_ttip')
INSERT INTO dbo.Permessi
  VALUES ('BAZ_verify', 'BazaarVerify', 3, 2, 'BazaarVerify', 'BazaarVerify_ttip')
go

commit transaction
go


set xact_abort on
go

begin transaction
go

INSERT INTO dbo.Permessi2Funzione
  VALUES ('BAZ', N'PowerUser', 'S')
INSERT INTO dbo.Permessi2Funzione
  VALUES ('BAZ_RA', N'PowerUser', 'S')
INSERT INTO dbo.Permessi2Funzione
  VALUES ('BAZ_verify', N'PowerUser', 'S')
go

commit transaction
go





-- registro versione...
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(190, GETDATE())
GO
SELECT TOP 10 * FROM LogUpdateDb ORDER BY Versione DESC
GO
