• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 503
  • Last Modified:

Oracle PL/SQL Package

I want to create a PL/SQL Pacakge Name. Well the package says that the object exists already. However I know it doesn't exist I dropped the previous package name. I need to keep the same name and it doesn't work.

How can I find this object and get rid of it? I tried dropping it again and the error message was that the object doesn't exist.

0
jeffreyjseaman
Asked:
jeffreyjseaman
4 Solutions
 
Hath1ASCCommented:
Make sure you fully qualify your reference to it in your scripts.

That is change
DROP PACKAGE my_package;
to
DROP PACKAGE PACKAGE_OWNER.my_package;

Also, check your synonyms and public synonyms for possible interferences, and make sure you are using the correct (and the same) user login for both the DROP and CREATE actions.
0
 
Hath1ASCCommented:
Also, you may want to verify what you get when you run "DESC my_package" and DESC PACKAGE_OWNER.my_package from SQL*Plus.

(Hopefully it goes without saying that PACKAGE_OWNER should be replaced with the name of your schema owner username, you should not actually type "PACKAGE_OWNER" when you are checking.)
0
 
Mark GeerlingsDatabase AdministratorCommented:
Or, use this query to find the problem object:

select owner, object_name, object_type
from all_objects where object_name = '&your_package';

0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
subratabiswasCommented:
You may consider using 'CREATE OR REPLACE PACKAGE' instead of only 'CREATE PACKAGE'. Use similar syntax for creating the package body also. That way, the object will be created irrespective of whether it is existing already or not.
0
 
jeffreyjseamanAuthor Commented:
Thanks for everyone's support. I ended up figuring it out a different method. But these are good. Thanks for quick response.
0
 
awking00Commented:
See attached.
procedure.txt
0
 
awking00Commented:
Guess I spent too much time testing :-)
0
 
Hath1ASCCommented:
Are you willing to share the solution you actually used with us?  It may be helpful to others in the future that find themselves in a similar situation.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now