摘要: 把一个表的数据插入到另一服务器的相同表结构的一张表中: insert into opendatasource('SQLOLEDB','Data Source=*.*.*.*;user ID=sa;password=*****;') .dbname.dbo.tablename select top 10 * from dbname.dbo.tablename如果执行时出现如下提示:SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component ' 阅读全文
posted @ 2012-05-16 17:43 fg0711 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 统计当前库中所有表的记录数量:在 MSSQL2008 R2中运行if exists (select Name from sysobjects where name='count_table_recorder' and type='p') drop proc count_table_recordercreate proc count_table_recorder @DbName varchar(255), @TableType nvarchar(10), @OneResult nvarchar(4000) outputAS declare table_cursor 阅读全文
posted @ 2012-05-16 17:16 fg0711 阅读(284) 评论(0) 推荐(0) 编辑