Contents

1 MySQL 郁屋蠍
2
3 谿瑚襭


譟磯 蟾襾轟.. <;;

1 MySQL 郁屋蠍 #

--郁屋 覯: 192.168.0.1
--螻糾: Microsoft OLE DB Provider for ODBC Dirvers
--企: MySQL
--螻糾覓語: DRIVER={MySQL ODBC 3.51 Driver}; SERVER=192.168.11.161;Port=3306; DATABASE=ranking; USER=企; PASSWORD=れ
EXEC master.dbo.sp_addlinkedserver 
	@server = N'192.168.0.1'
,	@srvproduct=N'MySQL'
,	@provider=N'MSDASQL'
,	@provstr=N'DRIVER={MySQL ODBC 5.1 Driver}; SERVER=192.168.11.161;Port=3306; DATABASE=ranking; USER=企; PASSWORD=れ'
--,	@provstr=N'DRIVER={MySQL ODBC 3.51 Driver}; SERVER=192.168.11.161;Port=3306; DATABASE=ranking; USER=企; PASSWORD=れ'

EXEC master.dbo.sp_addlinkedsrvlogin 
	@rmtsrvname=N'192.168.0.1'
,	@useself=N'False'
,	@locallogin=NULL
,	@rmtuser=NULL
,	@rmtpassword=NULL

2 #

set @seq = (select convert(varchar(50), isnull(max(seq), 0)) from dbo.id where tbl_type = 'a')
set @sql = '
select 
	seq
,	id
,	''a'' tbl_type
from openquery([192.168.0.1], ''
select
	seq
,	id
from main.id_a
where seq > ' + @seq  + ''')'

3 谿瑚襭 #