ORACLE-删除及创建新用户及表空间

完全删除一个老的user及表空间

DROP USER username CASCADE;
DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND DATAFILES;
# DROP TABLESPACE tablespace_name;
alter database datafile 'v$datafile/tablespace_name.dbf' offline drop;

创建新的user及表空间

CREATE TABLESPACE username DATAFILE 'v$datafile/tablespace_name.dbf' SIZE 200M AUTOEXTEND ON NEXT 100M MAXSIZE 10240M EXTENT MANAGEMENT LOCAL;
CREATE USER username IDENTIFIED BY passwd DEFAULT TABLESPACE tablespace_name;
grant connect,resource to username;
grant unlimited tablespace to username;
grant create database link to username;
grant select any sequence,create materialized view to username;

备注:
ORA-00950: invalid DROP option
ORA-02142: missing or invalid ALTER TABLESPACE option
ORA-01543: tablespace ‘tablespace_name’ already exists
ORA-01109: database not open
ORA-01516: nonexistent log file, data file, or temporary file
ORA-01157: cannot identify/lock data file 8 - see DBWR trace file
ORA-01116: error in opening database file 8
ORA-01110: data file 8: ‘tablespace_name.dbf’
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

xieet_0

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值