How to remove all object from a db
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.
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(*)
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
Click Here to Expand Forum to Full Width