远程数据库导入本地(10W)

来源:互联网 发布:js prompt 使用方法 编辑:程序博客网 时间:2024/05/23 20:08

/****** Script for SelectTopNRows command from SSMS ******/

SELECT TOP 1000 [newsid] ,[typeid] ,[borderid] ,[classid] ,[topic] ,[content] ,[ntime] ,[hits] ,[keys] ,[img] ,[nfrom] ,[modify] ,[audit] ,[auditer] ,[writer] ,[writer2] ,[writer3] ,[writer4] ,[writeren] ,[cas] ,[price] ,[price1] ,[price2] ,[isopen_price2] ,[price3] ,[price4] ,[price5] ,[imgsize] ,[checked] ,[tejia] ,[keywords] ,[fzs] ,[fzl] ,[proLevel] ,[proCert] ,[proOrigin] ,[huoqi] ,[t2] ,[b2] ,[y1] ,[y2] ,[y3] ,[nongdu] FROM [gbw114X3].[dbo].[news] insert into news select [typeid] ,[borderid] ,[classid] ,[topic] ,[content] ,[ntime] ,[hits] ,[keys] ,[img] ,[nfrom] ,[modify] ,[audit] ,[auditer] ,[writer] ,[writer2] ,[writer3] ,[writer4] ,[writeren] ,[cas] ,[price] ,[price1] ,[price2] ,[isopen_price2] ,[price3] ,[price4] ,[price5] ,[imgsize] ,[checked] ,[tejia] ,[keywords] ,[fzs] ,[fzl] ,[proLevel] ,[proCert] ,[proOrigin] ,[huoqi] ,[t2] ,[b2] ,[y1] ,[y2] ,[y3] ,[nongdu] from OPENROWSET('SQLOLEDB', 'SERVER=114.125.***.2;uid=sa;pwd=sa_mima;Database=gbw114X3','select [typeid] ,[borderid] ,[classid] ,[topic] ,[content] ,[ntime] ,[hits] ,[keys] ,[img] ,[nfrom] ,[modify] ,[audit] ,[auditer] ,[writer] ,[writer2] ,[writer3] ,[writer4] ,[writeren] ,[cas] ,[price] ,[price1] ,[price2] ,[isopen_price2] ,[price3] ,[price4] ,[price5] ,[imgsize] ,[checked] ,[tejia] ,[keywords] ,[fzs] ,[fzl] ,[proLevel] ,[proCert] ,[proOrigin] ,[huoqi] ,[t2] ,[b2] ,[y1] ,[y2] ,[y3] ,[nongdu] from news')//导入之前执行下面--------exec sp_configure 'show advanced options',1 reconfigure exec sp_configure 'Ad Hoc Distributed Queries',1 reconfigure

0 0