Solved

Oracle PL/SQL Package

Posted on 2011-03-07
8
490 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 250 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 250 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 125 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 4

Assisted Solution

by:subratabiswas
subratabiswas earned 125 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert Oracle data into XML document 2 66
history tablespace temp usage 2 42
Queries 15 40
Need help with fine tuning the windows batch script to change password 9 30
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

810 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