I'm a SQL Server DBA, and I've inherited a database environment where heavy Hibernate (v 2.5) usage is taking place.
As you may know, Hibernate significantly scrambles all SQL activity within the database, so when I profile one of our DBs, instead of SQL statements I see activity like:
create proc #jtds000008 @P0 int AS INSERT...
exec #jtds000008 <list of parameters>
Worse yet, the same stored proc 'serial numbers' are reused before they're aged out, so stored proc '#jtds000008' might actually be 20 different stored procs (this is possible b/c SQL Server assigns unique IDs to temp objects).
Is there a way to configure Hibernate so the true SQL is executed against the database, and not the rewrites? Any kind of database analysis or performance tuning has become impossible because of this obfuscation.
Thanks,
- S
|