프로그래머의 삶 Programmer's Life/Database-Oracle&MySQL

다른사람의 DB로 접속

Oliver's World 2008. 11. 3. 13:58
728x90

SQL> create public database link kty connect to scott identified by tiger
  2  using 'kty';

데이타베이스 링크가 생성되었습니다.


C:\oracle\ora92\network\admin\tnsnames.ora 의 파일에..

-- other host
  kty =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 203.236.213.83)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DADAMITA)
    )
  )

C:\Documents and Settings\MyHome>tnsping kty;   // tnsping 확인

TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 10-MAY-2008 13:37:57

Copyright (c) 1997 Oracle Corporation.  All rights reserved.

728x90