월드버텍 블로그

내일을 향한 준비~~

–오라클 tnsnames.ora
TESTORCL=
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ***.***.***.**)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = test)
    )
  )

–링크드서버구성
exec sp_addlinkedserver
   @server = ‘TESTORCL’
 , @srvproduct = ‘Oracle’
 , @provider = ‘MSDAORA’
 , @datasrc = ‘TESTORCL’

go 

exec sp_addlinkedsrvlogin
  ‘TESTORCL’
 , ‘false’
 , NULL
 , ‘오라클 아이디’
 , ‘오라클 패스워드’
 
–링크드서버 Drop
EXEC sp_droplinkedsrvlogin ‘TESTORCL’, NULL
go
EXEC sp_dropserver ‘TESTORCL’

–생성된 링크드서버 조회
select * from sysservers

select * from sysxlogins

–링크드서버 sql실행
select * from openquery(TESTORCL, ‘select * from 테이블’)

Add A Comment

You must be logged in to post a comment.

Subscribe to 월드버텍 블로그