Reputation: 287
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?
Upvotes: 2
Views: 1943
Reputation: 1052
In your trace you need to add additional column ObjectName
which show exact sproc name when you click on RPC:Completed
event. ObjectName
can be seen when you check 'Show all columns'
Upvotes: 2