Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Redo a Tablespace
Well, you are doing a bit more than I would ( I wouldn't do #1 or 2) but
it's pretty good, with a few comments:
#4 - are you SURE that that user only has tables in that tablespace? #5 - are you SURE that no one else has tables (or indexes!) in that tablespace?
I would not drop the user, but if there are no other objects in that tablespace, I'd merely
alter tablespace <tablespace name> offline;
and then
drop tablespace <tablespace name> including contents;
you WILL have to delete the datafile, Oracle doesn't do that for you.
again, I wouldn't drop the user so I wouldn't need to create the user and I wouldn't take the database access away so I wouldn't need to let everyone back in.
If you are able to take the database away from people for the length of time that it will take to do all that you want, go for it, it's safer to do the backup and restrict access. But you don't have to
Rachel
>From: "Burton, Laura L." <BurtonL_at_prismplus.com>
>Reply-To: ORACLE-L_at_fatcity.com
>To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
>Subject: Redo a Tablespace
>Date: Mon, 13 Nov 2000 14:36:27 -0800
>
>I want to delete a tablespace that is already in use (contains tables) and
>rebuild it. Would someone please look at the steps I am going to take and
>offer advice if you see a problem?
>
> 1. Shutdown database and back it up (datafiles, redo, archive, etc)
> 2. Restart database ... maybe exclusive to keep others off
> 3. Export user (which only has tables on the tablespace I want to
>delete)
> 4. Drop user cascade
> 5. Drop tablespace
> 6. Delete datafile file from disk (if the drop tablespace takes care of
>this then I'll go to step 7)
> 7. Create tablespace with new info
> 8. Create user
> 9. Import user
>10. Alter database for everyone's use
>
>Thank you in advance.
>
>Laura
Share information about yourself, create your own public profile at Received on Mon Nov 13 2000 - 17:07:22 CST