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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:23:17+00:00 2026-06-11T19:23:17+00:00

I am using oracle 11g . I am trying to run a procedure inside

  • 0

I am using oracle 11g . I am trying to run a procedure inside a package by using the command

execute package.procedure 

but I keep getting the exception

ERROR at line 1:
ORA-06550: line 1, column 12:
PLS-00302: component 'package' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

The package and package body i created is the following. What i am actually trying to do here is to create a package which is used to create tables each time its executed. so i wrote the following script.

—–Package

create or replace package pack1 as
end pack1 ;
/

——Package Body

create or replace package body pack1 as
procedure proc1
is 
begin
execute immediate 'create table bcd(bc date)';
end ;
procedure proc2
is 
begin
execute immediate 'create table bcde(bc number(12,0)) as select country_id from      countries';
end ;
end pack1;
/

but when i ran

execute pack1.proc2 ;

It gave me the above exception.

Can someone help me with what is wrong ?

Thanks a ton in advance

  • 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-11T19:23:18+00:00Added an answer on June 11, 2026 at 7:23 pm

    Procedures and functions in a package are private by default. To make them public you have to declare them in the package specification:

    create or replace package pack1 as
    procedure proc1;
    procedure proc2;
    end pack1;
    /
    

    Creating tables on the fly doesn’t sounds like a good idea though.

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

Sidebar

Related Questions

Using .Net and Oracle 11g - I've been returning dataTables from a procedure inside
I'm trying to run this SQL command but it's giving me an error that
I am using Oracle 11g client, with ODP.NET. I am trying to add conditional
I am using REGEXP_SUBSTR in Oracle 11g and I am having difficulty trying to
I'm trying to insert a data into oracle database(version 11g xe).But when i'm trying
Using Oracle 11g I want a single exception to an otherwise sorted table select
Teaching myself SQL, and using an employee info db, on oracle 11g. I'm trying
I'm trying to dequeue using Oracle 11g queue using standlone java. Here is the
I'm trying to connect my local Oracle 11g database using server explorer in Visual
I'm using Oracle 11g, and trying to create a table define constraints on the

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.