Oracle表空间操作

tech2023-01-22  50

先cmd登录oracle: sqlplus / as sysdba

1. 查询表空间的名称:

select tablespace_name,file_id,file_name,round(bytes / (1024*1024),0) total_space from dba_data_files order by tablespace_name;

2. 创建表空间:

create tablespace c8 datafile 'D:\ORACLE\APP\ORACLE\ORADATA\XE\C8.DBF' size 2000M;

create user c8 identified by 111222 default tablespace c8;

grant dba to c8;

3.删除表空间:

drop user c8 cascade;

drop tablespace c8 including contents and datafiles;

4.修改表空间,增大空间容量

alter database datafile 'D:\ORACLE\APP\ORACLE\ORADATA\XE\C8.DBF' resize 3000M;

 

最新回复(0)