摘要:
转自http://sqlblog.com/blogs/jonathan_kehayias/archive/2010/12/21/an-xevent-a-day-21-of-31-the-future-tracking-blocking-in-denali.aspxOne of my favorite... 阅读全文
摘要:
转自http://lzf328.blog.51cto.com/1196996/1363340扩展事件提供了一个轻量级的平台可以用来收集错误信息,方便DBA查看最近的数据库错误配合开发人员一起解决问题。下面的例子我们创建extendedevent会话来获取错误208,2812,and4121。这三个错... 阅读全文
摘要:
转自http://lzf328.blog.51cto.com/1196996/1363033如果Windows账户无法连接并且SA密码也丢失了,那么如何可以连接到数据库呢?答案是:在单用户模式下启动SQLServer然后用本地管理员权限连接。登陆之后就可以修改SA密码了。步骤:1.打开SQLServ... 阅读全文
摘要:
The Transact-SQL programming language provides several SET statements that change the current session handling of specific information. The SET statem... 阅读全文
摘要:
转自http://lzf328.blog.51cto.com/1196996/1345166今天用SetStatisticistime比较语句的执行时间,信息如下:SQLServerExecutionTimes:CPUtime=199229ms,elapsedtime=156327ms.SQLSer... 阅读全文
摘要:
The SQL Server Database Engine uses the following mechanisms to ensure the integrity of transactions and maintain the consistency of databases when mu... 阅读全文
摘要:
Many of the system tables from earlier releases of SQL Server are now implemented as a set of views. These views are known as compatibility views, and... 阅读全文
摘要:
An information schema view is one of several methods SQL Server provides for obtaining metadata. Information schema views provide an internal, system ... 阅读全文
摘要:
This topic shows the mapping between the system tables and functions and system views and functions.The following table maps the system tables to thei... 阅读全文
摘要:
重建索引是为了减少数据碎片。数据碎片会导致SQL Server进行不必要的数据读,降低SQL Server的性能。重建索引也会同时更新列统计,而如果查询所使用的列缺少或遗漏统计信息,这可能导致SQL Server内部的优化器选择比预期效率低的查询计划。如果您重建了某张表上的聚集索引,该表上的非聚集索... 阅读全文