oracle 删除表空间(tablespace)及数据文件的方法

8266 2025-09-11 07:45:11
– 创建表空间; Create tablespace xihu datafile ‘d:\oracleDB\xihu.dbf’ Size 100M AutoExtend on Next 10M select tablespace_name from dba_tablespaces; select tablespace_name from user

– 创建表空间;

Create tablespace xihu

datafile ‘d:\oracleDB\xihu.dbf’

Size 100M

AutoExtend on

Next 10M

select tablespace_name from dba_tablespaces;

select tablespace_name from user_tablespaces;

select * from all_users;

oracle 删除表空间(tablespace)及文件的方法

一、drop user xxxx cascade;

二、drop tablespace xxxx including contents and datafiles

1.首先看一下是不是已经使用了OMF

sql>show parameter db_create

查看参数db_create_file_dest,如果已经设置

则:drop tablespace tablespacename 就可以直接删除表空间以及相应的数据文件

2.如果没使用OMF,则:

drop tablespace tablespacename including contents and datafiles

百家号新手写什么好?怎么写文章?|NI DAQmx驱动的详细安装步骤