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 7765515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:11:08+00:00 2026-06-01T15:11:08+00:00

I have created a procedure and used the below statement inside that . select

  • 0

I have created a procedure and used the below statement inside that .

select sql_id into v_sql_id from v_$sql where sql_text =v_sql;

I am getting the following error PL/SQL: ORA-00942: table or view does not exist

I have checked the synonym its owner is PUBLIC,so it should run in this case ,but its not working .

Another thing i can select sql_id from v_$sql where sql_text =v_sql; this in simple editor .Can anyone help me with this .

  • 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-06-01T15:11:09+00:00Added an answer on June 1, 2026 at 3:11 pm

    Database dictionary related or system tables (v_$sql in this case) are owned by Oracle sys user and needs special privileges to access them. You need to login to oracle database as sysdba user or get those privilages (your DBA might help you with this) to get access for the data dictionary views.

    As mentioned in this article

    The problem is that procedures don't respect roles; only directly granted rights 
    are respected. So, that means that table_owner has to regrant the right to select
    

    So, try the following to grant the SELECT on all dictionay view so that you can use it in your pl/sql blocks.

    grant select any dictionary to USERNAME
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dynamic SQL statement I've created in a stored procedure. I need
I have an SQL CREATE PROCEDURE statement that runs perfectly in my local SQL
I have created a stored procedure for selecting value from the table if that
I have a modal dialog that is created with the following: procedure TFormCompose.createParams(var Params:
I created and launch the SQLJ Java procedure (using SQL Developer). I have some
I have created a simple CLR procedure that creates a Folder. The problem is
I have designed a stored procedure usign Sql Server 2005 below to compare 3
I have created a procedure with this structure but it doesn't work for datetime
I have just created a report in Report Manager using a Stored Procedure which
I have a T-SQL stored procedure with the signature CREATE PROCEDURE MyProc @recordCount INT

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.