Intoduction :-
Hii Friends...
Today I give some tricks that help in stored procedures when we are fixed. Like when we not found any stored procedure , or we alter any stored procedure then what we do.
Trick 1 :- when procedure not found then we write this query only . With the help of this query you can find any stored procedure that you want.
select * from sys.objects where name like '%yourSearchText'
In this you only change the Stored procedure name that you want and you find it.
Trick 2 :- when procedure goes alter then recovery process is given blow .
SELECT deqs.last_execution_time AS [Time], dest.text AS [Query]
FROM sys.dm_exec_query_stats AS deqs
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
ORDER BY deqs.last_execution_time DESC
with the help of this query you can recover your sp.
Hii Friends...
Today I give some tricks that help in stored procedures when we are fixed. Like when we not found any stored procedure , or we alter any stored procedure then what we do.
Trick 1 :- when procedure not found then we write this query only . With the help of this query you can find any stored procedure that you want.
select * from sys.objects where name like '%yourSearchText'
In this you only change the Stored procedure name that you want and you find it.
Trick 2 :- when procedure goes alter then recovery process is given blow .
SELECT deqs.last_execution_time AS [Time], dest.text AS [Query]
FROM sys.dm_exec_query_stats AS deqs
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
ORDER BY deqs.last_execution_time DESC
with the help of this query you can recover your sp.
0 comments:
Post a Comment