viernes, 20 de enero de 2012

DECRYPT SQL SERVER 2000 STORED PROCEDURES, VIEWS AND TRIGGERS (WITH EXAMPLES)

This SP will decrypt Stored Procedures, Views or Triggers that were encrypted using "with encryption" There are 2 versions: one for SP's only and the other one for SP's, triggers and views version 1: INPUT: object name (stored procedure, view or trigger) version 2: INPUT: object name (stored procedure, view or trigger), object type('T'-trigger, 'P'-stored procedure or 'V'-view) 

This example was executed in the version Sql Server 2000.


Tables Used
1.       Syscomments
2.       Sysobjects
In the enterprise manager create new store procedure

 
Create new Store Procedure
In the query analyzer execute the following code for create the store procedure and execute the sp_helptext for view in console
 
Running the code: exec sp_helptext hello


  
Running the code: exec dbo.DECRYPTSP2K ‘hello’

For view the procedure decryption.


Note: Remember only function in version sqlserver 2000 in other version deleted the procedure. And only works with simple stored procedures.
More Information: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=505&lngWId=5



No hay comentarios:

Publicar un comentario