Method R Trace

Method R Trace is a zero-click trace file collector for Oracle SQL Developer. It brings you trace files, automatically. No searching. No clicking. No bother.

A quick video introduction to Method R Trace

Method R Trace is an extension for Oracle SQL Developer. It adds a Trace File Downloads panel with a button to control automatic tracing of scripts run in a SQL Developer worksheet, and a control for choosing where to store the trace files you create.

Method R Trace is simple to operate, but it does a lot of work for you. When Method R Trace is enabled, Oracle SQL Developer automatically executes all of the following steps, fast, each time you click the Run Script button:

  1. Enable Oracle tracing at the level you have configured in the Method R Trace preferences.
  2. Execute the script in the current SQL Developer worksheet.
  3. Disable Oracle tracing.
  4. Find your Oracle trace file.
  5. Extract the trace data for the most recent script execution from your Oracle session’s trace file, along with all relevant cursor definitions and row source operations.
  6. Transfer the extracted trace data to your local workstation.
  7. Display attributes of the file in the Trace File Downloads pane.

Once your file appears in your Trace File Downloads pane, it is easy to load the file into the Method R Workbench application. Or you can open it with any application you choose.

How to move files from Method R Trace into Method R Workbench

Wow… Just wow.
Absolutely blown away by how simple yet effective it is.

John Scott · Founder of APEX Evangelists · Halifax, UK

Specifications

Design imperatives: (1) automatically collect precisely-scoped Oracle extended SQL trace data when the user executes the SQL Developer Run Script feature; (2) fetch the appropriate trace file from the database server to the SQL Developer workstation; (3) organize your trace files in the workstation’s file system for easy retrieval and transfer to Method R Workbench.

Platforms: Method R Trace runs on any platform where Oracle SQL Developer runs.

Interfaces: Method R Trace creates a panel and some controls within SQL Developer. It uses SQL Developer’s Oracle Database connections.

Internationalization: All controls and documentation are English language.

Integration: Drag-and-drop integration with its operating system and other applications (e.g., Finder, Explorer, Method R Workbench).

Architecture: Method R Trace is an extension for Oracle SQL Developer.

Database components: Creation of Oracle database objects is required. These objects are documented within an installation script that is distributed with the product.

Installation prerequisites: Installation requires a running Oracle SQL Developer installation.

Documentation: Documentation is available below and inside the product.

Version history: Detailed release notes are available here.

License key: Method R Workbench requires a valid license key to run. A license key is valid for a pre-defined duration. A trial license key differs from a full license key only in duration.


Installing Method R Trace

To install Method R Trace:

  1. Obtain a license key from our trial license key request form or our online store.
  2. Open Oracle SQL Developer.
  3. Click Help › Check for Updates….
  4. Select Search Update Centers.
  5. Click Add….
  6. Use the following values:
    • Name: Method R Trace
    • Location: https://method-r.com/distro/mrtrace-sqldev.xml
  7. Follow SQL Developer’s remaining instructions.
  8. Enter your license key in the Preferences › Method R Trace › License panel.

If you prefer to use the SQL Developer Install From Local File(s) feature, you can download the distribution file yourself from our downloads page.

Setting Up Oracle

Method R Trace requires some privileges and components to trace your scripts and fetch your files for you. When Method R Trace needs privileges for a database connection, it will pop up a dialog box showing you what it needs. If you are your own DBA, then all you need to do is enter a password, and you’re on your way. If your DBA is someone else, we’ve made it easy to send a copy of the script to your DBA for review and execution. You can see this script in Preferences › Method R Trace › Installation Script.


Using Method R Trace

Once you’ve installed Method R Trace, select View › Trace File Downloads to see the Method R Trace main Trace File Downloads panel. Your screen should look something like the one here.

Now you’re ready to roll.

  1. Glance to make sure that Method R Trace is enabled. You will have to do this only once. If the indicator tells you that Method R Trace is disabled, then just click the indicator to enable it. If at any time you prefer not to trace the next execution, then, of course, click the indicator to disable it.
  2. Click this pathname if you want your trace file to be downloaded to a different directory than the one named here.
  3. Press the Run Script button to execute and trace the code on your worksheet. Note that the Run Statement button (the green triangle without the disk drive) does not trigger the trace file creation. …Well, sometimes actually it does, but the reasons are subtle, so it’s easier to remember the general rule: run and trace by using Run Script, not Run Statement.
  4. Your trace file will appear automatically as the top row in the Trace File Downloads panel.

This is why we call Method R Trace a zero-click trace file collector: once it is enabled, and your destination directory is what you want, the only button you click—Run Script—is a button you’d have clicked anyway. The net effect: a precisely scoped trace file, zero extra effort.

To open a trace file directly from the Trace File Downloads panel, just click the file name. To open a directory, click the directory name.

You can move this panel or even hide it; just use View › Trace File Downloads to reveal it if it’s hidden.


Integration with Method R Workbench

Method R Trace is a trace file collector. Once you’ve collected a file, you’re probably going to want to feed that file to another software tool to analyze it. Method R Trace is designed to work best with the Method R Workbench application.

By controlling what directory Method R Trace will put your next trace file in, right from the Trace File Downloads panel, you can make it easy to feed files to Method R Workbench. Create directories to keep your trace files organized by project, application, and function, and instruct Method R Trace to put your files right where they belong. Then just load those files from your file manager (Finder, Explorer, …) into the Workbench files pane.


Uninstalling

To stop Oracle SQL Developer from loading the Method R Trace extension, use Tools › Features… › Installed Updates.

To delete the Method R Trace extension from your computer, delete the following files, where $HOME represents your home directory, and $SQLDEV represents the Oracle SQL Developer installation directory:

  • $HOME/.method-r/mrtrace
  • $SQLDEV/sqldeveloper/sqldeveloper/extensions/com.methodr.trace.sqldevext
  • $SQLDEV/sqldeveloper/sqldeveloper/extensions/com.methodr.trace.sqldevext.jar

To uninstall the Method R Trace Oracle Database components, use the SQL statements provided at the tail of the installation script listed at Preferences › Method R Trace › Installation Script.