創建表空間及用戶CREATE TABLESPACE OracleDBFDATAFILE 'D:\app\zhoulx\oradata\bdc\OracleDBF.DBF' SIZE 100M AUTOEXTEND ON NEXT 20M MAXSIZE UNLIMITED -- 這裡是你設置資料庫存 ...
創建表空間及用戶
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
/