declare @spid int,@bl int
DECLARE s_cur CURSOR FOR
select 0 ,blocked
from (select * from sysprocesses where blocked>0 ) a
where not exists(select * from (select * from sysprocesses where blocked>0 ) b
where a.blocked=spid)
union select spid,blocked from sysprocesses where blocked>0
OPEN s_cur
FETCH NEXT FROM s_cur INTO @spid,@bl
WHILE @@FETCH_STATUS = 0
begin
if @spid =0
select N'引起數據庫死鎖的是:
'+ CAST(@bl AS VARCHAR(10)) + N'進程號,其執行的SQL語法如下'
else
select N'進程號SPID:'+ CAST(@spid AS VARCHAR(10))+ N'被進程號SPID:'+ CAST(@bl AS VARCHAR(10)) +N'阻塞,其當前進程執行的SQL語法如下'
DBCC INPUTBUFFER (@bl )
FETCH NEXT FROM s_cur INTO @spid,@bl
end
CLOSE s_cur
DEALLOCATE s_cur
var Data = [{"key": "key5", "value": "value5"}, {"key": "key4", "value": "value4"}, {"key": "key3", "value": "value3"}];
var html = [];
html.push('<select name="test">');
for (var i = 0; i < Data.length; i++) {
html.push('<option value="' + Data[i]["key"] + '">',
Data[i]["value"],
"</option>");
}
html.push('</select>');
return html.join('');
List<string> listOfString = new List<string>();
for (int i = 0; i < 10; i++)
{
listOfString.Add(i.ToString());
}
string strResult = string.Join(", ", listOfString.ToArray());
必備元件
Microsoft .NET Framework 3.5 Service pack 1(不裝連安裝畫面都無法開啟)
http://www.microsoft.com/downloads/details.aspx?FamilyId=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=zh-tw
Windows Installer 4.5 Redistributable - 繁體中文(不安裝就無法安裝SQL Server 2008)
http://www.microsoft.com/downloads/details.aspx?displaylang=zh-tw&FamilyID=5a58b56f-60b6-4412-95b9-54d056d6f9f4
PowerShell 1.0(不裝在檢查元件步驟就無法通過)
926139:Windows PowerShell 1.0 英文語言安裝封裝適用於 Windows Server 2003 及 Windows XP
926140:Windows Server 2003 Service Pack 1 與 Windows XP Service Pack 2 的 Windows PowerShell 1.0 當地語系化安裝套件
926141:Windows 1.0 PowerShell 多語系使用者語言介面 (MUI) Pack 適用於 Windows Server 2003 或適用於 Windows XP
928439:適用於 Windows Vista 的 Windows PowerShell 1.0 安裝封裝