oracle创建表空间
注意点:
1.如果在PL/SQL 等工具里打开的话,直接修改下面的代码中[斜体加粗部分]执行
2.确保路径存在,比如【D:oracleoradataOracle9i】也就是你要保存文件的路径存在
/*分为四步 */
/*第1步:创建临时表空间 */
create temporary tablespace loacldwgl_temp
tempfile 'F:appAdministratororadataorclloacldwgl_temp.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
/*第2步:创建数据表空间 */
create tablespace loacldwgl_data
logging
datafile 'F:appAdministratororadataorclloacldwgl_data.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
/*第3步:创建用户并指定表空间 */
create user loacldwgl identified by loacldwgl
default tablespace loacldwgl_data
temporary tablespace loacldwgl_temp;
/*第4步:给用户授予权限 */
grant connect,resource,dba to loacldwgl;
删除用户(加cascade的话,这样连用户自己创建的表也一起删除,如果不加就只是删除当前用户)
drop user yuge cascade;
删除表空间(drop tablespace baicheng including contents and datafiles;连带BAICHENG.DBF文件一起删除)
drop tablespace dwgl_data including contents and datafiles;
drop user dwgl cascade;
drop tablespace DWGL_DATA including contents and datafiles;
drop tablespace dwgl_temp including contents and datafiles;