如何在Oracle 10中删除包括所有表空间和数据文件的用户 [英] How to delete a user in Oracle 10 including all it's tablespace and datafiles
问题描述
当我给出删除用户的命令时,即DROP USER'username'级联,
When I give the command to drop a user i.e. DROP USER 'username' cascade,
-
是否删除该特定用户使用的所有表空间和数据文件.
Does it deletes all the tablespace and datafiles used by that particular user.
如果没有,删除该特定用户使用的所有表空间/数据文件/磁盘空间的命令是什么.
If not, what is the command to delete all the tablespace / datafiles / disk space that were used by that particular user.
推荐答案
删除用户后,您需要针对每个相关表空间使其脱机并删除.例如,如果您有一个名为"SAMPLE"的用户以及两个名为"SAMPLE"和"SAMPLE_INDEX"的表空间,则需要执行以下操作:
After dropping the user, you need to, for each related tablespace, take it offline and drop it. For example if you had a user named 'SAMPLE' and two tablespaces called 'SAMPLE' and 'SAMPLE_INDEX', then you'd need to do the following:
DROP USER SAMPLE CASCADE;
ALTER TABLESPACE SAMPLE OFFLINE;
DROP TABLESPACE SAMPLE INCLUDING CONTENTS;
ALTER TABLESPACE SAMPLE_INDEX OFFLINE;
DROP TABLESPACE SAMPLE_INDEX INCLUDING CONTENTS;
这篇关于如何在Oracle 10中删除包括所有表空间和数据文件的用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!