Home > Dataroom > News Letter
 
Download
News Letter
Site Link
XpertMon ???? 41?
2007/03/22 10:40 12568


?????. DB2 ? XpertMon ??? ???!
? ????????? DB ??????.
???? ORACLE? DB2 UDB? ??? ??? ??? ???? ???? ??? ? DB?
Export(??? ??), ?? Tool? ?? ????? ?????.


Tool ??
??? ?? ? ? ?? ???? - Oracle imp, Oracle SQL Loader, DB2 UDB Import ,
DB2 UDB Load - ? ?? ???? ???? ?? ?? ????.
Oracle ImpOracle SQL LoaderDB2 ImportDB2 Load
?? ??? ?? ?? ??? ?? ???? API? ?? ???? API? ??
Oracle Exp ????? ?? ??? ?? ? ?? ???? ?? DEL, ASC, IXF, WSF ??? ???? ?? DEL, ASC, IXF, WSF ??? ???? ??
?? ??????? ???? ??? ???? ??? ???????? ??? ???? ???? ???? ??? ???? ???? ?? ??????? ?? ??? ??????? ??
INDEXFILE ????? DDL ?? ?? DDL ?? ?? DDL ????.
DDL? IXF ?? ??? ???? ??? ????
DDL ?? ??
??? ??? ??
(direct=Y ???? ??)
??? ????? ??? ??
(SQL Insert ??)
??? ?? ??
??????? ?? ??
import ?? ????? ??/??? ???? ??. import ?? ????? ?? ?? ??? ??? import ????? ?? ?? ??? ?? ???
??? ????? ?? - ?? ? ??? ????? ????? ??
???? ?? ??? ????? ?? ??? ????? ?? ??? ????? ?? ??? ?
?? ??? ?? import ?? ??? ?? ??? load ?? ?? ???? ?? ??? ?? import ?? ?? ???? ?? ??? ?? load ??
??? ?? ?? ?? ??? ?? ?? ?? ??? ??? ??. ?????? ?? ??? ??? ??. ?????? ??
Oracle 8 ?? QUERY ????? ???? import ? ?? / ? ???? WHEN ????? ???? ??/? ????.
?, WHEN ??? ?? ???? ????? ??
Where ?? ???? ??/? ?? ?? Where ?? ???? ??/? ?? ??
COMMIT=Y ?? ? ?? ?? ?? commit
?? ? insert ? commit ????
ROWS=n? ???? ?? ? insert ? commit ?? COMMITCOUNT=n ? ???? ?? ? insert ? commit ?? SAVECOUNT ? ???? ?? ? insert ? commit ??
Import ?? ??? ???? Import ?? ??? ???? ALLOW NO ACCESS ? ALLOW WRITE ACCESS ?? ?? ?? ???? ??? ??? ???? ???? ??/?? ?? ??
?? ?? ???? ???? append ??? ?? ?? ??
?? ???? ??? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
???? ???, FULL=Y ? ?? ???? ??, ?? ??? ??? ???? ?? ??? direct path, parallel direct path load ? ? ?? ????? ?? structure ??? ??? import ? ? ?? ????? ?? ?? ??? ?? ??? ?? ????? ??
native API ?? ?? native API ?? ?? API set ?? API set ??


Data movement - Export Utilities

Oracle - exp
Oracle exp ????? Oracle imp ????? ??? ?????. ? ?????
??? ??? ??? ?????. ?? ??, Oracle 8i ?? export ? ???, 9i?
import ?????. ?? ??????, export ? ?????? ????? imp ?????
?? ? ?? ?? ??? ?????. exp ????? ?? ??? ???????
?????. exp ????? DIRECT=Y ? ???? evaluation buffer ? ????
export ??? ?? ?????. Oracle exp ????? ??? ??? ????.
  • ?? ?? : exp ????? ?? / ?? ???? ??? ?? ????. export ??? ???? ??? drop ???? ?? ? ? ????.
  • reorg : export ? ??????? ???? ?????.
  • ?? ?? : export ? full table scan ? ?????. ??? ???/??? ??? ???? ???. ?? ??? ?? ???? ??? ? ? ?? ??? ????. ??? ??? Data Directory? ??? ?????.

Oracle exp ????? imp? ??? ??? ??? ?????. imp? ???? ????,
exp? ???? ????. exp? ???? ??? imp? ???? ??? ?? ?????.
??? ?? ?????. ?? ???? COMPRESS, DIRECT ?? ?? ????? ??,
TOUSER, FROMUSER ?? ????? ??? ????. ?? ??? ??? ?????
exp help=y ??? ??????. ??? ??? ????.
exp keyword=value [,keyword=value,...] where keywords are
USERID username/password BUFFER size of data buffer
FILE input files (EXPDAT.DMP) COMPRESS import into one extent (Y)
IGNORE ignore create errors (N) GRANTS import grants (Y)
INDEXES import indexes (Y) DIRECT direct path (N)
ROWS import data rows (Y) CONSISTENT cross-table consistency(N)
LOG log file of screen output FULL import entire file (N)
OWNER list of owner usernames TABLES list of table names
INCTYPE incremental import type RECORDLENGTH length of IO record
RECORD track incr. export (Y) TRIGGERS export triggers (Y)
STATISTICS analyze objects (ESTIMATE) PARFILE parameter filename
CONSTRAINTS import constraints (Y)


Oracle exp ????? ??? 4?? ??? ?????.
  • ?? export : FULL=Y ????? ????, ?? ????? export ???.
    ???? ?? ?? ??? ????.
    exp system/password full=y file=scott.dmp log=scott.log direct=y
  • ?? owner : OWNER=XYZ ????? ???? ?? ???? ???
    ?????? export ? ? ????. ???? ?? ?? ??? ????.
    exp system/password owner=scott file=scott.dmp
  • ??? ?? export : TABLES=(*) ????? ???? ??? ????
    ??? ?? ???? export ? ? ????. ???? ?? ?? ??? ????.
    exp scott/tiger file=scott.dmp tables=(emp, dept)
  • ??? ???? ?? export : Transport_Tablespace=Y ?
    Tablespaces=(A,B,C) ????? ?????.
? ??? SQLPlus ? ???? ???? ??? ? ?? ????.

DB2 - export
DB2 Export ????? ???? ??? ??? ??(DEL, WSF, IXF) ? ??? ???.
????? GUI? ???? ???, ???? ??? ???? ??? ????.
  • GUI? ???? ??
    ????? ?? ??? ???? ??? ? Export ??? ?????.

    ??. 21 DB2 UDB ????? ?? Export ??
    DEL, WSF, IXF ??? ?? ??? ????, export ???? message ???? ?????.
    ?? ???? ??? ??, ?? ???? export ??? ?? ???? SQL ???
    ?? ? ????. ??? ??? ?? ?? ??? ??? ??? ?? ?? ??
    ? ?? ????. Column, Schedule ?? ????.

    ??. 22 ?? ??? ?? ?? ?? ??
    ?? ???? DEL ??? ?????, ?? ??? ??? ??????.
    WSF? IXF? ???? ??? ??? ? ????. ? ???? output ??? ???
    ??? ?????. ???? ????? ?????. LOB ???? ?? ? ??
    ??? LOB ???? ?? ? ?? ???? ??? ?? ????.

    ??. 23 ?? ??? ?? ??
    ???? Schedule ????. ?? ??? ???, ?? ??? ?? ??? ???
    ?? ????.

    ??. 24 ?? ??
    ??? ???? ?? ???? ?? ? ? ????.
  • ???? ??? ???? ??
    CONNECT TO SAMPLE; EXPORT TO "E: mp1employee_1.ixf" OF DEL MESSAGES "E: mp1employee_1.msg" SELECT EMPLOYEE.EMPNO, EMPLOYEE.FIRSTNME, EMPLOYEE.LASTNAME, EMPLOYEE.WORKDEPT, EMPLOYEE.PHONENO FROM ADMINISTRATOR.EMPLOYEE AS EMPLOYEE; CONNECT RESET;


?? Tools
Oracle - Data Pump (impdp / expdp)
Oracle 10g ?? ?? ??? / ????? pump ????? Data Pump ? ???????.
Data Pump? ?? ???? ?? ???? ??? ????. Data Pump ? ??? ??
?? ???? ?? ? ? ?? ???? ????. Data Pump? ??? ? ?? ??
???? DBMS_DATAPUMP ???. ??? ???? ? ?? ? ??? load / unload ??
?????. imp ? ??? ? 20-30? ?? ????. ?? ??? import /export ?
???? ???? ?? ??? ??? ?????. Data Pump ? EXCLUDE ????
???? ?? ??? ????? ?????, INCLUDE ???? ???? ???? ?
????. ???? ?????? export / import ?? ??? CONTENT ????
???? ?? ? ?? ????. import ?? APPEND, SKIP, TRUNCATE, REPLACE ??
??? ?? ?????. ????? ????? ???? ? ?? ????.

IBM DB2 High Performance Unload for Multiplatform
UNIX, Windows, Linux ?? OS? ?????. ???? ??? ??? ?? export ?
?? ? ?? ??? ? ????. ? ?? ??? ????? ?? ?????
DB2 ???? unload ???.

IBM DB2 Test Database Generator
?? ?????? ??? ??????? ???? ????. ?? ?????????
???? ??? ? ?? ??, ??? ??????? ??? ?? ????.
? ?? ?? ??????? RI? ?????.

IBM Migration ToolKit (MTK)
MTK ?? 1.3? Oracle 8i ? Oracle 9i? ?? ??? ??? ?? DBMS ?????
???, ??, procedure language ?? ?? ????? ????? ????.
  • IBM DB2 UDB Universal Database for Workstation platforms, Version 8.1 or later
  • IBM DB2 UDB Universal Database for i5/OS, Version 5.2 or later
  • IBM DB2 UDB Universal Database for z/OS, Version 8
MTK? ??? ?? ??? ?? Oracle repository ? DB2 repository? ????? ?
?????.
  • ?????? ??? ??? DDL ???? ?? ?? ?? ? ????.
  • Transact-SQL ? PL/SQL ???? ?? ??? ??? ? ????.
  • ??? ?????? ??? ??? ??? ??? ???? ?? GUI ? ?????.
  • Transact-SQL ? PL/SQL ????? DB2 ????? ?????.
  • ?? ???? unload ?? DB2? upload ? ? ????.

??? ?? ????
???? 1. ??? ?? ??
Oracle ?? ??? ????? ?????? ????? ????
(?????? shutdown ??) ??? ??? ????? ???.
  1. alter tablespace USERS read only : ??? ????? ?? ???? ?????.
  2. OS ??? copy ? ???? ??? ??? ??? ??? ?????.
  3. alter tablespace USERS offline : ??? ???? ??? ????? offline ?? ?????.
  4. alter tablespace rename ‘/oldpath/old_datafile1.dbf’ to ‘/newpath/new_datafile1.dbf’ : ??? ???? ?????.
  5. alter tablespace USERS online : ??? ????? online ?? ?????.
  6. alter tablespace USERS read write : ??? ????? read only ??? ?????.
DB2 UDB??? ??? ????? ?? db2relocatedb ??? ???? ??? ??? ?
????. ?? ??, db2relocatedb -f configFilename ? ???? ??, ??
configFilename ??? ??? ??? ????.
DB_NAME=oldName,newName DB_PATH=oldPath,newPath INSTANCE=oldInst,newInst NODENUM=nodeNumber LOG_DIR=oldDirPath,newDirPath CONT_PATH=oldContPath1,newContPath1 CONT_PATH=oldContPath2,newContPath2

??? Oracle ?? ?? DB2??? ?????? ??, ???? ??, ?? ????
???? ???? ?? ?????.

???? 2. ?? OS ? DB ???? ?????? ??
Oracle ?? ?? ????(windows 2000) ? ?? DB ??(9i)? ???????
? ???? ?? ???? ????? ? ??? ?? ????.
? ?, Oracle imp/exp? ???? ??? ??? ??? ? ?? ??? ????.
?? ?? create controlfile option ? ?????. ?? ?????? ??
AWT ?? ??, ??? ?????? ??? AWT1 ??? ?????.
  1. alter database backup control file to trace : control ??? ?? ????.
  2. shutdown immediate : ?? ???? ??????? shutdown ???.
  3. ????, init.ora, redo ???? ?????? ?????.
  4. trace??? ???? ? ?? ‘Create controlfile reuse set database “AWT1” resetlogs’ ? ????? ???. ??? ??? ??????? ?? ??? ?? ?? ??? ???? ??? ???. ??? ???? createControlFile.sql ??? ?????.
  5. init.ora ??? ???? SID, path?? ????? ????? ???.
  6. ?? ???? start up / mount / createControlFile.sql ??? ?????.
  7. alter database open resetlog : ??? reset ?? ???.

DB2 UDB ??? Oracle ? ???? ?????. DB2 UDB ??? backup / restore ???
?????. backup ??? ??????? ???? ??? ??? ?? ????.
??? ??? OS ???? ??? ? ????. restore ??? ???????
??? ??? ?? ???? ????? ??? ?????? ???? ??? ? ??
???. ?? ?????? ??? 'SAMPLE', ?? ?????? ??? 'SAMPLE1' ???
?????. ?? ??? ????? ??? ? ????. ??? ?? ???
offline ?? ?????.
  1. db2 backup database sample to E:SampleBKUP ??? ???? ??????? ?? ????.
  2. OS? copy ??? ???? SampleBKUP ?? ??? ??? ???? ?????.
  3. db2 restore database sample from E:YYYSampleBKUP ??? ???? ????? (?? ??????? ??)
  4. db2 restore database sample from E:YYYSampleBKUP into SAMPLE1 ???? ?????.(?? ??????? ??)

???? 3. ??? OS?? ??????? ?? ???? ?? (Oracle 8.1.7 ?? ?? ??? 9iR2? ??)
?? ?? ??? imp/exp ????? ???? ?????. ?? ???? ?? ????
??? ?????.
??? ?? ?? ??? ??? ? ????.
  • ?? ?????? export
  • ??????? ?? export
  • ??? ?? export
  • ??? ?? export
???? ??????? ??? transportable export/import ? ????? ?????.
USERS ??? ????? LILY ???? ????? ?????.

?? ??? Oracle 8.1.7 (????) ?? ?????.
  1. alter tablespace USERS read only
  2. exp ""sys/password as sysdba"" file=trans817.dmp tablespaces=user transport_tablespace=y
  3. USERS ??? ????? ?????? trans817.dmp ??? ???? ?? Oracle 9iR2? ??? ???? ?????.
  4. USERS ???????? ??? ????? drop tablespace users include contents ???? drop ???.
  5. imp ""sys/password as sysdba"" file=trans817.dmp transport_tablespace=y datafiles=users01.dbf
transportable ??? ????? ???? ????, Oracle 8i ? 9i ??? ???.
??? ??????? transport ? ????? ??????? ??????.
transportable tablespace import / export ? ????? ?? ??? ?????
???? ????.
  1. Oracle 8i? 9i? OS? ???? ???. Oracle 10g ??? transportable tablespace ? ??? platform ??? ?????. transportable tablespace ? Oracle 7 ??? ???? ????.
  2. ??? ??? ??? ?? ???? charset ? ???? ???.
  3. ?? ???????? ?? ??? ??? ????? ??? ???.
  4. snapshot/replication, function-based indexes, Scoped REFs, domain index ?? ???? ????.
  5. ??? ????? ?? ??? ???? ??? ???.

DB2 UDB ??? OS ? ?????, 2? ????? ?? ??? ??? ? ????.

???? 4. ??? OS ? ?? ?? ??????? ?? (Windows 2000 SP4 ?? AIX 5.2 ML4?)
? ??, Oracle ??? export / import ??? ??? ????.
Full database export, ??? ??, ??? ??export? ?????.
? ?? OS ?? transportable tablespace ? ????? ??? Oracle 10g? ????
???. Full database export ? import ? ???? ???? ??? ??? ????
????. IMP_FULL_DATABASE role ? ??? ????? ????? ????.
  1. imp system/manager full=y constraints=n indexes=n file=full817.dmp log=full817_1.dmp
  2. imp system/manager full=y constraints=y indexes=y rows=n ignore=y file=full817.dmp log=full817_2.log
? ?, system, sys ????? ?? ????? "object already exists"??
?????? ?? ??? ????.

DB2 UDB? ??, 2?? ??? ????.
  • Backup / Restore ? ???? ?? : Backup/Restore? AIX, Solaris, HPUX ???? ?????.
  • db2move ????? ???? ?? : Linux, Unix, Windows ? ??? ??? OS ??? ?????? ???? ??? ???? ??? ??????? ???? ?????.

Backup/Restore ? ???? ?? ?? ??? ?????.
  1. ?? ???? ?? ??? ??????. AIX ??, db2 'backup database sample to "/home/db2inst1/sample"'
  2. ? ??? ?? ??? FTP? ?? ???? ????. (Solaris? ??)
  3. ?? ???? restore ??? ?????. db2 'restore database sample from "/home/db2inst1"'

db2move ????? ???? ????, ?? ???? ixf ???? export ?? ???.
?? ??? ?????.
  1. ???? DB2 UDB 8.2?? ??? ?????. db2move sample export -tc administrator
  2. FTP? ?? AIX ???? ??? ????.
  3. ??? ??? ????? ???? ?? ?????. db2move ? ???? ??? ?? ??? ??? ??? ????? ???? ?? ? ?? ??? ?? ?????. db2look -d sample -u administrator -e -m -o sample.sql ? ???? ???? ??? ??? ????? ?? ???.
  4. AIX?? db2move sample load ?lo replace ??? ?????. ?? ???? ?? ???? ?? ??? "SQL3304N The table does not exists" ???? ??? ????.

???? 5. ??? OS ?? ?? ??? ??????? ?? ???? ??
Oracle 8i, 9i ?? ??? OS ??? transportable tablespace ? ???? ????.
8i, 9i ??? ??? ??? exp / imp ????. 10g? ???? ????
transportable tablespace ? ?????.

DB2 UDB ??? ???? 4?? ?? backup/restore ??? db2move ?????
???? ?? ??? ???? ??? ? ????.


XpertMon for DB2 UDB V2
DB ???
Tel : 02-2108-1458
Fax : 02-2108-1459
Mobile : 011-896-6545
E-mail : hjlee@iteg.co.kr
URL : http://iteg.co.kr

¡ã XpertMon ???? 42? iteg 2007-03-22 11691
- XpertMon ???? 41? iteg 2007-03-22 12568
¡å XpertMon ???? 40? iteg 2007-03-22 11817
List Write Modify