Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Profiler for Sql CE

i wonder if there is something similar to Sql Profiler for Sql Server Compact Edition? i use SqlCE as backend for a desktop application and it would be really great to have something like sql profiler for this embedded database. or at least something simliar to the NHibernate show_sql feature... any ideas? thanks j.

like image 759
Joachim Kerschbaumer Avatar asked Oct 22 '08 10:10

Joachim Kerschbaumer


2 Answers

The only tested solution I know of that could solve this problem is Altiris Profiler which is a tool I designed at my previous job, but is closed source and not-for-sale.

The way you would hook it in, is by creating a factory for your commands and proxing them for profiling purposes before using them (using RealProxy). Its really light weight and about 10 lines of code to implement.

On my question Flory talks about a new tool called dynaTrace that may also be able to solve this problem as well.

like image 56
Sam Saffron Avatar answered Oct 19 '22 18:10

Sam Saffron


I don't think that would work - CE seems like a totally different beast.

You can enable some logging that might help you:

http://msdn.microsoft.com/en-us/library/ms171949(SQL.90).aspx

I tried to do this and managed to set the database up and connect from SSMS - you have to specify the alternate connection type of 'SQL Server Compact Edition'. Profiler has no such thing - and entering a path to the datafile for the 'database' field did nothing.

like image 26
Sam Avatar answered Oct 19 '22 19:10

Sam