Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Profiler and Hibernate

 
   Database Help (Home) -> Tools RSS
Next:  Can I use SQL DB Publishing Wizard to transfer fr..  
Author Message
Erik Sampsell

External


Since: Dec 12, 2008
Posts: 4



(Msg. 1) Posted: Thu Dec 18, 2008 12:12 pm
Post subject: Profiler and Hibernate
Archived from groups: microsoft>public>sqlserver>tools (more info?)

I've just started at a new company that is using java and hibernate to
access SQL Server. I tried configuring SQL Profiler to show me what sql
calls are being made to the database and I can't see it.

Can anyone give me some direction? I'm not familiar with hibernate at all.

 >> Stay informed about: Profiler and Hibernate 
Back to top
Login to vote
Erland Sommarskog2

External


Since: May 30, 2004
Posts: 2061



(Msg. 2) Posted: Thu Dec 18, 2008 2:38 pm
Post subject: Re: Profiler and Hibernate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Erik Sampsell (erik@fuzeboxinc.com) writes:
> I've just started at a new company that is using java and hibernate to
> access SQL Server. I tried configuring SQL Profiler to show me what sql
> calls are being made to the database and I can't see it.
>
> Can anyone give me some direction? I'm not familiar with hibernate at
> all.

I assume you mean nHibernate? No, I don't know anything about it; I've
only heard the name.

But there is no way that nHibernate can call SQL Server without being
captured in a trace, so this is probably something really trivial. Maybe
your filter is poor. Maybe you failed to include both of RPC:Completed and
TSQL:BatchCompleted. (Include Starting as well, in case all batches errors
out.) Maybe you are tracing the wrong server. Maybe the application wasn't
accessing SQL Server while you were tracing.



--
Erland Sommarskog, SQL Server MVP, esquel.DeleteThis@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 >> Stay informed about: Profiler and Hibernate 
Back to top
Login to vote
Gareth Erskine-Jones

External


Since: Dec 18, 2008
Posts: 1



(Msg. 3) Posted: Thu Dec 18, 2008 7:25 pm
Post subject: Re: Profiler and Hibernate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 18 Dec 2008 14:38:41 -0800, Erland Sommarskog
wrote:

>Erik Sampsell (erik@fuzeboxinc.com) writes:
>> I've just started at a new company that is using java and hibernate to
>> access SQL Server. I tried configuring SQL Profiler to show me what sql
>> calls are being made to the database and I can't see it.
>>
>> Can anyone give me some direction? I'm not familiar with hibernate at
>> all.
>
>I assume you mean nHibernate? No, I don't know anything about it; I've
>only heard the name.

Hibernate is a java O/R mapper, NHibernate is the .NET version - so in
this case he probably is using Hibernate.

>But there is no way that nHibernate can call SQL Server without being
>captured in a trace, so this is probably something really trivial. Maybe
>your filter is poor. Maybe you failed to include both of RPC:Completed and
>TSQL:BatchCompleted. (Include Starting as well, in case all batches errors
>out.) Maybe you are tracing the wrong server. Maybe the application wasn't
>accessing SQL Server while you were tracing.

Yes, there's nothing special about the way (N)Hibernate accesses SQL
Server - I've used profiler to look at the SQL generated by
NHibernate, and it was pretty straightforward. It's also quite easy to
get NHibernate to log the SQL it produces, I don't remember the
details (I think we used log4net), but I suspect something similar can
be done with Hibernate.

--
http://www.sgat-computing-services.co.uk/
 >> Stay informed about: Profiler and Hibernate 
Back to top
Login to vote
Erland Sommarskog2

External


Since: May 30, 2004
Posts: 2061



(Msg. 4) Posted: Fri Dec 19, 2008 12:11 am
Post subject: Re: Profiler and Hibernate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gareth Erskine-Jones (gej@sgat-computing-services.co.uk) writes:
> Hibernate is a java O/R mapper, NHibernate is the .NET version - so in
> this case he probably is using Hibernate.

As I said, I've heard the name, that's all. Now I've heard one more name,
thanks for the illunination!


--
Erland Sommarskog, SQL Server MVP, esquel.RemoveThis@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
 >> Stay informed about: Profiler and Hibernate 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
SQL Profiler - I have about 1000 profiler trace files that I need to load into a table. Is there any way to do a mass load? I know I can open each trace and do a "save as" and then save it to a table. I want to do more than one table at a time.

SQL Profiler - I can never seem to get the filters to work in SQL Profiler. I've tried to set HOSTNAME and NTUSERNAME to mine however when I run the trace all connection request are shown. Am I missing something??? Thanks -- ____________________________________..

Basic Profiler question - Not too familiar with SQL Profiler in SQL2000 sp4. Our issue is that the CPU is spiking on our SQL Server and slow response time for one database in particular. I've run some profiler traces capturing execution plans and filtering for a particular..

Need help from Gurus: Profiler columns - Please help me understand "duration", "starttime", and "endtime" columns in trace tables. The most confusing part is that the duration does not match with starttime and endtime. I started a proviler and had results stored ...

SQL Profiler Question - One of our in-house testers is getting a strange error in our app that we are trying to track down and I am using SQL Profiler (2005) to trap the SQL statements. This is isolated to this one machine and a single user of the database. The error is..
   Database Help (Home) -> Tools All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]