上一页 1 ··· 64 65 66 67 68 69 70 71 72 ··· 102 下一页
摘要: Sql Server数据库的一大优势,就是具有富UI的管理和调试工具,这点,绝对是优于ORACLE和其他的大中型数据库的。Sql Server的众多工具中,对于开发人员和DBA来讲,非常重要的一个,就是Sql Profiler (事件探查器) 了。Sql Server中执行的每个一个动作,都可以在Sql Profiler里看的一清二楚,这对于性能调优,后期维护等等是非常有帮助的。但是,问题来了,在你的产品发布后,你可能不想让客户跟踪到你的SQL执行情况,便于对客户保密。那么这个优势,就成了你的“眼中钉”如何才能不被Sql Profiler跟踪到呢?下面,我们就来探讨这个问题假设,你有一张表A, 阅读全文
posted @ 2011-10-12 12:19 qanholas 阅读(2518) 评论(3) 推荐(0)
摘要: Adding a column to a table is common task for DBAs. You can add a column to a table which is a nullable column or which has default values. But are these two operations are similar internally and which method is optimal?Let us start this with an example.I created a database and a table using followi 阅读全文
posted @ 2011-10-05 22:45 qanholas 阅读(368) 评论(0) 推荐(0)
摘要: Recently I came across with an article on DB2 about using Union instead of OR. So I thought of carrying out a research on SQL Server on what scenarios UNION is optimal in and which scenarios OR would be best. I will analyze this with a few scenarios using samples taken from the AdventureWorks databa 阅读全文
posted @ 2011-10-05 22:35 qanholas 阅读(952) 评论(0) 推荐(0)
摘要: 对SQL Server来说,最重要的资源是内存、Disk和CPU,其中内存又是重中之重,因为SQL Server为了性能要求,会将它所要访问的数据全部(只要内存足够)放到缓存中。这篇就来介绍SQL Server的内存管理体系。SQL Server作为Windows上运行的应用程序,必须接受Windows的资源管理,利用Windows的API来申请和调度各类资源。但是,由于Windows的资源管理体系,是为了满足大多数的应用程序所设计的,这对于SQL Server这种定位于企业级、支持多用户和高并发性的数据库应用程序来说不是很适合,为此SQL Server开发了自己的一套资源管理体系——SQLO 阅读全文
posted @ 2011-10-05 21:03 qanholas 阅读(898) 评论(0) 推荐(0)
摘要: --创建测试数据库CREATEDATABASEDbGO--对数据库进行备份BACKUPDATABASEDbTODISK='c:\db.bak'WITHFORMATGO--创建测试表CREATETABLEDb.dbo.TB_test(IDint)--延时1秒钟,再进行后面的操作(这是由于SQLServer的时间精度最大为百分之三秒,不延时的话,可能会导致还原到时间点的操作失败)WAITFORDELAY'00:00:01'GO--假设我们现在误操作删除了Db.dbo.TB_test这个表DROPTABLEDb.dbo.TB_test--保存删除表的时间SELECTd 阅读全文
posted @ 2011-10-05 20:58 qanholas 阅读(3062) 评论(0) 推荐(1)
上一页 1 ··· 64 65 66 67 68 69 70 71 72 ··· 102 下一页