Ver Mensaje Individual
  #16 (permalink)  
Antiguo 30/01/2013, 13:04
chuekeron
 
Fecha de Ingreso: octubre-2008
Ubicación: Bs. As., ARG
Mensajes: 203
Antigüedad: 15 años, 6 meses
Puntos: 6
Respuesta: Store Procedure mediante .bat

Cita:
Iniciado por iislas Ver Mensaje
¿que hace tu store procedure?
Actualiza los indices de una tabla.


Código:
USE [base_de_datos]
GO
/****** Objeto:  StoredProcedure [dbo].[ReIndexing]    Fecha de la secuencia de comandos: 01/30/2013 15:59:18 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Developer
-- Create date: 
-- Description:	Actualización de indices.
-- =============================================
ALTER PROCEDURE [dbo].[ReIndexing] 
	-- Add the parameters for the stored procedure here
	  
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here

EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?', ' ', 80)"
EXEC sp_updatestats
END