drop user ORACLE1 cascade;
drop tablespace ORACLE1 including contents and datafiles cascade constraints;
CREATE TABLESPACE ORACLE1
LOGGING
DATAFILE 'E:\app\yanghongjie\oradata\oracle\ORACLE1.DBF' SIZE 500M
AUTOEXTEND ON NEXT 100M MAXSIZE 10G
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;
CREATE USER ORACLE1
PROFILE DEFAULT
IDENTIFIED BY ORACLE1
DEFAULT TABLESPACE ORACLE1
TEMPORARY TABLESPACE TEMP
QUOTA UNLIMITED ON ORACLE1
ACCOUNT UNLOCK;
ALTER USER ORACLE1 DEFAULT ROLE ALL;
GRANT CONNECT,
CREATE PROCEDURE,
CREATE TRIGGER,
ANALYZE ANY,
CREATE TYPE,
SELECT ANY DICTIONARY,
CREATE VIEW,
CREATE SEQUENCE
TO ORACLE1;
GRANT ALTER ANY TABLE TO ORACLE1;
GRANT DROP ANY TABLE TO ORACLE1;
GRANT DELETE ANY TABLE TO ORACLE1;
GRANT SELECT ANY TABLE TO ORACLE1;
GRANT INSERT ANY TABLE TO ORACLE1;
GRANT CREATE ANY TABLE TO ORACLE1;
GRANT CREATE TYPE TO ORACLE1;
GRANT CREATE PUBLIC DATABASE LINK TO ORACLE1;
GRANT DROP PUBLIC DATABASE LINK TO ORACLE1;
GRANT DBA TO ORACLE1;
create directory DR_DBIMP as 'D:\DR_DBIMP';
Grant read,write on directory DR_DBIMP to ORACLE1;
impdp ORACLE1/ORACLE1@Instance directory=DR_DBIMP DUMPFILE=filename.DMP LOGFILE=filename.log REMAP_SCHEMA=(ORIGINALNAME:ORACLE1) REMAP_TABLESPACE=(ORIGINALNAME:ORACLE1)
drop tablespace ORACLE1 including contents and datafiles cascade constraints;
CREATE TABLESPACE ORACLE1
LOGGING
DATAFILE 'E:\app\yanghongjie\oradata\oracle\ORACLE1.DBF' SIZE 500M
AUTOEXTEND ON NEXT 100M MAXSIZE 10G
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;
CREATE USER ORACLE1
PROFILE DEFAULT
IDENTIFIED BY ORACLE1
DEFAULT TABLESPACE ORACLE1
TEMPORARY TABLESPACE TEMP
QUOTA UNLIMITED ON ORACLE1
ACCOUNT UNLOCK;
ALTER USER ORACLE1 DEFAULT ROLE ALL;
GRANT CONNECT,
CREATE PROCEDURE,
CREATE TRIGGER,
ANALYZE ANY,
CREATE TYPE,
SELECT ANY DICTIONARY,
CREATE VIEW,
CREATE SEQUENCE
TO ORACLE1;
GRANT ALTER ANY TABLE TO ORACLE1;
GRANT DROP ANY TABLE TO ORACLE1;
GRANT DELETE ANY TABLE TO ORACLE1;
GRANT SELECT ANY TABLE TO ORACLE1;
GRANT INSERT ANY TABLE TO ORACLE1;
GRANT CREATE ANY TABLE TO ORACLE1;
GRANT CREATE TYPE TO ORACLE1;
GRANT CREATE PUBLIC DATABASE LINK TO ORACLE1;
GRANT DROP PUBLIC DATABASE LINK TO ORACLE1;
GRANT DBA TO ORACLE1;
create directory DR_DBIMP as 'D:\DR_DBIMP';
Grant read,write on directory DR_DBIMP to ORACLE1;
impdp ORACLE1/ORACLE1@Instance directory=DR_DBIMP DUMPFILE=filename.DMP LOGFILE=filename.log REMAP_SCHEMA=(ORIGINALNAME:ORACLE1) REMAP_TABLESPACE=(ORIGINALNAME:ORACLE1)