ORACLE Tip2011. 5. 19. 02:42

두 DB간 버전이 틀리면 다음과 같은 오류가 발생함.

IMP-00010(not a valid export file, header failed verification)

이경우 10g의 데이터를 9i에 넣을수가 없기 때문에
9i에서 10g로 접속하여 파일을 export받으면 된다.

방법은 9i 서버의 tnsnames.ora 파일에 10g 서버의 정보를 넣은후
9i 서버에서 아래와 같이 실행하면 된다.

exp userid/passwd@10g_tns_info

example : 9i 서버에서 10g로 접속해 특정 테이블(T_MS_ALBUM_TMP) 를 받는 예제.

exp 10g_userid/10g_passwd@DMO_DEV_DB
Export: Release 9.2.0.6.0 - Production on Thu May 19 01:24:53 2011
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Enter array fetch buffer size: 4096 >
Export file: expdat.dmp > T_MS_ALBUM_TMP.dmp
(2)U(sers), or (3)T(ables): (2)U > 3
Export table data (yes/no): yes >
Compress extents (yes/no): yes >
Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
Table(T) or Partition(T:P) to be exported: (RETURN to quit) > T_MS_ALBUM_TMP
. . exporting table                 T_MS_ALBUM_TMP       228780 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
Table(T) or Partition(T:P) to be exported: (RETURN to quit) >
Export terminated successfully with warnings.


9i 로 export를 받았으니 import는 일반적인 방법으로 사용하면 된다.

example : 9i 서버에서 특정 테이블(T_MS_ALBUM_TMP) 를 import하는 예제

imp 9i_userid/9i_passwd file=T_MS_ALBUM_TMP.dmp tables=T_MS_ALBUM_TMP commit=y ignore=y buffer=100000 log=T_MS_ALBUM_TMP.log
Import: Release 9.2.0.6.0 - Production on Thu May 19 01:43:08 2011
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to: Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.6.0 - Production
Export file created by EXPORT:V09.02.00 via conventional path
Warning: the objects were exported by MLBDMO, not by you
import done in AL32UTF8 character set and UTF8 NCHAR character set
export server uses AL16UTF16 NCHAR character set (possible ncharset conversion)
. importing MLBDMO's objects into WIMS
. . importing table               "T_MS_ALBUM_TMP"       228780 rows imported
Import terminated successfully without warnings.
Posted by 항아리고미