MySQL - how to recover deleted storedprocedures in mysql?

Asked By arul on 31-Jan-13 01:53 AM
hi,
   i have unfortunately replaced my old database in mysql, i need to restore the old storedprocedures, how can i achieve that.

thanks and regards
Arul
RAJESH VEMUNOORI replied to arul on 31-Jan-13 04:11 AM
Hi arul,

Check this out...

SELECT [cp].[refcounts],[cp].[usecounts],[cp].[objtype],[st].[dbid],[st].[objectid],[st].[text],[qp].[query_plan] FROM
sys.dm_exec_cached_plans cp
CROSS
APPLY sys.dm_exec_sql_text ( cp.plan_handle ) st
CROSS
APPLY sys.dm_exec_query_plan ( cp.plan_handle ) qp ;

Let m know if this is helpful..

Regards,
Rajesh.
arul replied to RAJESH VEMUNOORI on 31-Jan-13 04:31 AM
hi rajesh,
         i have tried with your idea, but it says


Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[cp].[refcounts],[cp].[usecounts],[cp].[objtype],[st].[dbid],[st].[objectid],[st' at line 1


can you help me to fix this issue