Solved

Oracle PL/SQL Package

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

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
 
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
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.

 

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 31

Expert Comment

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

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.

Join & Write a Comment

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now