how to encrypt 500 stored procedures?

  • without seing psycologist?

    lalafafa

    if one wants it.. one will justify it.

  • Declaring a cursor with all the sp names, and then execute sp_helptext for each one.

    DECLARE @sp-2 AS SYSNAME

    DECLARE curSP CURSOR LOCAL FOR

    SELECT name

    FROM sysobjects

    WHERE xtype = 'P'

    ORDER BY NAME

    OPEN curSP

    FETCH NEXT FROM curSP INTO @sp-2

    WHILE (@@FETCH_STATUS = 0)

    BEGIN

    PRINT 'Scripting sp ' + @sp-2 + '...'

    EXEC ('EXEC sp_helptext ' + @sp-2)

    FETCH NEXT FROM curSP INTO @sp-2

    END

    CLOSE CurSp

    DEALLOCATE curSP

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply