쿼리 예
sp_configure 'show advanced options', 1
go
RECONFIGURE
go
sp_configure 'Ad Hoc Distributed Queries', 1
go
RECONFIGURE
go
SELECT
top 1 *
FROM
OPENDATASOURCE(
'Sybase.ASEOLEDBProvider.2',
'Data Source=sybase570;Persist Security Info=True;User ID=id;Password=pass')..temp.CODE00;
select *
Into CT_CODE01
from OpenRowset(
'MSDASQL',
'Dsn=sybase570;uid=id;pwd=password;na=192.168.1.1,4100;db=db_name',
'select * from temp.CODE01 where not (CODE_PART = ''CV024'')');
연결 문자열의 예
- Sybase IQ의 경우
Provider=ASAProv.90;Data Source=dsn_name;Persist Security Info=True;User ID=dba;Initial Catalog=dw
- Sybase의 경우
Provider=Sybase.ASEOLEDBProvider.2;Data Source=sybase570;Persist Security Info=True;User ID=id