摘要: 1.同样的程序在同样的电脑上只允许启动一次 /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { string strProcessName = Process.GetCurrentProcess().ProcessName; if (Process.GetProcesses... 阅读全文
posted @ 2009-07-02 19:15 SGQ 阅读(549) 评论(0) 推荐(0)
摘要: 数据库在使用一段时间后,就会出现很多的索引碎片。declare @ID intset @ID=OBJECT_ID('SMT_QC')dbcc showcontig(@ID) Scan Density值越低代表越需做DBCC ReIndex ,刚做完DBCC会等于 ReIndex100% 下面是Reindex的存储CREATE procedure [dbo].[DBReindex] @DB va... 阅读全文
posted @ 2009-03-25 11:45 SGQ 阅读(300) 评论(0) 推荐(0)
摘要: DBCC OpentranDBCC inputBuffer(id)KILL (id)sp_lock--找出產生Lock的源頭--Find locked processselect open_tran,* from sys.sysprocesses where blocked>0 --Find suspected processselect * from sys.sysprocesses wh... 阅读全文
posted @ 2008-12-21 11:26 SGQ 阅读(763) 评论(0) 推荐(0)