04 2014 档案
摘要:SET SHOWPLAN_ALL { ON | OFF }It will not execute the TSQL statements.It cannot be specified inside a stored procedure,must be the only statements in a...
阅读全文
摘要:1.Enable the change tracking at the database level.ALTER DATABASE AdventureWorks2008 SET CHANGE_TRACKING = ON;By Default retention is 2 dyas with auto...
阅读全文
摘要:1.DMV Query to identify all active SQL Server SessionsThe query below identifies all currently active SQL Server user connections by their SQL Server ...
阅读全文
摘要:Summary Info:Logical Reads : Reading Data pages from CachePhysical Reads : Reading Data pages from Hard DiskBuffer Cach Hit Ratio: (logical reads – ...
阅读全文
摘要:1. Why we need the index 'include' feature? For SQLServer , the length of all the index key have a limit length as 900 byte.when you create a index wh...
阅读全文
摘要:Defines the attributes of a Transact-SQL server cursor, such as its scrolling behavior and the query used to build the result set on which the cursor ...
阅读全文
摘要:1、查看数据库锁,诊断锁的来源及类型: select object_id,session_id,locked_mode from v$locked_object;或者用以下命令:select b.owner,b.object_name,l.session_id,l.locked_modefrom v...
阅读全文
摘要:The Transact-SQL programming language provides several SET statements that change the current session handling of specific information. The SET statem...
阅读全文
摘要:Temporary tables are created in tempdb. The name "temporary" is slightly misleading, for even though the tables are instantiated in tempdb and backed ...
阅读全文
摘要:question:if the nested transaction encountered an exception, then rollbacked. How about the outer transaction?Lets demo this using below code.create p...
阅读全文