Oracle 整理知识点

@echo on
;删除已经存在的表空间,用户

-----------------------------------------------------------
先要连接数据库:才能新建表空间(或删除原有表空间后再新建)

sqlplus system/kingwin@orcl


--------------------------------------------------------------
删除原有表空间 慎用

drop tablespace kingwin including contents and datafiles;

drop tablespace kingwin_temp including contents and datafiles;

drop user kingwin cascade;


删除后,数据库原文件可能还没有删除干净,需要进入数据库目录手工删除了才能新建表空间
--------------------------------------------------------------

;新建空白表空间 ,用户
create tablespace kingwin
    datafile 'F:\oracle\product\10.2.0\oradata\orcl\kingwin.dbf'
    size 50M
    reuse
    autoextend on
    next 20M
    maxsize unlimited; 

create temporary tablespace kingwin_temp
    tempfile 'F:\oracle\product\10.2.0\oradata\orcl\kingwin_temp.dbf'
    size 50M
        autoextend on
    next 50M
    maxsize 8000M;  

create user kingwin
    identified by kingwin
    default tablespace kingwin
    temporary tablespace kingwin_temp
    quota unlimited on kingwin; 

grant Connect,resource to kingwin;

--------------------------------------------------------------

quit

;导入数据库
imp

kingwin 
kingwin
e:\oracle_HOA\20100417new_hoa.dmp


导入某一个表格式:
imp 用户名/密码@orcl file=路径/xx.dmp tables=DB0xxx


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

纯洁的明依

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

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

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

打赏作者

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

抵扣说明:

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

余额充值