February 2, 2016 at 12:13 pm
Hi,
we have "old" application that after SQL server instance installation runs 100+ sql scripts and create server triggers, several db(s), add objects to those db(s)
Goal: Document name and sequence of execution of all the scripts.
We can only use native SQL server tools and PowerShell.
My first choice would be SQL Profiler.
Problem
1.SQL scripts might contain code for creation of more then 1 object so I can't compare script name to object created
2.Not sure if any standard SQL profiler event can capture name of the SQL script executed .
Thank you
Alex
February 2, 2016 at 1:07 pm
Scripts are loaded and executed by the application code, not by SQL Server. The only thing SQL Server sees is batches of statements being submitted.
So no, there is no way to get the script name by using only SQL Server tools.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply