Java代码
exec sp_configure "show advanced options",1
reconfigure
exec sp_configure "Ad Hoc Distributed Queries",1
reconfigure
insert into tb_cityCode SELECT *
from OPENROWSET('MSDASQL',
'DRIVER={SQL Server};SERVER=192.168.1.6\sqlexpress;UID=sa;PWD=123456',
ScciDB.dbo.[tb_cityCode])
www.2cto.com
insert into tb_warehouse SELECT *
from OPENROWSET('MSDASQL',
'DRIVER={SQL Server};SERVER=192.168.1.6\sqlexpress;UID=sa;PWD=123456',
ScciDB.dbo.[tb_warehouse])
exec sp_configure "Ad Hoc Distributed Queries",0
reconfigure
exec sp_configure "show advanced options",0
reconfigure
作者 libixionglbx