Toad World® Forums

Deleting objects


#1

I am deleting more than 1000 objects (triggers and packages)

Using “find Objects” I found out the objects I want to delete. Select all
Delete key : “Are you sure…?” Yes
deletes some few objects and stops
I tried several times

Output console

18:53:38 Start Dropping 1009 object(s) …
18:53:38 Executing DROP PACKAGE a0 …
18:53:38 Dropped successfully
18:53:38 Executing DROP PACKAGE b0 …
18:53:38 Dropped successfully
18:53:38 Executing DROP PACKAGE b1 …
18:53:38 Dropped successfully
18:53:38 Executing DROP PACKAGE c0 …
18:53:38 Dropped successfully
18:53:38 Executing DROP PACKAGE c1 …
18:53:39 Dropped successfully
18:53:39 Executing DROP PACKAGE c2 …
18:53:39 Dropped successfully
18:53:39 Executing DROP PACKAGE c3 …
18:53:39 Dropped successfully
18:53:39 Executing DROP PACKAGE c4 …
18:53:39 Dropped successfully
18:53:39 Executing DROP PACKAGE c6 …
18:53:39 Dropped successfully
18:53:39 Executing DROP PACKAGE c7 …
18:53:39 Dropped successfully
18:53:39 Executing DROP PACKAGE c8…
18:53:39 Dropped successfully
18:53:39 Executing DROP PACKAGE c9 …
18:53:40 Dropped successfully
18:53:40 Executing DROP PACKAGE c10 …
18:53:40 Dropped successfully
18:53:40 End Dropping 1009 object(s)
18:54:08 Start Dropping 995 object(s) …
18:54:08 Executing DROP PACKAGE XPTO …
18:54:08 Dropped successfully
18:54:08 Executing DROP PACKAGE XPTO1 …
18:54:08 Dropped successfully
18:54:08 End Dropping 995 object(s)
18:56:34 Start Dropping 993 object(s) …
18:56:34 End Dropping 993 object(s)

Filipe


#2

I happens also when selecting few (less than 20) packages and bodys.
These packages has a $ sign in the name. Could that be the origin of this ?


#3

Hi Filipe,

I tested with 20 dummy packages and bodies (names contain $) but they were all dropped without any issue. I did notice that the result pane in Find Objects was not updated correctly. Some of the objects disappeared from the list but some were still in there. However, when I clicked the Search button again, it clearly showed that all objects have been dropped.

Gwen


#4

Hi Gwen
Sometimes I also get that…the refresh is not made.
But in this case the objects were not deleted …normally it gives back the control to the user only after some tables …can it maybe be deleting in the background?

I will try to repeat the issue in another DB tomorrow

Filipe


#5

Hi

With task manager I managed :slight_smile: to find out part of the problem.
It deletion stop if it cannot find some of the objects
“Oracle Dictionary: PACKAGE BODY user1.xpto not found”

As Gwen said the Find Objects is not always correct…and searching again can fix some …but not all

My suggestion would be to bypass the objects that were not found or at least dot saying that it deleted all those objects when it’s not true and report the error in the console and not only in the taskmanager.

One of the reasons an objects is not found is that it was deleted with another one (like indexes together with a table)…I did not find out the reason for the packages

(tried with Build 1332)

Filipe


#6

It does make sense but I can’t still reproduce it. It always deletes the indexes first before deleting the tables so I couldn’t replicate your case.

Gwen


#7

Hi Gwen

I found out that when dropping objects with diferent types I have sometimes that problem.

My recent case was: dropping packages and bodys that started with a string (‘TEST’)

if I selected all the objects it would not drop all…but I selected only the packages (spec) and it worked. I tried to drop 2 packages having selected both the spec and body (of both) and it didn’t work.
As I told you before it seems that when the program finds an object that doesn’t exists due to a previous drop (the body is automatically dropped with the drop of the spec) the program stops.

Regards

Filipe


#8

Hi Fillipe,

You’re right. I manage to reproduce it this time now. I will raise a bug. Thanks

Gwen


#9

Hi Gwen

I think that it was not aimed to 6.2, right?
(It still happens with the last build)

Regards

Filipe


#10

That’s right. This bug has been targeted for 6.3.

Gwen