05 2012 档案

摘要:把一个表的数据插入到另一服务器的相同表结构的一张表中: 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 阅读(296) 评论(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 阅读(305) 评论(0) 推荐(0)
摘要:转自:http://xxinside.blogbus.com/logs/47162540.html什么是Mutex “mutex”是术语“互相排斥(mutuallyexclusive)”的简写形式,也就是互斥量。互斥量跟临界区中提到的Monitor很相似,只有拥有互斥对象的线程才具有访问资源的权限,由于互斥对象只有一个,因此就决定了任何情况下此共享资源都不会同时被多个线程所访问。当前占据资源的线程在任务处理完后应将拥有的互斥对象交出,以便其他线程在获得后得以访问资源。互斥量比临界区复杂,因为使用互斥不仅仅能够在同一应用程序不同线程中实现资源的安全共享,而且可以在不同应用程序的线程之间实现对资. 阅读全文
posted @ 2012-05-03 14:01 fg0711 阅读(2171) 评论(0) 推荐(1)
摘要:一、MySQL 获得当前日期时间 函数1.1 获得当前日期+时间(date + time)函数:now()mysql> select now();+---------------------+| now() |+---------------------+| 2008-08-08 22:20:46 |+---------------------+除了 now() 函数能获得当前的日期时间外,MySQL 中还有下面的函数: current_timestamp(),current_timestamp,localtime(),localtime,localtimestam... 阅读全文
posted @ 2012-05-01 13:25 fg0711 阅读(132) 评论(0) 推荐(0)