Pretražiti sadržaj stored procedura

Ponekad je potrebno naći pojam koji se spominje u nekoj od stored procedura, a ne znamo u kojoj.

Ova dvije skripte mogu pomoći u tome:

SELECT  ROUTINE_TYPE,
        ROUTINE_NAME,
        ROUTINE_DEFINITION,
        *
FROM    INFORMATION_SCHEMA.ROUTINES
WHERE   ROUTINE_DEFINITION LIKE '%dio_texta%' 
    
    
SELECT  ROUTINE_NAME,
        ROUTINE_DEFINITION,
        *
FROM    INFORMATION_SCHEMA.ROUTINES
WHERE   ROUTINE_DEFINITION LIKE '%dio_texta%'
 
SELECT  ROUTINE_NAME,
        ROUTINE_DEFINITION,
        *
FROM    INFORMATION_SCHEMA.ROUTINES
WHERE   ROUTINE_DEFINITION LIKE '%dio_texta%'

ili

SELECT  xtype,
        NAME,
        TEXT,
        crdate,
        refdate
FROM    syscomments sc
        LEFT JOIN sysobjects so ON sc.id = so.id
WHERE   sc.TEXT LIKE '%dio_texta%'
    
SELECT  xtype,
        NAME,
        TEXT,
        crdate,
        refdate
FROM    syscomments sc
        LEFT JOIN sysobjects so ON sc.id = so.id
WHERE   sc.TEXT LIKE '%dio_texta%'
    
SELECT  xtype,
        NAME,
        TEXT,
        crdate,
        refdate
FROM    syscomments sc
        LEFT JOIN sysobjects so ON sc.id = so.id
WHERE   sc.TEXT LIKE '%dio_texta%'

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *