Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 810227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:51:02+00:00 2026-05-15T00:51:02+00:00

I am new to DBMS_PROFILER. All the examples I have seen use a simple

  • 0

I am new to DBMS_PROFILER. All the examples I have seen use a simple top-level procedure to demonstrate the use of the profiler, and from there get all the line numbers etc. I deploy all code in packages, and I am having great difficulty getting my profile session to populate the plsql_profiler_units with useful data. Most of my runs look like this:

RUNID RUN_COMMENT UNIT_OWNER  UNIT_NAME         SECS PERCEN
----- ----------- ----------- -------------- ------- ------
5     Test        <anonymous> <anonymous>        .00    2.1
      Profiler

5     Test        <anonymous> <anonymous>        .00    2.1
      Profiler

5     Test        <anonymous> <anonymous>        .00    2.1
      Profiler

I have just embedded the calls to the dbms_profiler.start_profiler, flush_data and stop_profiler as per all the examples. The main difference is that my code is in a package, and calls in to other package. Do you have to profile every single stored procedure in your call stack? If so that makes this tool a little useless!

I have checked http://www.dba-oracle.com/t_plsql_dbms_profiler.htm for hints, among other similar sites.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T00:51:02+00:00Added an answer on May 15, 2026 at 12:51 am

    Are you sure that this is not a problem with your query to retrieve data from plsql_profiler_units?


    I tried this:

    Create Procedure sub_procedure As
    Begin
      dbms_output.put_line('test');
    End;
    
    Create Package test_package As
      Procedure test;
    End;
    
    Create Package Body test_package As
      Procedure test As Begin
        For i In 1 .. 10 Loop
          If(i<=5) Then
            sub_procedure;
          End If;
        End Loop;
      End;
    End;
    
    Begin
      DBMS_PROFILER.start_profiler(SYSDATE);
      test_package.test;
      DBMS_PROFILER.stop_profiler;
    End;
    

    and this simple query

    Select uni.unit_name, dat.line#, dat.total_occur
      From plsql_profiler_data dat
      Join plsql_profiler_units uni On (     uni.runid = dat.runid
                                         And uni.unit_number = dat.unit_number )
    

    gives me the expected result showing also packages and procedures:

    <anonymous>    1  0
    <anonymous>    2  0
    <anonymous>    3  2
    <anonymous>    4  1
    <anonymous>    5  0
    TEST_PACKAGE   2  0
    TEST_PACKAGE   3 11
    TEST_PACKAGE   4  5
    TEST_PACKAGE   5  6
    TEST_PACKAGE   8  1
    SUB_PROCEDURE  1  0
    SUB_PROCEDURE  3  5
    SUB_PROCEDURE  4  5
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.