I have a huge SQL server database. I want to re-write an application. For that I want to reuse the database which has many tables, views and stored procedure. I am using SQL Profiler tool to map the application functionality to database. In Profiler, I am capturing
SP:Starting
SP:Completed
SP:StmtStarting
RPC:Completed
SQL:BatchCompleted
SQL:BatchStarting
In my Profiler trace I have captured an RPC:Completed
event class and the textdata contains
exec sp_executesql N'Select Some query' @var=N'value'".
What is sp_executesql
and how can I know the exact name of the stored procedure called?