Question

I recently started a new development project in .net with an oracle db. I never used oracle before, and I wondered if there is a sqlprofiler like tool for oracle as well?

Was it helpful?

Solution

The best way to profile your application in Oracle is sql tracing. The sql trace gives you what statements your application executed, the elapsed time for those, for that they waited on and for how long the waits were. The link I have provided is a good start to read about sql tracing.

OTHER TIPS

Oracle provides SQLDeveloper, which includes EXPLAIN tools and AUTOTRACE tools, etc.

P.S. TOAD is nice if you can afford it (at least it was the last time I could afford it).

Related with profiling, a bit more general, as involves general performance tuning - Automatic Performance Statistics. Even if you don't want to use it, it will give you idea of the important system performance related views and events.

The challenge with most native trace functionality is the performance load they impose, thus making them unadvisable for 24x7 query monitoring of high-volume, mission critical production systems.

There are third-party tools in the market that also provide profile/trace functionality. Some of these tools also impose a performance burden on the system and so will often only take periodic snapshots via polling of the dbms; other tools monitor the database queries non-intrusively (so impose zero/minimal load on the system) and can be used on an "always on" basis.

You need to determine whether the additional performance load is acceptable. If so, then go with the native capability or the cheaper third party tools. If you are working with a high-transaction, mission critical production system, then look at the non-intrusive tools.

Full disclosure: I work for one of the vendors who provide such tools. Vendors use various mechanisms to ensure that their performance monitoring is non-intrusive. Ours does not open a connection to the db nor poll it in any way; instead, we listen to network traffic to passively capture queries and calculate associated performance metrics (such as server reaction time, query response time, round-trip time, etc). We specialize in high-transaction / high-volume production database monitoring – where, to quote a blogger I saw elsewhere, “you cannot have the odometer slow down the car”. More about us at: http://www.exact-solutions.com/products/iwatch

In addition to extended SQL Trace and TKPROF you can profile PL/SQL code with the Oracle supplied package DBMS_PROFILER.

Also take a look at the enterprise manager. It has a lot of handy tools to dynamically examine and tune your code as it's running. It does have to be configured by your DBA.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top