Removing a tablespace & its associated datafiles [message #465007] |
Mon, 12 July 2010 02:41 |
reym21
Messages: 241 Registered: February 2010 Location: Philippines
|
Senior Member |
|
|
Due to improper documentations of a certain project, I need to drop a DEFAULT tablespace of a newly created instance including it's associated datafiles by using this command:
"DROP TABLESPACE <tablespace name> INCLUDING CONTENTS AND DATAFILES;"
The default tablespace name is QWER (qwer01.dbf) and I added 2 datafiles in it, re: OPD_SML01.dbf & EXYT_SML01.dbf.
Do I have to do it online or offline?
Many thanks.
|
|
|
Re: Removing a tablespace & its associated datafiles [message #465009 is a reply to message #465007] |
Mon, 12 July 2010 02:53 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Why not try it?
jw> create tablespace jts datafile size 2m;
Tablespace created.
jw> alter database default tablespace jts;
Database altered.
jw> drop tablespace jts including contents and datafiles;
drop tablespace jts including contents and datafiles
*
ERROR at line 1:
ORA-12919: Can not drop the default permanent tablespace
jw> alter database default tablespace users;
Database altered.
jw> drop tablespace jts including contents and datafiles;
Tablespace dropped.
[Edit MC: it is useless to post your typo in statement, remove these lines when you post]
[Updated on: Mon, 12 July 2010 03:00] by Moderator Report message to a moderator
|
|
|