Re: Remove everything from a schema
Date: Mon, 1 Dec 2008 17:28:12 -0800 (PST)
On Nov 27, 4:33 am, "Álvaro G. Vicario"
> I want to remove all the contents of a schema (tables, indexes,
> sequences...) in my development box so I can checkout a fresh working
> copy of the web site I'm working on and generate all objects from
> scratch. The server runs version 126.96.36.199.0 in a separate network machine
> and I'd rather not ask the DBA to do it for me every time.
> What's the easiest way to do it?
> --http://alvaro.es- Álvaro G. Vicario - Burgos, Spain
> -- Mi sitio sobre programación web:http://bits.demogracia.com
> -- Mi web de humor al baño María:http://www.demogracia.com
Michel's script is pretty trick. Another option might be to ask the DBA to create you a package with the drop user cascade and add user just for you. But if there are others it may reduce his workload for them, too. Suggestions like that presented properly can help DBA/ developer relations.
For myself, I like to work on the server, partly because I can run stuff like this as scripts, the scripts tend to pick up most modifications the vendors make, and the drop user followed by a tablespace coalesce makes sure I don't leave wasted space about - be sure you are using locally managed tablespaces, anyways. I worry when I see things like 188.8.131.52.0.
-- @home.com is bogus. http://paulgraham.com/artistsship.htmlReceived on Mon Dec 01 2008 - 19:28:12 CST