oracle日常命令(持续更新)

越是薄弱,越要勇敢面对

干了这行都快两年半了,一直知道自己的薄弱点是什么,但是都没有系统得去加强这方面,每个人都有不足的地方,就是要面对不足,才会变的更完美,之前在学校学过mysql,sql sever, oracle等数据库,上家公司都是用得MySQL,不过现在主要做得银行项目,就用到了oracle,就方便之余把经常用得oracle操作记录下来,方便以后需要得时候查找

1.oracle创建用户及表空间

-- 先登陆数据库
sqlplus / as sysdba
-- 创建临时表空间
create temporary tablespace "表空间名" tempfile '/oradata/orcl/fms_test_temp.dbf' size 200M;
-- 创建数据表空间
create tablespace "表空间名" datafile '/oradata/oracl/fms_test_data.dbf' size 200M autoextend on next 200M maxsize 10G;
-- 创建用户并设定表空间
create user fms_test identified by fms_test default tablespace fms_test_data temporary tablespace fms_test_temp;

2.oracle 导入导出命令

-- 首先创建dump路径
create directory fms_test_dump as '/oradata/dumo';
-- 赋予读写权限给用户
grant read, write on directory fms_test_dump to fms_test;
-- 导出 dump
expdp \'/ as sysdba\' directory=fms_test_dump dumpfile=fms_test.dmp schemas=fms_test compression=all
-- 导入 dump
impdp \'/ as sysdba\' directory=fms_test_dump dumpfile=fms_test.dmp remap_schema=fms_test:fms_test2
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值