# Unable to re-create packages without dropping them first

**URL:** <https://forums.toadworld.com/t/unable-to-re-create-packages-without-dropping-them-first/27911>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [December 5, 2013, 1:18pm UTC](https://forums.toadworld.com/t/unable-to-re-create-packages-without-dropping-them-first/27911 "2013-12-05T13:18:58Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![achojar](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@achojar](https://forums.toadworld.com/u/achojar)\
**Post date:** [December 5, 2013, 1:18pm UTC](https://forums.toadworld.com/t/unable-to-re-create-packages-without-dropping-them-first/27911/1 "2013-12-05T13:18:58Z")

</div>

In Toad for Oracle Base Version 12.1.0.22, if a package already exists in the database then it is not possible to run a script that does a “create or replace package”. I have to drop the existing package first, which also drops all the grants. How can I fix this?

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [December 5, 2013, 1:22pm UTC](https://forums.toadworld.com/t/unable-to-re-create-packages-without-dropping-them-first/27911/2 "2013-12-05T13:22:34Z")

</div>

Do you get an Oracle error message? If so, what is the message?

---

<div class="post-metadata">

**Author:** ![damir.vadas\_250](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/damir.vadas_250/32/37_2.png) [@damir.vadas\_250](https://forums.toadworld.com/u/damir.vadas_250)\
**Post date:** [December 5, 2013, 11:29pm UTC](https://forums.toadworld.com/t/unable-to-re-create-packages-without-dropping-them-first/27911/3 "2013-12-05T23:29:04Z")

</div>

I agree with John and ask same thought in another way.

Did you try to make (run) same script in Oracle SQL\*Plus?

I assume you’ll suffer the same problem, because I haven’t seen such a problem in Toad which is not related to core Oracle based problem, what is not a Toad problem.

Another issue come to mine mind…

Does package do DML? Does COMMIT exist inside package.  
Oracle prevent a package from being re-compiled when existing DML changes exist. You must either COMMIT or ROLLBACK in order for recompile to proceed & succeed.

Last but not least problem is that you run into some oracle bug, which without exact Oracle version and OS info, cannot be determined.

In every case assume not a Toad issue.

Brg

Damir

---

<div class="post-metadata">

**Author:** ![achojar](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@achojar](https://forums.toadworld.com/u/achojar)\
**Post date:** [December 6, 2013, 7:06am UTC](https://forums.toadworld.com/t/unable-to-re-create-packages-without-dropping-them-first/27911/4 "2013-12-06T07:06:45Z")

</div>

The same script works form SQL\*Plus. From TOAD neither F9 nor F5 keys work or give any error message. My Oracle version is “Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production” running on AIX. Maybe there is some TOAD setting that needs tweaking?

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [December 6, 2013, 7:14am UTC](https://forums.toadworld.com/t/unable-to-re-create-packages-without-dropping-them-first/27911/5 "2013-12-06T07:14:00Z")

</div>

> From TOAD neither F9 nor F5 keys work or give any error message

Then what did it do? How do you know it didn't work? Are you saying the F5 and F9 keys did nothing? If so, it sounds like the Editor is not connected to any database. Did you open the Editor before making your connection? Make the connection first, then open the Editor.

---

<div class="post-metadata">

**Author:** ![mstaszew](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mstaszew/32/23_2.png) [@mstaszew](https://forums.toadworld.com/u/mstaszew)\
**Post date:** [December 6, 2013, 7:55am UTC](https://forums.toadworld.com/t/unable-to-re-create-packages-without-dropping-them-first/27911/6 "2013-12-06T07:55:25Z")

</div>

Is Team Coding enabled on your database?

On 12/06/2013 10:07 AM, achojar wrote:

> **[RE: Unable to re-create packages without dropping them first](http://www.toadworld.com/products/toad-for-oracle/f/10/p/20899/42939.aspx#42939)**

> Reply by achojar  
> The same script works form SQL\*Plus. From TOAD neither F9 nor F5 keys work or give any error message. My Oracle version is "Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production" running on AIX. Maybe there is some TOAD setting that  
> needs tweaking?

> To reply, please reply-all to this email.
> 
> [Stop receiving emails](http://www.toadworld.com/products/toad-for-oracle/f/10/t/20899.aspx?subscribe=false) on this subject.
> 
> Or [  
> Unsubscribe from Toad for Oracle - General](http://www.toadworld.com/products/toad-for-oracle/f/10.aspx?subscribe=false) notifications altogether.
> 
> Toad for Oracle - Discussion Forum

> [Flag](http://www.toadworld.com/products/toad-for-oracle/f/10/p/20899/42939.aspx?AbuseContentId=5f4b1c2e-3027-4c06-9fb9-5ddce0a37441&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true)  
> this post as spam/abuse.

> ![](https://global.discourse-cdn.com/quest/original/3X/5/0/50b30fd5f87c85fe5cba2635cb83316ca71250d7.gif)

---

<div class="post-metadata">

**Author:** ![damir.vadas\_250](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/damir.vadas_250/32/37_2.png) [@damir.vadas\_250](https://forums.toadworld.com/u/damir.vadas_250)\
**Post date:** [December 9, 2013, 7:05am UTC](https://forums.toadworld.com/t/unable-to-re-create-packages-without-dropping-them-first/27911/7 "2013-12-09T07:05:15Z")

</div>

if he is not connected he cannot drop the package either … or he/she is drop package differently … or I’m missing something now …

🙂

However until we see the script no help …

---

<div class="post-metadata">

**Author:** ![achojar](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@achojar](https://forums.toadworld.com/u/achojar)\
**Post date:** [December 9, 2013, 11:26am UTC](https://forums.toadworld.com/t/unable-to-re-create-packages-without-dropping-them-first/27911/8 "2013-12-09T11:26:04Z")

</div>

Team coding was the problem. Once I un-installed it the issue got resolved.

---

<div class="post-metadata">

**Author:** ![Stephen.Beausang\_734](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stephen.Beausang\_734](https://forums.toadworld.com/u/Stephen.Beausang_734)\
**Post date:** [December 9, 2013, 11:44am UTC](https://forums.toadworld.com/t/unable-to-re-create-packages-without-dropping-them-first/27911/9 "2013-12-09T11:44:56Z")

</div>

It is possible that Team Coding was simply doing what it was designed to do. Most likely it might have been enough to ‘Check out’ the objects before attempting  
to edit them.

I am just adding this information, because uninstalling Team Coding could be a very blunt instrument to use if other users are on the system or the database  
is supposed to be controlled by Team Coding.

**From:** achojar [[mailto:bounce-achojar@toadworld.com](mailto:bounce-achojar@toadworld.com)]

**Sent:** Monday, December 09, 2013 2:26 PM

**To:** [toadoracle@toadworld.com](mailto:toadoracle@toadworld.com)

**Subject:** RE: [Toad for Oracle - Discussion Forum] Unable to re-create packages without dropping them first

**[RE: Unable to re-create packages without dropping them first](http://www.toadworld.com/products/toad-for-oracle/f/10/p/20899/42978.aspx#42978)**

Reply by achojar

Team coding was the problem. Once I un-installed it the issue got resolved.

To reply, please reply-all to this email.

[Stop receiving emails](http://www.toadworld.com/products/toad-for-oracle/f/10/t/20899.aspx?subscribe=false) on this subject.

Or [  
Unsubscribe from Toad for Oracle - General](http://www.toadworld.com/products/toad-for-oracle/f/10.aspx?subscribe=false) notifications altogether.

Toad for Oracle - Discussion Forum

[Flag](http://www.toadworld.com/products/toad-for-oracle/f/10/p/20899/42978.aspx?AbuseContentId=6002d126-c046-42ee-9242-439e1e97f271&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true)  
this post as spam/abuse.

![](http://gyk.r.mailjet.com/o/04j0/bc0f1bd5/2t77xrxe.gif)

---

<div class="post-metadata">

**Author:** ![achojar](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@achojar](https://forums.toadworld.com/u/achojar)\
**Post date:** [December 9, 2013, 12:27pm UTC](https://forums.toadworld.com/t/unable-to-re-create-packages-without-dropping-them-first/27911/10 "2013-12-09T12:27:40Z")

</div>

In this case I simply do not need Team Coding. I am working on my own development database with no other users but me using it.

Thanks for the information though.
