创建表空间及用户
create tablespace oracledbf
datafile 'd:\app\zhoulx\oradata\bdc\oracledbf.dbf' size 100m autoextend on next 20m maxsize unlimited -- 这里是你设置数据库存放的地方,可以自己选定位置
permanent
default storage(initial 64k minextents 1 maxextents 2147483645)
minimum extent 64k
logging
online
/
create user oracledbf identified by salis default tablespace oracledbf temporary tablespace temp;
/
grant dba to oracledbf with admin option
/
grant select any dictionary to oracledbf with admin option
/
grant select any sequence to oracledbf with admin option
/
grant select any table to oracledbf with admin option
/
grant select any transaction to oracledbf with admin option
/
grant unlimited tablespace to oracledbf with admin option
/
grant create session,resource to oracledbf with admin option
/
grant create any view to oracledbf
/
数据泵导入
查询目录
select * from dba_directories
创建目录
create directory database as 'e:\database' --这一步可以忽略
--------------------------------------------------------------------------------------------------------
这一步在命令行输入
导入
impdp oracleuser/oracleuserpassword@oracle地址(例如:127.0.0.1) directory='e:\database' dumpfile=oracledbf.dmp schemas=oracledbf -- e:\database 是你存放dbf文件的位置
--imp oracleuser/oracleuserpassword@oracle地址(例如:127.0.0.1) directory='e:\database' dumpfile=oracledbf.dmp schemas=oracledbf -- e:\database 是你存放dbf文件的位置
导出
expdp oracleuser/oracleuserpassword@oracle地址(例如:127.0.0.1)directory='e:\database' dumpfile=oracledbf.dmp schemas=oracledbf -- e:\database 是你存放dbf文件的位置
--exp oracleuser/oracleuserpassword@oracle地址(例如:127.0.0.1)directory='e:\database' dumpfile=oracledbf.dmp schemas=oracledbf -- e:\database 是你存放dbf文件的位置
---------------------------------------------------------------------------------------------------------
删除用户再创建
drop user oracledbf cascade;
/
create user oracledbf identified by salis default tablespace oracledbf temporary tablespace temp;
/
grant dba to oracledbf with admin option
/
grant select any dictionary to oracledbf with admin option
/
grant select any sequence to oracledbf with admin option
/
grant select any table to oracledbf with admin option
/
grant select any transaction to oracledbf with admin option
/
grant unlimited tablespace to oracledbf with admin option
/
grant create session,resource to oracledbf with admin option
/
grant create any view to oracledbf
/
如对本文有疑问, 点击进行留言回复!!
Oracle 基本概念 Dadabase,schema,user,table...
dbeaver连接Oracle中文乱码的解决方案--druid
Oracle常用语句(时间格式、去重、去特殊符号、查询表空间等)
Navicate 如何导出数据库中的存储过程、事件、视图等?
每日一记:Oracle升级2020年4月份的数据库补丁Database Patch Set Update : 11.2.0.4.200414 (30670774)
网友评论