Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: sp_MSForeachdb then sp_MSforeachtable

    YOU CAN TRY WITH THIS

    CREATE PROCEDURE usp_DataRowCounts AS

    set ANSI_NULLS ON

    set QUOTED_IDENTIFIER ON

    EXEC sp_MSForeachdb @replacechar='%', @command1= " USE %

    IF DB_ID('%')>4 begin

    INSERT TEST_table

    EXEC sp_msforeachtable 'sp_spaceused ''?'''

    end"

Viewing post 1 (of 1 total)