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

  • Home
  • SEARCH
  • 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 45221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:46:30+00:00 2026-05-10T15:46:30+00:00

I have a stored procedure that consists of a single select query used to

  • 0

I have a stored procedure that consists of a single select query used to insert into another table based on some minor math that is done to the arguments in the procedure. Can I generate the plan used for this query by referencing the procedure somehow, or do I have to copy and paste the query and create bind variables for the input parameters?

  • 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. 2026-05-10T15:46:30+00:00Added an answer on May 10, 2026 at 3:46 pm

    Use SQL Trace and TKPROF. For example, open SQL*Plus, and then issue the following code:-

    alter session set tracefile_identifier = 'something-unique' alter session set sql_trace = true; alter session set events '10046 trace name context forever, level 8';  select 'right-before-my-sp' from dual; exec your_stored_procedure  alter session set sql_trace = false; 

    Once this has been done, go look in your database’s UDUMP directory for a TRC file with ‘something-unique’ in the filename. Format this TRC file with TKPROF, and then open the formatted file and search for the string ‘right-before-my-sp’. The SQL command issued by your stored procedure should be shortly after this section, and immediately under that SQL statement will be the plan for the SQL statement.

    Edit: For the purposes of full disclosure, I should thank all those who gave me answers on this thread last week that helped me learn how to do this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Don't forget that in C/C++ the compiler needs to be… May 11, 2026 at 11:19 am
  • added an answer If you are allowed to use LINQ, take a look… May 11, 2026 at 11:19 am
  • added an answer There is no way to automatically remove all related code.… May 11, 2026 at 11:19 am

Related Questions

I have a stored procedure that consists of a single select query used to
I have a stored procedure that returns multiple tables. How can I execute and
I have a stored procedure that looks like: CREATE PROCEDURE dbo.usp_TestFilter @AdditionalFilter BIT =
I have a Stored Procedure that rolls-back a series of operations. I want to
I have a stored procedure that returns values from a temp table. In my
I have a stored procedure that needs to convert hexadecimal numbers to their decimal
I have a stored procedure that returns two int Values. The first can not
I have a stored procedure that ideally should be able to accept a list/table
Suppose I have a stored procedure that manages its own transaction CREATE PROCEDURE theProc
Say I have a stored procedure that returns data from a SELECT query. I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.