USE CreditReporting;
GO

DECLARE @MovingTarget datetime = GETDATE();

WHILE DATEADD(second,20000, @MovingTarget)
	>GETDATE()
BEGIN
	
	ALTER INDEX ALL ON dbo.charge  REBUILD;
	
	BACKUP LOG CreditReporting 
	TO DISK = 'nul'
	
END
