database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
ㆍOracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
Oracle Tutorials 9301 게시물 읽기
 News | Q&A | Columns | Tutorials | Devel | Files | Links
No. 9301
Export file 을 분리하여 얻는 방법
작성자
정재익(advance)
작성일
2002-01-06 12:31
조회수
5,704

export file을 split하여 받는 방법

=================================

 

이 자료는 export시 2GB이상의 export dump file을 만들지 못하는 제약사항에 대하여 여러 export file로 나누어 받는 방법을 설명한다.

 

 

!!! IMPORTANT: 이 방법은 반드시 KORN SHELL (KSH) 에서 작업해야 한다. !!!

 

만일 ksh을 쓰지 않을 경우는 unix prompt에서 ksh라고 치면 변경이 된다.

unix pipe와 split command를 사용하여 disk에 1024m(약1GB)씩 export file이 생기면서 export된다.

export나 import시 제공되는 모든 parameter의 추가적인 사용이 가능하다.

 

Export command:

 

echo|exp file=>(split -b 1024m - expdmp-) userid=scott/tiger tables=X

사용예> echo|exp file=>(split -b 1024m - expdmp-) userid=scott/tiger log=scott.log

 

위와 같이 split하여 export를 받을 경우 file name은 expdmp-aa, expdmp-ab...expdmp-az, expdmp-ba... 으로 생성된다.

 

Import command:

 

echo|imp file=<(cat expdmp-*) userid=scott/tiger tables=X

사용예>echo|imp file=<(cat expdmp-*) userid=scott/tiger ignore=y commit=y

 

split와 compress를 같이 사용해도 가능하다.

 

Export command:

 

echo|exp file=>(compress|split -b 1024m - expdmp-) userid=scott/tiger tables=X

 

Import command:

 

echo|imp file=<(cat expdmp-*|uncompress) userid=scott/tiger tables=X

 

*** 위의 작업을 solaris에서 test가 되었다. os종류에 따라서 shall command는 달라질 수 있다.

 

이외에도 split command를 사용하지 않고 unix pipe와 compress를 사용하여 3-step의 작업으로 export file size limit의 회피를 위한 방법도 가능하다.

 

 

Export command:

 

1) Make the pipe

mknod /tmp/exp_pipe p

 

2) Compress in background

compress < /tmp/exp_pipe > export.dmp.Z &

-or-

cat p | compress > output.Z &

-or-

cat p > output.file & )

 

3) Export to the pipe

exp file=/tmp/exp_pipe userid=scott/tiger tables=X

 

Import command:

 

1) Make the pipe

mknod /tmp/imp_pipe p

 

2) uncompress in background

uncompress < export.dmp.Z > /tmp/imp_pipe &

-or-

cat output_file > /tmp/imp_pipe &

 

3) Import thru the pipe

imp file=/tmp/imp_pipe userid=scott/tiger tables=X

 

원본 출처 : http://211.47.158.189/unit/mysql/board/viewbody.php3?code=board3&page=1&number=166&keyfield=&key=

[Top]
No.
제목
작성자
작성일
조회
9324ORA-1547 에러 발생의 원인
정재익
2002-01-07
4473
9303rowid 에 대한 이해
정재익
2002-01-06
6226
9302Imp-00020 Error
정재익
2002-01-06
5387
9301Export file 을 분리하여 얻는 방법
정재익
2002-01-06
5704
9286Windows NT 에서 Oracle 8i R2 (8.1.6) 설치 가이드 [1]
정재익
2002-01-05
5449
9285MTS (Multi-Threaded Server) vs Dedicated Server
정재익
2002-01-05
6332
9284SQL*Net이 잘 않될 때 : 점검 사항들
정재익
2002-01-05
5629
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.019초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다