-
-
Save developnweb/b205f2e93ecf5f7d120283cd7256d8e2 to your computer and use it in GitHub Desktop.
Búsqueda de cadena de texto en todos los objetos de BBDD en SQL Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE <BASE_DATOS> | |
GO | |
SELECT | |
Object_name(so .parent_object_id) Parent_Name, | |
so .name [Objeto], | |
so .type_desc [Tipo], | |
so .create_date [Creado], | |
sm.definition [Texto] | |
FROM sys .objects so | |
INNER JOIN sys. sql_modules sm ON so.object_id = sm.object_id | |
WHERE | |
so .type = '<TIPO_OBJETO>' AND | |
CONVERT(VARCHAR(8000),sm.definition) LIKE '%<TEXTO_A_BUSCAR>%' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment