Immersion In Data

SharePlex

[SharePlex] Datapump를 활용한 초기적재

sungjunminn 2024. 2. 27. 13:39

1. 디렉토리 생성(Source/Target)

sqlplus / as sysdba
SQL> create directory splex as '/home/splex/';

 

2. splex 유저에게 splex 디렉토리 권한 부여(Source/Target)

SQL> grant read, write on directory splex to splex;

 

3. stop post(Target)

sp_ctrl (sgdb12c2:2100)> stop post
sp_ctrl (sgdb12c2:2100)> show

 

4. qstatus 확인

sp_ctrl (sgdb12c2:2100)> qstatus

 

5. scn 채번

SQL> select current_scn from v$database;

채번해서 나오는 숫자를 기록

※ 숫자가 ######## 와 같은 식으로 이상하게 나오는 경우 col current_scn for 9999999999999999 와 같은 식으로 확인

 

6. expdp/impdp

※ oracle 유저 splex 디렉토리 권한 확인, 소스/타겟의 오라클 버전 확인

  • expdp
SQL> expdp splex/splex directory=splex tables=splex.test dumpfile=dump.dmp logfile=dump.log flashback_scn=숫자
  • impdp
SQL> impdp splex/splex directory=splex dumpfile=dump.dmp logflie= dujmp.log  table_exists_action=TRUNCATE

 

7. reconcile(Target)

sp_ctrl (sgdb12c2:2100)> reconcile queue P01 for o.sgdb19c-o.sgdb12c2 scn 숫자+1

 

8. event log 확인

# splog
# vi evnet_log

 

※ 타겟에서 reconcile 프롬프트가 안떨어질 경우 소스에서 flush 실행

sp_ctrl (sgdb19c:2100)> flush o.sgdb19c queue P01

 

9. start post

sp_ctrl (sgdb12c2:2100)> start post
sp_ctrl (sgdb12c2:2100)> qstatus -- backlog 확인

 

10. compare 로 소스/타겟 확인

 

 

'SharePlex' 카테고리의 다른 글

[SharePlex] Parameter 정리  (0) 2024.05.02
[SharePlex] ORA-650, ORA-01031  (0) 2024.05.02
[SharePlex] EDB16 to EDB16  (1) 2024.01.10
[SharePlex] Oracle19c to Oracle19c  (1) 2023.12.08
[SharePlex] SharePlex Migration  (0) 2023.12.07