Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: The Real World: Rebuilding Index - 1 Instance, 106 Databases

    Thanks a lot

    -- query in one select

    exec sp_MSforeachdb @command1= '

    if ''?'' not in (''master'',''model'',''msdb'',''tempdb'')

    begin

    use [?]

    create table #indtab (ID SMALLINT IDENTITY(1,1), REBUILDSTMT nvarchar(600))

    insert into #indtab

    SELECT

    CASE WHEN avg_fragmentation_in_percent >...

Viewing post 1 (of 1 total)