- complete
: database 전체를 export- incremental
: database 전체를 export한 이후에 변경된 부분만 export- cumulative
: 변경된 부분만 누적해서 export
[oracle@ora19c ~]$ export ORACLE_SID=ORA19
[oracle@ora19c ~]$
[oracle@ora19c ~]$ exp full=y file=complete01.dmp inctype=complete
create tablespace hrts
datafile '/u01/app/oracle/oradata/ORA19/hrts01.dbf' size 500m;
alter session set nls_Date_format='RR/MM/DD';
drop table emp;
drop table dept;
CREATE TABLE DEPT
(DEPTNO number(10),
DNAME VARCHAR2(14),
LOC VARCHAR2(13) )
tablespace hrts;
INSERT INTO DEPT VALUES (10, 'ACCOUNTING', 'NEW YORK');
INSERT INTO DEPT VALUES (20, 'RESEARCH', 'DALLAS');
INSERT INTO DEPT VALUES (30, 'SALES', 'CHICAGO');
INSERT INTO DEPT VALUES (40, 'OPERATIONS', 'BOSTON');
CREATE TABLE EMP (
EMPNO NUMBER(4) NOT NULL,
ENAME VARCHAR2(10),
JOB VARCHAR2(9),
MGR NUMBER(4) ,
HIREDATE DATE,
SAL NUMBER(7,2),
COMM NUMBER(7,2),
DEPTNO NUMBER(2) )
tablespace hrts;
INSERT INTO EMP VALUES (7839,'KING','PRESIDENT',NULL,'81-11-17',5000,NULL,10);
INSERT INTO EMP VALUES (7698,'BLAKE','MANAGER',7839,'81-05-01',2850,NULL,30);
INSERT INTO EMP VALUES (7782,'CLARK','MANAGER',7839,'81-05-09',2450,NULL,10);
INSERT INTO EMP VALUES (7566,'JONES','MANAGER',7839,'81-04-01',2975,NULL,20);
INSERT INTO EMP VALUES (7654,'MARTIN','SALESMAN',7698,'81-09-10',1250,1400,30);
INSERT INTO EMP VALUES (7499,'ALLEN','SALESMAN',7698,'81-02-11',1600,300,30);
INSERT INTO EMP VALUES (7844,'TURNER','SALESMAN',7698,'81-08-21',1500,0,30);
INSERT INTO EMP VALUES (7900,'JAMES','CLERK',7698,'81-12-11',950,NULL,30);
INSERT INTO EMP VALUES (7521,'WARD','SALESMAN',7698,'81-02-23',1250,500,30);
INSERT INTO EMP VALUES (7902,'FORD','ANALYST',7566,'81-12-11',3000,NULL,20);
INSERT INTO EMP VALUES (7369,'SMITH','CLERK',7902,'80-12-09',800,NULL,20);
INSERT INTO EMP VALUES (7788,'SCOTT','ANALYST',7566,'82-12-22',3000,NULL,20);
INSERT INTO EMP VALUES (7876,'ADAMS','CLERK',7788,'83-01-15',1100,NULL,20);
INSERT INTO EMP VALUES (7934,'MILLER','CLERK',7782,'82-01-11',1300,NULL,10);
commit;
select t.name, d.enabled
from v$tablespace t, v$datafile d
where t.ts# = d.ts#;
alter tablespace hrts read only;
select t.name, d.enabled
from v$tablespace t, v$datafile d
where t.ts# = d.ts#;
[oracle@ora19c ~]$ ora19
ORA19
[oracle@ora19c ~]$ exp transport_tablespace=y tablespaces=hrts file=hrts.dmp
Export: Release 19.0.0.0.0 - Production on 목 9월 11 16:34:33 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
사용자명: sys as sysdba
비밀번호:
[oracle@ora19c ~]$ cp /u01/app/oracle/oradata/ORA19/hrts01.dbf /home/oracle/hrts01.dbf
[oracle@ora19c ~]$ ls -l hrts01.dbf
-rw-r-----. 1 oracle oinstall 524296192 9월 11 16:36 hrts01.dbf
[oracle@ora19c ~]$ ls -l hrts.dmp
-rw-r--r--. 1 oracle oinstall 57344 9월 11 16:34 hrts.dmp
[oracle@ora19c ~]$ sysdw
SQL*Plus: Release 19.0.0.0.0 - Production on 목 9월 11 16:38:24 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
다음에 접속됨:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SYS @ ora19dw > drop user hr cascade;
사용자가 삭제되었습니다.
SYS @ ora19dw > create user hr identified by hr;
사용자가 생성되었습니다.
SYS @ ora19dw > grant dba to hr;
권한이 부여되었습니다.
SYS @ ora19dw > exit;
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0에서 분리되었습니다.
[oracle@ora19c ~]$ echo $ORACLE_SID
ora19dw
[oracle@ora19c ~]$ imp transport_tablespace=y file=hrts.dmp datafiles='/home/oracle/hrts01.dbf'
Import: Release 19.0.0.0.0 - Production on 목 9월 11 16:40:08 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
사용자 이름: sys as sysdba
비밀번호:
다음에 접속됨: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
.
.
.
. SYS 객체를 SYS(으)로 임포트하는 중입니다
경고와 함께 임포트가 정상 종료되었습니다.