´Ù¸¥ ¼­¹öÀÇ Å×À̺íÀ» °¡Á®¿À·Á¸é
ÀÛ¼ºÀÚ °ü¸®ÀÚ ÀÛ¼º½Ã°£ 2006-02-07 17:32:50
 

¿ì¼± A, B ÀÌ µÎ °³ÀÇ DB¼­¹ö´Â ¼­·Î ¿¬°áµÇ¾î ÀÖ°í AA¶ó´Â Å×À̺íÀº µÎ °³ÀÇ DB¼­¹ö¿¡ ¸ðµÎ Á¸ÀçÇÑ´Ù´Â °¡Á¤ÇÏ¿¡¼­ ¸»¾¸µå¸®°Ú½À´Ï´Ù.

¿¬°áÀÌ ¾ÈµÇ¾î ÀÖ´Ù¸é export/import¸¦ ÀÌ¿ëÇÏ´Â °Íµµ ÇϳªÀÇ ¹æ¹ýÀÌ µÉ ¼ö ÀÖ½À´Ï´Ù.

±× ¿Ü¿¡´Â database link¸¦ ÀÌ¿ëÇÏ´Â ¹æ¹ýÀÌ ÀÖ½À´Ï´Ù.

Database link¸¦ »ç¿ëÇÏ´Â ¹æ¹ýÀº, ¿ì¼± A¼­¹ö¿¡¼­ B¼­¹ö·Î Á¢¼ÓÇÒ ¼ö ÀÖµµ·Ï A¼­¹öÀÇ tnsnames.ora¿¡ connection stringÀ» Ãß°¡ÇØ¾ß ÇÕ´Ï´Ù. (¹°·Ð B¼­¹öÀÇ listener°¡ ±âµ¿ÁßÀ̾î¾ß ÇÕ´Ï´Ù)

Ãß°¡µÈ connection stringÀÌ to_b_server¶ó°í Çϸé, ¾Æ·¡ÀÇ sql¹®À» »ç¿ëÇÏ¿© database link¸¦ ¸¸µé ¼ö ÀÖ½À´Ï´Ù

(CREATE PUBLIC DATABASE LINK link_to_b_server CONNECT TO <username> IDENTIFIED BY <password> USING ¡®to_b_server¡¯;)

ÁÖÀÇÇÒ Á¡Àº, À§ÀÇ database link¸¦ ¸¸µé±â À§Çؼ­´Â ÇØ´ç user°¡ ±×¿¡ »óÀÀÇÑ privilege(CREATE DATABASE LINK)¸¦ °¡Á®¾ß ÇÕ´Ï´Ù.

Database linkÀÇ ÀÛ¼ºÀÌ ³¡³µ´Ù¸é, ±× ÀÌÈÄ¿¡´Â ÀÌ link¸¦ ÀÌ¿ëÇؼ­ B¼­¹öÀÇ AAÅ×ÀÌºí¿¡ µé¾îÀÖ´Â µ¥ÀÌŸ¸¦ ´ÙÀ½°ú °°Àº ¹æ¹ýÀ¸·Î A¼­¹öÀÇ AAÅ×ÀÌºí¿¡ ³ÖÀ» ¼ö ÀÖ½À´Ï´Ù.

(INSERT INTO AA SELECT * FROM AA@link_to_b_server)


¸ñ·Ï | ÀÔ·Â | ¼öÁ¤ | ´äº¯ | »èÁ¦