
置顶随笔
摘要: #实例化对象,以SqlConnection为例子[代码]#引用静态方法 Using Static Classes and Methods[代码]#列出以sql开头的进程[代码]#列出所有进程,按照占用的workingset大小降序排列[代码]#列出本机共享[代码]#如何使用if else,foreach , 得到所有的服务,安装服务状态进行排序 1[代码]#如何使用if else,foreach,...
阅读全文
posted @
2009-10-05 15:43 stswordman 阅读(160) |
评论 (0) |
编辑

2010年1月5日
摘要: @echo dirrem-- @表示不出现,即执行dir命令,但并不现实dir这个命令本身两个百分号表示变量例如echo %path%rem 这个命令会输出环境变量set a=1echo %a%输出变量a的值%0 ,%1,%2,%3为系统变量,用于接收输入参数例如脚本 script1.bat@echo offset a=%1set b=%2set c=%3set d=%0set e=%*echo ...
阅读全文
posted @
2010-01-05 08:43 stswordman 阅读(12) |
评论 (0) |
编辑

2010年1月4日
摘要: 代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->--setupUSEMASTERGO--CreatetheserverauditCREATESERVERAUDITtest_auditTOFILE(FILEPATH='E:\audit');GO--...
阅读全文
posted @
2010-01-04 18:08 stswordman 阅读(10) |
评论 (0) |
编辑

2009年10月5日
摘要: #实例化对象,以SqlConnection为例子[代码]#引用静态方法 Using Static Classes and Methods[代码]#列出以sql开头的进程[代码]#列出所有进程,按照占用的workingset大小降序排列[代码]#列出本机共享[代码]#如何使用if else,foreach , 得到所有的服务,安装服务状态进行排序 1[代码]#如何使用if else,foreach,...
阅读全文
posted @
2009-10-05 15:43 stswordman 阅读(160) |
评论 (0) |
编辑

2009年9月14日
摘要: Update lock并不是一种单独的锁,而是shared lock和exclusive lock的混合体。 当数据库执行更新(insert, update, delete)操作时,会去尝试获得update lock. 整个更新操作可以分为两步:1 定位需要更新的数据,2 执行更新操作. 定位数据的步骤就是数据搜索的过程,我们可以将其想像成select,这时sqlserver会去尝试获得share...
阅读全文
posted @
2009-09-14 17:34 stswordman 阅读(73) |
评论 (0) |
编辑

2009年8月10日
摘要: Can we remove a single query plan?You can use sp_recompile system stored procedure to clear it if the type of query plan is proc,trigger or functionElse you can't. If the received parameter of sp_reco...
阅读全文
posted @
2009-08-10 16:44 stswordman 阅读(51) |
评论 (0) |
编辑

2009年8月3日
摘要: SET option make different compiled plan
For specific sql test, it always has the same sql_handle, but it may not always have the same plan_handle. If the cache keys change, we'll get a new plan_handle in plan cache. The relationship between sql_handle and plan_handle is thus 1:N
阅读全文
posted @
2009-08-03 11:26 stswordman 阅读(58) |
评论 (0) |
编辑

2009年6月14日
摘要: http://technet.microsoft.com/zh-cn/dd939047(zh-cn).aspx最近收到了一些关于收缩日志的问题:已经执行了backup log命令,但执行shrink命令后仍然无法将日志文件收缩到指定大小,日志文件根本没有收缩/只收缩了一部分执行dbcc loginfo命令,可能会有如下结果您的日志尾部的虚拟日志文件为2状态。当执行dbcc shrinkfile命令...
阅读全文
posted @
2009-06-14 11:07 stswordman 阅读(94) |
评论 (0) |
编辑

2009年4月14日
摘要: This post was published to stswordman at 6:09:31 PM 4/14/2009 table scan against heap with forward pointer Sql server维护了一个内部指针,它指向了表的第一个IAM页,还有一个执行表的首页的内部指针对一个表(heap)执行table scan时,sql server会按照IAM顺序查找...
阅读全文
posted @
2009-04-14 18:18 stswordman 阅读(76) |
评论 (2) |
编辑

2009年1月6日
摘要: [代码]--UPDATE lock [代码] --SIX [代码] --SIU [代码]--1:167为索引页,1:165为数据页--UIX [代码] Request_status [代码]WAIT TimeTransaction 1Transaction 21set transaction isolation level read committedset transaction isolati...
阅读全文
posted @
2009-01-06 13:45 stswordman 阅读(320) |
评论 (0) |
编辑