set xact_abort on
go

begin transaction
go

set ANSI_NULLS on
go

/*************************************
* STORED PROCEDURE stp_userLoginRefreshDb
*
*  alla login utehte effettua alcune utility bach di refresh db
*
* mod : 2013.01.14	
* aut : S.E. Locatelli
**************************************/
create PROCEDURE stp_userLoginRefreshDb

AS

--=============================================================================
-- Setup
--=============================================================================
DECLARE @StartTime DATETIME    --Timer to measure total duration
    SET @StartTime = GETDATE() --Start the timer

--=============================================================================
-- Chiama stored x refresh di alcune viste "problematiche" x linkedservers
--=============================================================================
EXEC sp_refreshview 'v_selFonti'



--===== Display the total duration
SELECT STR(DATEDIFF(ms,@StartTime,GETDATE())) + ' Milliseconds duration' as msecExec


RETURN
go

commit
go









-- registro versione...
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(119, GETDATE())
GO
