Hello all! Yes, again it has been a while!
Life is sometimes a wondrous journey.
My latest obsession has been 8-bit computers! Building them from scratch.
Take a look at my Z80 based computer. This has been a lot of fun!
Hello all! Yes, again it has been a while!
Life is sometimes a wondrous journey.
My latest obsession has been 8-bit computers! Building them from scratch.
Take a look at my Z80 based computer. This has been a lot of fun!
An error occurred while evaluating the function.
Communication Link Error.I also received this error when in SQL Server Management Studio, connected to the Integration Services on that server, and tried to browse thru the package store to a package.
Shared Memory Provider: No process is on the other end of the pipe.
peace
-- =============================================
-- spwRebuildTableIndexes
--
-- Author: Bob Pearson
-- Create date: 2013-03-14
-- Description: Rebuilds specified index or all indexes on a table
--
-- Updates
-- Date Who What
-- -------- ---- ----------------------------
--
-- =============================================
ALTER PROCEDURE [dbo].[spwRebuildTableIndexes]
@TableName varchar(100),
@IndexName varchar(100) = null
AS
BEGIN
Set NOCOUNT ON;
Declare @SQL varchar(max) = '';
if @IndexName is not null
BEGIN
Select @SQL = 'Alter Index ' + @IndexName + ' on ' + @TableName + ' REBUILD;';
Execute (@SQL);
print @TableName + '.' + @IndexName + ' Rebuilt...'
Return;
END
Declare cur cursor for
Select i.name
from sys.indexes i
inner join
sys.objects o
on i.object_id = o.object_id
where o.name = @TableName and o.type = 'U'
for read only;
Open Cur;
Fetch Next from Cur into @IndexName;
While @@FETCH_STATUS = 0
BEGIN
Select @SQL = 'Alter Index ' + @IndexName + ' on ' + @TableName + ' REBUILD;';
Execute (@SQL);
print @TableName + '.' + @IndexName + ' Rebuilt...'
Fetch Next from Cur into @IndexName;
END
Close Cur;
Deallocate Cur;
END