Dynamic SQL Monitoring in SQL Server

I  need monitoring script or tool which only monitors dynamic sql statements which may generated thru hibernate or thru various other methods.
I want to see which dynamic sql is more resource intensive.I dont want the ones from the stored procedure.Thanks
LVL 8
venk_rAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sachitjainCommented:
I don't there is any way to monitor only dynamic sql but you could configure SQL Profiler with TSQL events to monitor the statistics (Duration of execution, CPU time, I/O time etc) of your queries including dynamic sql. To limit the size of your trace captured, put appropriate filters in place like application name, database name, login name and if possible hostname etc. SQL Profiler is very easy to use tool. You could find so many articles over net which tell how to use it.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
For RAM consumption, you can isolate ORM statement from stored procedures calls by using DMV.  For CPU and IO you can use Profiler to identify most consuming statements some of them will be dynamic based and some sp based.  Most of the ORM mappers (hibernate...) usually create inner procedure cache contention since they decrease the ability of the server to reuse plans.  
0
venk_rAuthor Commented:
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.