2009年9月24日 星期四

table exclusive lock

依如下範例測試,不知是否表示sql server執行了table exclusive lock

執行順序
ConnA 04,05,06,07
ConnB 02 --> lock 無執行結果
ConnA 08,09
ConnB --> 因ConnA Commit,ConnB 回傳執行update的結果,被Trigger機制拒絕異動!






http://neo_lin_42.blog.ithome.com.tw/post/620/6287

2009年9月17日 星期四

溫故卻無知新--唉!這就是工作.....<4>

設定內部DNS,誤將mail server ip 指向 smtp-gw的效果

From: <SMTP_GW@office.mobile.com.tw>
Date: Thu, Sep 17, 2009 at 6:01 PM
Subject: Returned mail
To: iidp00u@gmail.com


--- The message cannot be delivered to the following address. ---

support@taxi123.tw Address loop detected. Service will not connect to itself.



溫故卻無知新--唉!這就是工作.....<3>

忘了設定內部DNS,SMTP-GW找不到mail server 的效果

From: <SMTP_GW@office.mobile.com.tw>
Date: Thu, Sep 17, 2009 at 5:55 PM
Subject: Returned mail
To: iidp00u@gmail.com


--- The message cannot be delivered to the following address. ---

support@taxi123.tw Remote host not found.



溫故卻無知新--唉!這就是工作.....<2>

忘了設定SMTP-GW要處理taxi123.tw網域的效果

From: Mail Delivery Subsystem <mailer-daemon@googlemail.com>
Date: Thu, Sep 17, 2009 at 5:37 PM
Subject: Delivery Status Notification (Failure)
To: iidp00u@gmail.com


This is an automatically generated Delivery Status Notification

Delivery to the following recipient failed permanently:

support@taxi123.tw

Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 support@taxi123.tw ...Relaying denied (state 14).


溫故卻無知新--唉!這就是工作.....<1>

忘了設定外部DNS的A,MX Record的效果

From: Mail Delivery Subsystem <mailer-daemon@googlemail.com>
Date: Thu, Sep 17, 2009 at 5:30 PM
Subject: Delivery Status Notification (Failure)
To: iidp00u@gmail.com


This is an automatically generated Delivery Status Notification

Delivery to the following recipient failed permanently:

support@taxi123.tw

Technical details of permanent failure:
DNS Error: DNS server returned answer with no data


2009年9月11日 星期五

DFL-210 CLI SET IP ADDRESS

DFL-210:/> set Address IP4Address InterfaceAddresses/lannet address=192.168.4.0/

2009年9月10日 星期四

OUTLOOK 2000 信件檔超過2GB,無法存取或開啟

OUTLOOK 2000 信件檔超過2GB,無法存取或開啟

指派給:
是否已經核對?否
核對者:
核對日期:2009-09-10 08:17:34
常見問答分類:

參考微軟官網,搜尋關鍵字「超大PST和OST檔案的裁工具」

兩工具如下:

  1. SCANPST.EXE
  2. 2GB152.EXE (解壓縮後,可得5個檔案,pst2gb...)

根據文件,指出更新程式可避免Outlook允許.pst檔超過2GB的最大容量。

  1. Office 2000 SR-1/SR-1a

其它官網資訊:

1. 從下列「Microsoft 下載中心」連結下載工具:
http://www.microsoft.com/downloads/details.aspx?FamilyID=B33B1DFF-6F50-411D-BBDF-82019DDA602E&amp;displaylang=en (http://www.microsoft.com/downloads/details.aspx?FamilyID=B33B1DFF-6F50-411D-BBDF-82019DDA602E&amp;displaylang=en)
2. 將 2gb152.exe 檔案解壓縮到空資料夾。您應該可以看到下列五個檔案:
Msstdfmt.dll
Msvbvm60.dll
Pst2gb.exe
Readme.rtf
Readme.txt
3. 啟動 Pst2gb.exe 程式。
4. 按一下 [Browse] 以選取檔案超大的 .pst 檔案,再按一下 [開啟]
5. 按一下 [Create],並選取要建立之截斷資料檔的名稱及位置,然後按一下 [存檔]
6. 輸入要在 .pst 檔中截斷的資料量。這並非您所使用的正確數量。最好是使用 20 到 25 MB,但您也可以截斷多一點或少一點。例如,如果您截斷 25 MB 的資料且此處理仍能繼續,則請重複此處理,並只從原始大小的 .pst 檔中截斷 15 MB。如果這樣也沒問題,請再試試 5 MB。如果 25 MB 無法作用,請重複此處理,並從原始大小的 .pst 檔中截斷 35 MB。如果這樣還是無法作用,請再增加數量,直到處理成功為止。
7. 針對縮小後的 .pst 檔執行「電子郵件信箱修復工具」(Scanpst.exe 檔)。
8. 在 Outlook 中開啟修復後的 .pst 檔。
9. (這個步驟只是建議使用,非絕對必要) 如果檔案開啟了,請以滑鼠右鍵按一下 .pst 的根資料夾,按一下 [內容],再按 [開始壓縮] 以啟動壓縮。此大小檔案的壓縮過程可能需要花費大約 4-8 個小時。
10. 如果檔案無法開啟,請捨棄截斷後的 .pst 檔,並以原始的 .pst 檔重複此處理。截去比第一次嘗試截斷更多的資料,再試一次此處理。
11. 根據您的 Outlook 版本安裝下列更新程式或 Hotfix。如果要執行這項操作,請檢視「Microsoft 知識庫」中的下列文件:
245025 (http://support.microsoft.com/kb/245025/) 如何取得並安裝 Office 2000 SR-1/SR-1a 更新
這些更新程式可避免 Outlook 允許 .pst 檔超過 2 GB 的最大容量。請使用下列方式之一管理 .pst 檔的大小:

使用一個以上的 .pst 檔。
使用封存功能。
將附件儲存在檔案系統資料夾,並從郵件中加以刪除。


2009年9月9日 星期三

比較 datetime 資料型態,別忘了0.999秒

看似相同的查詢式,查詢效率大不同



直想不出好的文句來述敘此現象的原由,粗操的說..
「經過convert後的資料,其排列的順序不見得和原資料型態相同,此失去索引提供的好處。」,也因此,查詢效率大不同!
另外,convert,確實也產生了不少的查詢成本。


總歸一句,
<1> 不要企圖將被搜尋資料欄位,將其轉換型別來等同於查詢式的條件。
<2> 而是要將查詢式的條件轉換,使其等同於欄位定義的資料型別。

2009年9月8日 星期二

SQL SERVER TRANSACTION 交易機制


時間序列

Update 1筆資料列,同1個欄位

Connection A

Connection B

<1>

Begin Tran

 

<2>

Select

 

<3>

 

Begin Tran

<4>

 

Select

<5>

 

Update (Success)

<6>

Update (未執行)

 

<7>

 

Commit Tran

<8>

Update (Success)

 

<9>

Commit Tran

 

 

    在未指定任何參數的情況下,select 並不會造成「鎖定」,而是在update時,才會造成以「資料列鎖定」。

    當先執行updateconnection,完成commit rollback的同時,另一connection update才得以繼續執行!