Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Oracle PL/SQL Package

Posted on 2011-03-07
8
Medium Priority
?
496 Views
Last Modified: 2012-06-22
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
Comment
Question by:jeffreyjseaman
8 Comments
 
LVL 1

Accepted Solution

by:
Hath1ASC earned 1000 total points
ID: 35060783
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
 
LVL 1

Assisted Solution

by:Hath1ASC
Hath1ASC earned 1000 total points
ID: 35060835
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
 
LVL 35

Assisted Solution

by:Mark Geerlings
Mark Geerlings earned 500 total points
ID: 35061409
Or, use this query to find the problem object:

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

0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 4

Assisted Solution

by:subratabiswas
subratabiswas earned 500 total points
ID: 35061899
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
 

Author Closing Comment

by:jeffreyjseaman
ID: 35069965
Thanks for everyone's support. I ended up figuring it out a different method. But these are good. Thanks for quick response.
0
 
LVL 32

Expert Comment

by:awking00
ID: 35070217
See attached.
procedure.txt
0
 
LVL 32

Expert Comment

by:awking00
ID: 35070231
Guess I spent too much time testing :-)
0
 
LVL 1

Expert Comment

by:Hath1ASC
ID: 35073962
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question