orcale导入数据语法

用户:nr
表空间:mdm_dat
--创建表空间
create tablespace NR --表空间
  datafile 'F:\Oracle\orcaleTablespace\nr' --文件路径
  size 20M --分配的表空间大小
  autoextend on;
create temporary tablespace NR_temp --临时表空间
  tempfile 'F:\Oracle\orcaleTablespace\NR_temp'  
  size 5m   
  autoextend on;
--创建用户并指定表空间
create user nr identified by nr  default  tablespace NR   temporary tablespace NR_temp;  
--给新建用户分配权限  
grant connect,resource,dba to nr ;
--给新建用户解锁
alter user nr account unlock ;
--dmp文件导入  doc下执行
imp nr/nr@orcl full=y file=D:\testDb.dmp ignore=y


exp Test/Test@8.8.8.8:1521/orcl file=C:\test.dmp log=C:\test.log owner=Test
exp nr/nr@orcl file=D:/sampleDB.dmp full=y ignore=y
exp nr/x8MiL9H2@172.22.33.197:1521/mzzw file=./nr.dmp full=y ignore=y
exp nr/nr@127.0.0.1:1521/orcl file=D:\nr.dmp full=y ignore=y
exp nr/x8MiL9H2@172.22.33.197:1521/mzzw file=./nr.dmp  log=./test.log owner=nr 

create tablespace eova datafile 'D:\tableSpace\eova.dbf' size 1024M 
autoextend on extent management local segment space management auto;

create tablespace main datafile 'D:\tableSpace\main.dbf' size 1024M 
autoextend on extent management local segment space management auto;

CREATE USER eova PROFILE "DEFAULT" IDENTIFIED BY eova DEFAULT TABLESPACE eova TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;

CREATE USER main PROFILE "DEFAULT" IDENTIFIED BY main DEFAULT TABLESPACE main TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;

grant dba to eova;

grant dba to main;

-----------------------------例子
create tablespace newccbiz datafile 'D:\tableSpace\newccbiz.dbf' size 1024M 
autoextend on extent management local segment space management auto;

create tablespace ccbiz datafile 'D:\tableSpace\ccbizp.dbf' size 1024M 
autoextend on extent management local segment space management auto;
--删除表空间
--drop tablespace newccbiz including contents and datafiles;  
 
 
CREATE USER ccbiz PROFILE "DEFAULT" IDENTIFIED BY ccbiz DEFAULT TABLESPACE ccbiz TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;

CREATE USER newccbiz PROFILE "DEFAULT" IDENTIFIED BY newccbiz DEFAULT TABLESPACE newccbiz TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
 
grant dba to ccbiz;

grant dba to newccbiz;

drop user newccbiz cascade;
------------------------------game
create tablespace NEWCCBIZZ datafile 'D:\tableSpace\NEWCCBIZZ.dbf' size 1024M 
autoextend on extent management local segment space management auto;

CREATE USER newccbiz PROFILE "DEFAULT" IDENTIFIED BY newccbiz DEFAULT TABLESPACE newccbizz TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;

grant dba to newccbiz;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值