PDA

View Full Version : recreating a DB


innerebner
09-29-2004, 01:58 AM
Hello,

I want to know, how it is possible to recreate an existing DB.
(oracle9i). The stored tables in this db should also be deleted.

When i try to create an existing database I get an error message that
this db already exists.

can somebody help me please

regards Markus Innerebner

Jan Gelbrich
09-29-2004, 03:19 AM
"innerebner" <markusin@yahoo.de> schrieb im Newsbeitrag
news:2rvfc8F1e9p4mU1@uni-berlin.de... Hello, I want to know, how it is possible to recreate an existing DB. (oracle9i). The stored tables in this db should also be deleted. When i try to create an existing database I get an error message that this db already exists. can somebody help me please regards Markus Innerebner

Markus,

maybe You confuse DB with Schema. In MySQL it means the same, in Oracle not.
There is AFAIK no purpose to recreate an Oracle DB.
You seem to want to purge a Schema (with tables and all the contents).
Just create another Schema (that is: another User with tablespace quota and
the appropriate priviliges)
and "re"create the tables there.

This is all I can give You from my Crystal Ball.

Next time You post, please:
Your version (9i R? or patch level), OS, and most important:
Your background and target.

HTH, Jan

innerebner
09-29-2004, 04:56 AM
maybe You confuse DB with Schema. In MySQL it means the same, in Oracle not. There is AFAIK no purpose to recreate an Oracle DB. You seem to want to purge a Schema (with tables and all the contents). Just create another Schema (that is: another User with tablespace quota and the appropriate priviliges) and "re"create the tables there.

exactly, this is what I wanna do. After purging the Schema.
If I still want reuse the same Schema name, do I need to drop the user
and then (re)create him, or is there another way?

(oracle 9i, os Linux)

thanks

Markus

Sybrand Bakker
09-29-2004, 12:48 PM
On Wed, 29 Sep 2004 14:56:21 +0200, innerebner <markusin@yahoo.de>
wrote:
maybe You confuse DB with Schema. In MySQL it means the same, in Oracle not. There is AFAIK no purpose to recreate an Oracle DB. You seem to want to purge a Schema (with tables and all the contents). Just create another Schema (that is: another User with tablespace quota and the appropriate priviliges) and "re"create the tables there.exactly, this is what I wanna do. After purging the Schema.If I still want reuse the same Schema name, do I need to drop the userand then (re)create him, or is there another way?(oracle 9i, os Linux)thanksMarkus

drop user ... cascade;

create user ...



--
Sybrand Bakker, Senior Oracle DBA


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service