sql >> Databasteknik >  >> RDS >> Sqlserver

Hur beräknar jag storleken på lagrade procedurer i SQL Server 2005?

;WITH ROUTINES AS (
    -- CANNOT use INFORMATION_SCHEMA.ROUTINES because of 4000 character limit
    SELECT o.type_desc AS ROUTINE_TYPE
            ,o.[name] AS ROUTINE_NAME
            ,m.definition AS ROUTINE_DEFINITION
    FROM sys.sql_modules AS m
    INNER JOIN sys.objects AS o
        ON m.object_id = o.object_id
)
SELECT SUM(LEN(ROUTINE_DEFINITION))
FROM ROUTINES


  1. mysql återställning till annan databas

  2. Hur fungerar MySQL-index?

  3. Varför finns det inget avgränsat, heltal-endast katalogiseringsalternativ i SQL Server?

  4. Använder IST-tid i mysql-fråga