locked
How to configure sql profiler so that it won't generate t-sql scripts for chosen EF 4 functions? RRS feed

  • Question

  • Hello,

    I am creating an application using EF4 linq to entities. When the application is running the sql profiler trace is generating the t-sql scripts for all the EF functions being run.

    If I want to prevent some of the methods from being revealed how can I do so? Is there a way to programmatically disabling the sql profiler while some chosen procedures/methods/functions in the EF 4 are being run?

    Thanks for any advices given.

     

    Monday, December 20, 2010 10:13 AM

Answers

  • >>My concern is more of this: If I am developing a product for sale and someone is >>>evaluating the product before buying and while the prospect is running the >>>application and he runs the SQL Profiler all my "secretes" are revealed.

    Yep, actually  in that case I think you are out of luck....I do not know what secrets are  you talking about , perhaps you can keep them out in the application, but SQL Profiler will see almost everything


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    • Proposed as answer by Tom Li - MSFT Wednesday, December 22, 2010 6:37 AM
    • Marked as answer by Tom Li - MSFT Tuesday, December 28, 2010 5:16 AM
    Monday, December 20, 2010 1:00 PM

All replies

  • Sorry but what EF functions are?

    You can set a filter to exclude some data, or  you can run a trace from a file and then apply a filter such as sqltext not like '%blabla%'


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Monday, December 20, 2010 10:22 AM
  • Sorry but what EF functions are?

    You can set a filter to exclude some data, or  you can run a trace from a file and then apply a filter such as sqltext not like '%blabla%'


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Monday, December 20, 2010 10:22 AM
  • By EF functions I mean Entity Framework 4.0 attached to Visual Studio 2010 and the functions written in Linq to Entity.

    If I started the SQL profiler trace in SQL 2008 EXPRESS while running the application written in Ling to Entity the profiler will generate all the T-SQL scripts behind all the Linq to Entity functions in the trace that can be saved and read later.

    With this feature of SQL Profiler all my secrets re revealed to the DB owner? ;-)

    Thanks for your suggestion and I have to figure out how to apply the technique.

    My concern is more of this: If I am developing a product for sale and someone is evaluating the product before buying and while the prospect is running the application and he runs the SQL Profiler all my "secretes" are revealed. Would he still buy my product? I posted the question to one prospect and he replied honestly that he won't if he can see my clear codes!

    Monday, December 20, 2010 12:50 PM
  • >>My concern is more of this: If I am developing a product for sale and someone is >>>evaluating the product before buying and while the prospect is running the >>>application and he runs the SQL Profiler all my "secretes" are revealed.

    Yep, actually  in that case I think you are out of luck....I do not know what secrets are  you talking about , perhaps you can keep them out in the application, but SQL Profiler will see almost everything


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    • Proposed as answer by Tom Li - MSFT Wednesday, December 22, 2010 6:37 AM
    • Marked as answer by Tom Li - MSFT Tuesday, December 28, 2010 5:16 AM
    Monday, December 20, 2010 1:00 PM
  • >>My concern is more of this: If I am developing a product for sale and someone is >>>evaluating the product before buying and while the prospect is running the >>>application and he runs the SQL Profiler all my "secretes" are revealed.

    Yep, actually  in that case I think you are out of luck....I do not know what secrets are  you talking about , perhaps you can keep them out in the application, but SQL Profiler will see almost everything


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Monday, December 20, 2010 1:01 PM
  • Thank you for your reply. Then I am out of lucks!

     

    By “secrets” I simply mean if an application depends on some logics and algorithms made by using SQL stored procedures and user-defined functions then SQL profiler can reveal them all.

     

    Even though I write those algorithms using Linq to Entity and compiled the application into a dll there is no preventing the SQL Profiler from revealing the logics and algorithms by the end user perhaps even from a linked server.

     

    I only found this out after spending months learning how to use EF4 and Linq to Entity!

     

    Too bad.

     

    And there seems to be no good ways to hide clear codes from the stored procedures, either. There are tools out there to undo encrypted stored procedures and also tools to undo compiled .net applications. I might as well stick to finding a job and work for people and not consider developing any software products for sale at all.

     

    Monday, December 20, 2010 3:59 PM