sql进程检查
摘要:select * from (SELECT TEXT astt,AA.* FROM sys.sysprocessesAA CROSS APPLYsys.dm_exec_sql_text(AA.sql_handle)) as awhere login_time >DATEADD(MI,-30,getdate())and last_batch >DATEADD(SECOND,2,login_time)and loginame <> 'sa'and loginame not like 'tcdb%'and loginame not like &
阅读全文
使用ADSI获取IIS版本
摘要:///<summary>///服务器IIS版本///</summary>publicenumWebServerTypes{/**////<summary>///未知版本///</summary>Unknown,/**////<summary>///IIS 4.0///</summary>IIS4,/**////<summary>///IIS 5.0,5.1///</summary>IIS5,/**////<summary>///IIS 6.0///</summary>IIS6
阅读全文
C#操作IIS回收应用程序池,兼容iis6和iis7
摘要:try { string method = "Recycle"; string AppPoolName = this.textBox2.Text.Trim(); DirectoryEntry appPool = new DirectoryEntry("IIS://localhost/W3SVC/AppPools"); DirectoryEntry findPool = appPool.Children.Find(AppPoolName, "IIsApp...
阅读全文
DataTable保存为Excel或者Txt
摘要:using System;using System.Collections.Generic;using System.Text;using System.Data;using System.IO;using System.Windows.Forms;using System.Reflection;namespace celiang{ public class saveDataTableToExcelTxt { public saveDataTableToExcelTxt(DataTable table,string fullName) { ...
阅读全文