-
How to remove all object from a db
Hi Guys,
I have a database which contains tables with data, indexes, constraints, etc. Now i want to do two things.
(1). How can i remove all objects like tables,indexes,etc from my database so that i will get a clean database
(2). How can i remove all the objects except table. In this case i want to remove indexes,data,constraints,etc.
I need the script for both 1 & 2.
Immediate response is highly appreciated.
Best Regards,
Sudheer
-
1) drop the user
2) build scripts using dynamic SQL
go to tahiti.oracle.com
-
Drop user cascade
To all the users owning the objects you want to remove.
select owner, count(*)
from all_objects
group by owner
;
This query should give you a good idea of the number of objects that are owned by particualr schemas.
OCP 8i, 9i DBA
Brisbane Australia
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|