Solved

Oracle PL/SQL Package

Posted on 2011-03-07
8
491 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
help on oracle query 5 53
Oracle - SQL Where clause causing Invalid Number Error 4 46
Include a logo in email body using Oracle utl_mail 11 43
pl/sql - query very slow 26 74
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
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…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

830 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