Oracle 导入DBF故障存储文件
创建表空间及用户
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
/