|
-1-
Reviewed by Oracle Certified Master Korea Community
( http://www.ocmkorea.com http://cafe.daum.net/oraclemanager )
1.1.1 ÆÄƼ¼Ç Å×ÀÌºí¿¡¼ »ç¿ëÇÒ¼ö ÀÖ´Â ¸®¿À±× ¹æ¹ý
ÆÄƼ¼Ç level ÀÇ import/export ¹æ¹ýÀ» ÀÌ¿ëÇØ ÆÄƼ¼Ç Å×À̺íÁß Æ¯Á¤ ÆÄƼ¼Ç( ȤÀº ¼ºêÆÄƼ¼Ç) ¸¸À»
¼±ÅÃÀûÀ¸·Î ¸®¿À±× ÇÒ¼ö ÀÖ´Ù.
ÀÛ¾÷ÀýÂ÷´Â ´ÙÀ½°ú °°´Ù.
(1) ¸®¿À±× ´ë»ó ÆÄƼ¼Ç Á¶È¸
(2) ÆÄƼ¼Ç EXPORT
(3) CHILD TABLE CHECK ¹× FK »èÁ¦
(4) PARTITION TRUNCATE
(5) Global Index »èÁ¦
(6) ÆÄƼ¼Ç next °ª Á¶Á¤
(7) ÆÄƼ¼Ç import
(8) ÆÄƼ¼Ç next °ª ¿ø»óº¹±¸
(9) Global Index »ý¼º
(10) CHILD TABLE FK ¿¬°á
(11) °á°ú È®ÀÎ
ÁÖ) À§ (3), (10) ¹øÀº CHILD TABLE ÀÌ ÀÖÀ» °æ¿ì¸¸ ÀÛ¾÷ÇÑ´Ù.
ÆÄƼ¼ÇÀ» truncate ÇÒ°æ¿ì ÇØ´ç Å×À̺íÀÇ Local Index ¸¦ Á¦¿ÜÇÑ ¸ðµç Global
Nonpartitioned Indexes, Global Partitioned indexes µéÀÌ UNUSABLE »óÅ°¡ µÈ´Ù. µû
¶ó¼ µ¥ÀÌ·®ÀÌ ¸¹Àº Å×À̺í ( ƯÈ÷ À妽ºµéÀÌ ¸¹Àº Å×À̺í, tbbhdz01, tbjgba20,
tbjgba12,tbbhba01, tbbhba02, tbjgaz10, tbjgaz40, tbbmbb03 µî ) Àº ÁÖÀÇÇØ¾ß ÇÑ´Ù.
À§ÀÇ ÀÛ¾÷ ÀýÂ÷´Â ÆÄƼ¼ÇÀÇ Á¾·ù( RANGE,HASH,COMPOSITE )¿¡ »ó°ü¾øÀÌ ¸ðµÎ µ¿ÀÏÇÏ´Ù. ´Ù¸¸ À§ÀýÂ÷
»ó (4)¹ø° ÀÛ¾÷½Ã RANGE ³ª COMPOSITE ÀÇ °æ¿ì´Â PARTITION LEVEL ¿¡¼ NEXT °ªÀ» º¯°æ ÇؾßÇÏ°í,
HASH ÆÄƼ¼ÇÀÇ °æ¿ì´Â PARTITION LEVEL ¿¡¼ º¯°æÀÌ ºÒ°¡´É ÇϹǷΠÅ×À̺í LEVEL ¿¡¼ NEXT °ªÀ» º¯°æ
ÇØ¾ß ÇÑ´Ù.
¶ÇÇÑ COMPOSITE ÆÄƼ¼ÇÀÇ °æ¿ì SUBPARTITION LEVEL ¿¡¼µµ ¸®¿À±× ÀÛ¾÷ÀÌ °¡´ÉÇÏÁö¸¸ ½ÇÁ¦·Î ÀÌ¿ëÇÒ
°æ¿ì´Â ¾øÀ» °ÍÀÌ´Ù. ¿Ö³ÄÇϸé, PARTITION LEVEL ¿¡¼ SUBPARTITION °³¼ö¸¦ ÁöÁ¤ÇØÁÙ ¶§ ¸ðµÎ 4 °³·Î
ÁöÁ¤ Ç߱⠶§¹®¿¡ ƯÁ¤ ÆÄƼ¼Ç¿¡ ¼ÓÇÏ´Â ¸ðµç SUBPARTITION µéÀº ¸ðµÎ °ÅÀÇ µ¿ÀÏÇÑ Å×ÀÌŸ·®À» Æ÷ÇÔ
ÇÏ°í Àֱ⠶§¹®ÀÌ´Ù.
-2-
Âü°í) Çؽ¬ ¾Ë°í¸®ÁòÀ» Àû¿ë ¹Þ´Â ÆÄƼ¼Ç Å×À̺íµéÀÇ °æ¿ì ¸¸¾à ÆÄƼ¼Ç °³¼ö (ȤÀº ¼ºêÆÄƼ¼Ç °³
¼ö)°¡ 2 ÀÇ N ½ÂÀ¸·Î(2,4,6,8,16¡¦) ±¸¼ºµÉ °æ¿ì ¸ðµç ÆÄƼ¼Ç( ȤÀº ¼ºêÆÄƼ¼Ç)µé¿¡ ´ëÇØ °ÅÀÇ µ¿ÀÏ
ÇÏ°Ô Å×ÀÌŸ¸¦ ºÐ¹è ½ÃŲ´Ù.
1.1.1.1 Å×À̺í ÆÄƼ¼Ç ¸®¿À±×
[´Ü°è 1] ¸®¿À±× ´ë»ó ÆÄƼ¼ÇÀ» Á¶È¸ÇÑ´Ù.
-3-
$ sqlplus
SQL*Plus: Release 8.1.6.0.0 - Production on Wed Feb 14 17:47:50 2001
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Enter user-name: nhicadm
Connected to:
Oracle8i Enterprise Edition Release 8.1.6.3.0 - Production
With the Partitioning option
JServer Release 8.1.6.3.0 - Production
10.1.60.6 csuo002 csuo002. loghost
USER is "NHICADM"
SQL> col segment_name format a15
SQL> col partition_name format a15
SQL> col tablespace_name format a15
SQL> select segment_name, partition_name, extents,(bytes/1024)/1024 Msize
,(next_extent/1024)/1024 Minit,(next_extent/1024)/1024 Mnext, min_extents
2 from user_segments
3 where segment_name = 'TBJGBA12'
4 and extents > 30; .. ¸®¿À±× ´ë»ó extent °³¼ö
SEGMENT_NAME PARTITION_NAME EXTENTS MSIZE MINIT MNEXT MIN_EXTENTS
--------------- --------------- ---------- ---------- ---------- ---------- ------------
TBJGBA12 SYS_P4561 1 60 60 1 1
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦.¡¦¡¦.Áß·«¡¦¡¦¡¦¡¦¡¦¡¦..¡¦¡¦¡¦¡¦¡¦
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦.
TBJGBA12 SYS_P4564 43 102.65625 60 1 1
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦.¡¦¡¦.Áß·«¡¦¡¦¡¦¡¦¡¦¡¦..¡¦¡¦¡¦¡¦¡¦
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦.
TBJGBA12 SYS_P4570 1 60 60 1 1
.. ÆÄƼ¼Ç SYS_P4564 ¸¦ ¸®¿À±×ÇØ º¸ÀÚ.
[´Ü°è 2] ¸®¿À±× ´ë»ó ÆÄƼ¼Ç EXPORT
-4-
$exp nhicadm/ passwd file=sys_p4564.dmp tables=tbjgba12:sys_p4564 indexes=n constraints=n
log=exp.log
Export: Release 8.1.6.3.0 - Production on Tue Mar 6 17:11:38 2001
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Connected to: Oracle8i Enterprise Edition Release 8.1.6.3.0 - Production
With the Partitioning option
JServer Release 8.1.6.3.0 - Production
Export done in KO16KSC5601 character set and KO16KSC5601 NCHAR character set
Note: indexes on tables will not be exported
Note: constraints on tables will not be exported
About to export specified tables via Conventional Path ...
. . exporting table TBJGBA12
. . exporting partition SYS_P4564 660032 rows exported
Export terminated successfully without warnings.
ÀÛ¾÷ÀÚ ½Ç¼ö¸¦ ´ëºñÇØ table Àüü¸¦ ´Ù¸¥ À̸§À¸·Î ´Ù¸¥ DEVICE ¿¡ Áߺ¹µÇ°Ô EXPORT ¸¦
¹Þ¾Æ ³õµµ·ÏÇÑ´Ù. ( export ÆÄÀÏÀÌ ¼Õ»óµÇ¾úÀ» °æ¿ì³ª, ÀÛ¾÷ÀÚ°¡ ´Ù¸¥ ÆÄƼ¼ÇÀ»
truncate ÇÏ´Â µîÀÇ ½Ç¼ö¸¦ ´ëºñÇØ..)
[´Ü°è 3] ÇØ´ç Å×À̺íÀ» parent ·Î ÇÏ´Â FK °¡ ÀÖ´ÂÁö ã¾Æ³½´Ù. ¸¸¾à ÀÖ´Ù¸é ÇØ´ç Å×À̺íÀº child
-5-
¸¦ °¡Áö°í ÀÖÀ¸¹Ç·Î truncate µÇÁö ¾Ê´Â´Ù. ¸¸¾à °¡Áö°í ÀÖ´Ù¸é ÇØ´ç FK ¸¦ ¸ÕÀú DROP ÇØ¾ß ÇÏ°í ³ª
Áß¿¡ import °¡ ³¡³ÈÄ ´Ù½Ã FK ¸¦ create ÇØ¾ß ÇÑ´Ù.
$ sqlplus
SQL*Plus: Release 8.1.6.0.0 - Production on Tue Mar 6 17:25:52 2001
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Enter user-name: nhicadm
Enter password:
Connected to:
Oracle8i Enterprise Edition Release 8.1.6.3.0 - Production
With the Partitioning option
JServer Release 8.1.6.3.0 - Production
10.1.60.6 csuo002 csuo002. loghost
USER is "NHICADM"
SQL> col constraint_name format a35
SQL> col column_name format a25
SQL> select b.constraint_name, b.column_name, b.position
2 from user_constraints a, user_cons_columns b
3 where a.constraint_name=b.constraint_name
4 and a.r_constraint_name='PK_TBJGBA12'
5 and a.constraint_type='R';
ONSTRAINT_NAME COLUMN_NAME POSITION
----------------------------------- ------------------------- ----------
FK_TBJGBA11_TBJGBA12_01 JUNG_NO 1
FK_TBJGBA11_TBJGBA12_01 JUNG_SEQ_NO 2
FK_TBJGBA20_TBJGBA12_01 JUNG_NO 1
FK_TBJGBA20_TBJGBA12_01 JUNG_SEQ_NO 2
FK_TBJGCA20_TBJGBA12_01 JUNG_NO 1
FK_TBJGCA20_TBJGBA12_01 JUNG_SEQ_NO 2
-6-
FK_TBJGCB01_TBJGBA12_01 JUNG_NO 1
FK_TBJGCB01_TBJGBA12_01 JUNG_SEQ_NO 2
.. 4 °³ÀÇ child table ¸¦ °¡Áö°í ÀÖÀ¸¹Ç·Î fk ¸¦ °¢°¢ »èÁ¦ÇØ¾ß ÇÑ´Ù.
SQL> alter table tbjgba11 drop constraint fk_tbjgba11_tbjgba12_01;
Table altered.
SQL> alter table tbjgba20 drop constraint fk_tbjgba20_tbjgba12_01;
Table altered.
SQL> alter table tbjgca20 drop constraint fk_tbjgca20_tbjgba12_01;
Table altered
SQL> alter table tbjgcb01 drop constraint fk_tbjgcb01_tbjgba12_01;
Table altered.
[´Ü°è 4] ¸®¿À±× ´ë»ó ÆÄƼ¼ÇÀ» TRUNCATE ÇÏ°í Index µéÀÇ »óŸ¦ Á¶È¸ÇÑ´Ù.
-7-
SQL> alter table tbjgba12 truncate partition sys_p4546;
Table truncated.
SQL> select index_name, status from user_indexes
2 where table_name='TBJGBA12';
INDEX_NAME STATUS
------------------------------ --------
IX_TBJGBA12_01 UNUSABLE .. ÀÌÇÏ GLOBAL INDEX ¸ðµÎ°¡ ¸ðµÎ UNUSBLE
IX_TBJGBA12_04 UNUSABLE »óÅ°¡ µÇ¾ú´Ù.
IX_TBJGBA12_07 UNUSABLE
IX_TBJGBA12_02 UNUSABLE
IX_TBJGBA12_05 UNUSABLE
IX_TBJGBA12_10 UNUSABLE
IX_TBJGBA12_08 UNUSABLE
IX_TBJGBA12_03 UNUSABLE
IX_TBJGBA12_06 UNUSABLE
IX_TBJGBA12_09 UNUSABLE
IX_TBJGBA12_11 UNUSABLE
PK_TBJGBA12 N/A .. ÆÄƼ¼Ç À妽º´Â ¾Æ·¡¿Í °°ÀÌ
user_ind_partitions ºä¿¡¼ È®ÀÎÇØ¾ß ÇÑ´Ù.
SQL> select partition_name, status
2 from user_ind_partitions
3 where index_name='PK_TBJGBA12';
PARTITION_NAME STATUS
------------------------------ --------
SYS_P4561 USABLE
SYS_P4562 USABLE
-8-
SYS_P4563 USABLE
SYS_P4564 USABLE
SYS_P4565 USABLE
SYS_P4566 USABLE
SYS_P4567 USABLE
SYS_P4568 USABLE
SYS_P4569 USABLE
SYS_P4570 USABLE
.. ¸ðµç À妽º ÆÄƼ¼ÇÀº À¯È¿ ÇÏ´Ù.
[´Ü°è 5] ¸ðµç Global Index µéÀÇ Å©±â ¹× ±¸¼ºÄ®·³À» Á¶È¸ÇÑÈÄ »èÁ¦ÇÑ´Ù.
SQL> col segment_name format a15
SQL> col tablespace_name format a15
SQL> select segment_name, tablespace_name, (bytes/1024)/1024 Msize,
2 (initial_extent/1024)/1024 Minit, min_extents
3 from user_segments
4 where segment_name like 'IX_TBJGBA12%'
5 /
SEGMENT_NAME TABLESPACE_NAME MSIZE MINIT MIN_EXTENTS
--------------- --------------- ---------- ---------- -----------
IX_TBJGBA12_01 MJGBA12INDX99 57.03125 40 1
IX_TBJGBA12_04 MJGBA12INDX99 130 100 1
IX_TBJGBA12_07 MJGBA12INDX99 57.03125 40 1
IX_TBJGBA12_02 MJGBA12INDX99 142 100 1
IX_TBJGBA12_05 MJGBA12INDX99 57.03125 57 1
IX_TBJGBA12_10 MJGBA12INDX99 190 150 1
IX_TBJGBA12_08 MJGBA12INDX99 57.03125 50 1
-9-
IX_TBJGBA12_03 MJGBA12INDX99 84 80 1
IX_TBJGBA12_06 MJGBA12INDX99 141.015625 100 1
IX_TBJGBA12_09 MJGBA12INDX99 152 100 1
IX_TBJGBA12_11 MJGBA12INDX99 225 200 1
.. Global Index µéÀÇ ±¸¼º Ä®·³À» Á¶È¸ÇÑ´Ù.
SQL> col column_name format a30
SQL> select index_name, column_name
2 from user_ind_columns
3 where index_name like 'IX_TBJGBA12%'
4 order by index_name, column_position
5 /
INDEX_NAME COLUMN_NAME
------------------------------ ------------------------------
IX_TBJGBA12_01 FIRM_SYM
IX_TBJGBA12_01 UNIT_FIRM_SYM
IX_TBJGBA12_02 PSTN_BRCH_CD
IX_TBJGBA12_02 PSTN_TYPE
IX_TBJGBA12_03 SANGSIL_BRCH_CD
IX_TBJGBA12_03 SANGSIL_PSTN_TYPE
IX_TBJGBA12_04 CHWIDUK_BRCH_CD
IX_TBJGBA12_04 CHWIDUK_PSTN_TYPE
IX_TBJGBA12_05 NATION_FINANCE_CD
IX_TBJGBA12_06 JUNG_SANGSIL_DT
IX_TBJGBA12_07 FIRM_SYM
IX_TBJGBA12_07 BUSI_OFCE_NO
IX_TBJGBA12_07 GAIBJA_DEPT_CD
IX_TBJGBA12_08 ARMY_NO_EMP_NO
-10-
IX_TBJGBA12_09 JUNG_CHWIDUK_DT
IX_TBJGBA12_10 PSTN_BRCH_CD
IX_TBJGBA12_10 JUNG_SANGSIL_DT
IX_TBJGBA12_11 JUNG_NO
IX_TBJGBA12_11 JUNG_SEQ_NO
IX_TBJGBA12_11 PSTN_BRCH_CD
.. ¸ðµç Global Index ¸¦ »èÁ¦ÇÑ´Ù.
SQL> drop index IX_TBJGBA12_01;
Index dropped.
SQL> drop index IX_TBJGBA12_02;
Index dropped
SQL> drop index IX_TBJGBA12_03;
Index dropped
SQL> drop index IX_TBJGBA12_04;
Index dropped
SQL> drop index IX_TBJGBA12_05;
Index dropped
SQL> drop index IX_TBJGBA12_06;
Index dropped
SQL> drop index IX_TBJGBA12_07;
Index dropped
SQL> drop index IX_TBJGBA12_08;
Index dropped
SQL> drop index IX_TBJGBA12_09;
Index dropped
SQL> drop index IX_TBJGBA12_10;
Index dropped
-11-
SQL> drop index IX_TBJGBA12_11;
Index dropped
[´Ü°è 6] ¸®¿À±× ´ë»ó ÆÄƼ¼ÇÀÌ ¼ÓÇÏ´Â Å×ÀÌºí½ºÆäÀ̽ºÀÇ FREE SPACE ¸¦ Á¶È¸ÇÏ°í ¹× ÆÄƼ¼ÇÀÇ NEXT
°ªÀ» Á¶Á¤ÇÑ´Ù.
[´Ü°è 1]·ÎºÎÅÍ Á¶Á¤ÇÒ next °ªÀ» ±¸ÇÑ´Ù.
: 103M ( partition ÃÑÅ©±â ) . 60M ( partition initial Å©±â )
.. table ȤÀº partition À» truncate ÇÒ °æ¿ì minextents ±îÁö¸¸ ³²±â°í ³ª¸ÓÁö space Àº ¹ÝȯÇÑ´Ù.
.. truncate µÈ ÆÄƼ¼ÇÀÌ ¼ÓÇÏ´Â tablespace ¸¦ Á¶È¸ÇÑ´Ù.
SQL> select tablespace_name from user_tab_partitions
2 where table_name='TBJGBA12'
3 and partition_name='SYS_P4564';
TABLESPACE_NAME
------------------------------
MJGBA12DATA04
.. Å×ÀÌºí½ºÆäÀ̽º°¡ °¡Áö°í ÀÖ´Â free space ¸¦ Á¶È¸ÇÑ´Ù.
SQL> conn system/ passwd
Connected.
SQL> select file_id, (bytes/1024)/1024 from dba_free_space
2 where tablespace_name='MJGBA12DATA04';
FILE_ID (BYTES/1024)/1024
---------- -----------------
62 50.9921875
1142 4.9921875
-12-
.. º¯°æÇÒ next °ªÀÇ Å©±â ( 43M ) ¿¡ ÇØ´çµÇ´Â FREE SPACE °¡ ÀÖ½¿À» È®ÀÎ.
¸¸¾à ¿¬¼ÓµÈ °ø°£ÀÌ ¾øÀ¸¸é Å×ÀÌºí½ºÆäÀ̽º¸¦ COALESCE Çغ¸°í ( ALTER TABLESPACE MJGBA12DATA04
COALESCE ) ±×·¡µµ ¿¬¼ÓµÈ °ø°£ÀÌ ¾øÀ¸¸é Å×ÀÌºí ½ºÆäÀ̽º¸¦ ´Ã·ÁÁØ´Ù.( ´Ü¿ø 4.1 ÂüÁ¶ )
SQL> conn nhicadm/ passwd
Connected.
SQL> alter table tbjgba12 storage ( next 43 M );
Table altered.
.. tbjgba12 °¡ hash partition À̹ǷΠ¾Õ¿¡¼ »ìÆì º»°Í°ú °°ÀÌ Å×À̺í level ¿¡¼ next °ªÀ»
Á¶Á¤ÇÑ´Ù. ¸¸¾à range,composite ÀÏ °æ¿ì ´ÙÀ½°ú °°ÀÌ ÆÄƼ¼Ç level ¿¡¼ next °ªÀ» Á¶Á¤Çϵµ·ÏÇÑ´Ù.
( alter table Å×À̺í¸í modify partition ÆÄƼ¼Ç¸í storage ( next ?M ) )
[´Ü°è 7] ÆÄƼ¼ÇÀ» IMPORT ÇÑ´Ù.
$ imp system/ passwd file=sys_p4564.dmp tables=tbjgba12:sys_subp4564 fromuser=nhicadm
touser=nhicadm buffer=1048576 ignore=y indexes=n constraints=n log=exp.log
Import: Release 8.1.6.3.0 . Production on Mon Feb 19 11:10:22 2001
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Connected to: Oracle8i Enterprise Edition Release 8.1.6.3.0 . Production
With the Partitioning option
Jserver Release 8.1.6.3.0 . Production
Export file created by EXPORT:V08.01.06 via conventional path
import done in KO16KSC5601 character set and KO16KSC5601 NCHAR character set
. importing TEMPUSER's objects into TEMPUSER
. . importing partition "TBJGBA12":"SYS_P4564" 660032 rows imported
Import terminated successfully without warnings.
.. import µÈ total rows µéÀÌ export ½Ã¿Í µ¿ÀÏÇÑÁö »ìÆ캻´Ù.
[´Ü°è 8] ÆÄƼ¼ÇÀÇ NEXT °ªÀ» ¿ø·¡´ë·Î ¹Ù²ã ³õ´Â´Ù.
-13-
SQL> alter table tbjgba12 storage ( next 1M );
Table altered.
.. tbjgba12 °¡ hash partition À̹ǷΠ¾Õ¿¡¼ »ìÆì º»°Í°ú °°ÀÌ Å×À̺í level ¿¡¼ next °ªÀ»
Á¶Á¤ÇÑ´Ù. ¸¸¾à range,composite ÀÏ °æ¿ì ´ÙÀ½°ú °°ÀÌ ÆÄƼ¼Ç level ¿¡¼ next °ªÀ» Á¶Á¤Çϵµ·ÏÇÑ´Ù.
( alter table Å×À̺í¸í modify partition ÆÄƼ¼Ç¸í storage ( next ?M ) )
[´Ü°è 9] Global Index µéÀ» »ý¼ºÇÑ´Ù.
.. [´Ü°è 5]·ÎºÎÅÍ ±¸ÇÑ global index µéÀÇ Á¤º¸¿Í ¾Æ·¡ÀÇ free space Á¤º¸¸¦ ÀÌ¿ëÇØ ¸ðµç global
index µéÀ» »ý¼ºÇÑ´Ù.
SQL> conn system/manager
Connected.
SQL> select file_id, (bytes/1024)/1024 from dba_free_space
2 where tablespace_name='MJGBA12INDX99'; .. GLOBAL INDEX µéÀÌ ¼ÓÇÏ´Â Å×ÀÌºí½ºÆäÀ̽º
FILE_ID (BYTES/1024)/1024
---------- -----------------
79 1998.945313
734 1998.9921875
761 66.8984375
1019 77.9921875
.. ¸¸¾à ¿¬¼ÓµÈ °ø°£ÀÌ ¾øÀ¸¸é Å×ÀÌºí½ºÆäÀ̽º¸¦ COALESCE Çغ¸°í ( ALTER TABLESPACE
MJGBA12DATA04 COALESCE ) ±×·¡µµ ¸ðµç À妽ºµéÀÇ INITIAL ¿¡ ÇØ´ç µÇ´Â ¿¬¼ÓµÈ °ø°£ÀÌ ºÎÁ·Çϸé
EXTENT °¡ ÃÖ¼Ò·Î ¹ß»ýÇÒ¼ö ÀÖµµ·Ï INITIAL, NEXT °ªÀ» ÀûÀýÈ÷ ÁöÁ¤ÇØÁØ´Ù.
.. GLOBAL INDEX ¸¦ »ý¼ºÇÑ´Ù.
-14-
¾çÀÌ ¸¹À¸¹Ç·Î script file ¸¦ ÀÛ¼º Çؼ ÀÛ¾÷ÇÑ´Ù.
SQL> conn nhicadm/ passwd
Connected.
create index IX_TBJGBA12_01 on TBJGBA12 (FIRM_SYM asc, UNIT_FIRM_SYM asc)
tablespace mjgba12indx99
storage ( initial 57M next 2M pctincrease 0 )
nologging .. logging ÇÏÁö ¾ÊÀ½
compute statistics .. Åë°èÁ¤º¸ »ý¼º
/
create index IX_TBJGBA12_02 on TBJGBA12 (PSTN_BRCH_CD asc, PSTN_TYPE asc)
tablespace mjgba12indx99
storage ( initial 142M next 2M pctincrease 0)
nologging
compute statistics
/
create index IX_TBJGBA12_03 on TBJGBA12 (SANGSIL_BRCH_CD asc, SANGSIL_PSTN_TYPE
asc)
tablespace mjgba12indx99
storage ( initial 84M next 2M pctincrease 0)
nologging
compute statistics
/
create index IX_TBJGBA12_04 on TBJGBA12 (CHWIDUK_BRCH_CD asc, CHWIDUK_PSTN_TYPE
asc)
tablespace mjgba12indx99
-15-
storage ( initial 130M next 2M pctincrease 0)
nologging
compute statistics
/
create index IX_TBJGBA12_05 on TBJGBA12 (NATION_FINANCE_CD asc)
tablespace mjgba12indx99
storage ( initial 57M next 2M pctincrease 0)
nologging
compute statistics
/
create index IX_TBJGBA12_06 on TBJGBA12 (JUNG_SANGSIL_DT asc)
tablespace mjgba12indx99
storage ( initial 141M next 2M pctincrease 0)
nologging
compute statistics
/
create index IX_TBJGBA12_07 on TBJGBA12 (FIRM_SYM asc, BUSI_OFCE_NO asc, GAIBJA_
DEPT_CD asc)
tablespace mjgba12indx99
storage ( initial 57M next 2M pctincrease 0)
nologging
compute statistics
/
create index IX_TBJGBA12_08 on TBJGBA12 (ARMY_NO_EMP_NO asc)
tablespace mjgba12indx99
-16-
storage ( initial 57M next 2M pctincrease 0)
nologging
compute statistics
/
create index IX_TBJGBA12_09 on TBJGBA12 (JUNG_CHWIDUK_DT asc)
tablespace mjgba12indx99
storage ( initial 152M next 2M pctincrease 0)
nologging
compute statistics
/
create index IX_TBJGBA12_10 on TBJGBA12 (PSTN_BRCH_CD asc, JUNG_SANGSIL_DT asc)
tablespace mjgba12indx99
storage ( initial 190M next 2M pctincrease 0)
nologging
compute statistics
/
create index IX_TBJGBA12_11 on TBJGBA12 (JUNG_NO asc, JUNG_SEQ_NO asc, PSTN_BRCH
_CD asc )
tablespace mjgba12indx99
storage ( initial 225M next 2M pctincrease 0)
nologging
compute statistics
/
.. À妽º°¡ ¸¹À¸¹Ç·Î 4 ~ 5 ÆÄÀÏ Á¤µµ·Î ³ª´©¾î¼ µ¿½Ã¿¡ ¼öÇà ½ÃÅ°µµ·ÏÇÑ´Ù.
[´Ü°è 10] Child Table µéÀÇ FK ¸¦ ¸Î¾îÁØ´Ù.
-17-
.. [´Ü°è 3]¿¡¼ »èÁ¦ÇÑ child table µéÀÇ FK µéÀ» NOVALIDATE ¿É¼ÇÀ¸·Î ´Ù½Ã ¸Î¾î ÁØ´Ù.
SQL> alter table tbjgba11 add constraint fk_tbjgba11_tbjgba12_01 Foreign key ( jung_no,
jung_seq_no ) references tbjgba12 ( jung_no, jung_seq_no ) novalidate ;
Table altered.
SQL> alter table tbjgba20 add constraint fk_tbjgba20_tbjgba12_01 Foreign key ( jung_no,
jung_seq_no ) references tbjgba12 ( jung_no, jung_seq_no ) novalidate ;
Table altered
SQL> alter table tbjgca20 add constraint fk_tbjgca20_tbjgba12_01 Foreign key ( jung_no,
jung_seq_no ) references tbjgba12 ( jung_no, jung_seq_no ) novalidate ;
Table altered
SQL> alter table tbjgba20 add constraint fk_tbjgba20_tbjgba12_01 Foreign key ( jung_no,
jung_seq_no ) references tbjgba12 ( jung_no, jung_seq_no ) novalidate ;
Table altered
[´Ü°è 11] °á°ú È®ÀÎ
.. partition extents È®ÀÎ
SQL> col segment_name format a15
SQL> select segment_name, partition_name, extents from user_segments
2 where segment_name='TBJGBA12' and partition_name='SYS_P4564';
SEGMENT_NAME PARTITION_NAME EXTENTS
--------------- ------------------------------ ----------
TBJGBA12 SYS_P4564 2
.. index »óÅ ȮÀÎ
SQL> select index_name, status from user_indexes where table_name='TBJGBA12';
-18-
INDEX_NAME STATUS
------------------------------ --------
IX_TBJGBA12_01 VALID
IX_TBJGBA12_04 VALID
IX_TBJGBA12_07 VALID
IX_TBJGBA12_02 VALID
IX_TBJGBA12_05 VALID
IX_TBJGBA12_10 VALID
IX_TBJGBA12_08 VALID
IX_TBJGBA12_03 VALID
IX_TBJGBA12_06 VALID
IX_TBJGBA12_09 VALID
IX_TBJGBA12_11 VALID .. ¸ðµÎ À¯È¿ÇÏ´Ù.
PK_TBJGBA12 N/A
SQL> select partition_name, status from user_ind_partitions
2 where index_name = 'PK_TBJGBA12';
PARTITION_NAME STATUS
------------------------------ --------
SYS_P4561 USABLE
SYS_P4562 USABLE
SYS_P4563 USABLE
SYS_P4564 USABLE
SYS_P4565 USABLE
SYS_P4566 USABLE
SYS_P4567 USABLE
SYS_P4568 USABLE
SYS_P4569 USABLE
-19-
SYS_P4570 USABLE .. ¸ðµÎ À¯È¿ÇÔ.
|