<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>I&#039;m CaLendarW Blog &#187; mssql</title>
	<atom:link href="http://wongkalun.idv.hk/tag/mssql/feed/" rel="self" type="application/rss+xml" />
	<link>http://wongkalun.idv.hk</link>
	<description>任何時間，都要用內心既一點光，照亮世界</description>
	<lastBuildDate>Wed, 07 Dec 2011 15:39:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>MsSQL &#8211; Identity Generator</title>
		<link>http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/</link>
		<comments>http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 15:24:39 +0000</pubDate>
		<dc:creator>calendarw</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[error handling]]></category>
		<category><![CDATA[mssql]]></category>

		<guid isPermaLink="false">http://wongkalun.idv.hk/?p=629</guid>
		<description><![CDATA[MsSQL 內既 Identity Generator, 雖然被發現當 Table 儲存超過一百萬行時, 由 SELECT @@Identity 或者 SELECT SCOPE_IDENTITY() 會存在 Return 值錯誤既問題, 但經過呢個幾月既開發都未出現問題. 係 MsSQL 入面, 新增 Record 時主要提取 Primary Key 既方法主要有 @@IDENTITY, SCOPE_IDENTY() 同 IDENT_CURRENT(&#8216;table_name&#8217;) 三種: @@IDENTITY 使用 @@IDENTITY 會 Return 當前 Session 任何 Table 最後生產的 Primary Key, 如果 Insert statement 運行後如果有任何 Trigger 中會 Insert 在其他 Table 的話, @@IDENTITY 就會變得不準確. [...]]]></description>
		<wfw:commentRss>http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Avoid identity generator when possible</title>
		<link>http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/</link>
		<comments>http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 15:50:11 +0000</pubDate>
		<dc:creator>calendarw</dc:creator>
				<category><![CDATA[diary]]></category>
		<category><![CDATA[error handling]]></category>
		<category><![CDATA[mssql]]></category>

		<guid isPermaLink="false">http://wongkalun.idv.hk/?p=440</guid>
		<description><![CDATA[係 Ayende 個 Blog 度見到呢個 post, 入面講述應該避免使用 identity. 由 Dave 於上年二月回報 M$ 既一個 feedback 中提及, 只要新增多個一百萬行數據, 個 identity 就會被 reset 做 1. 雖然我未測試過係咪真係有呢個情況, 但該文章中已經有五個人証明左問題既存在, 而我計算過, 如果在同一個 table 入面, 一日新增五百行數據的話, 只要五年多既時間便會去到一百萬行. 五年, 雖然我以前跟開既項目都有三年一次既資料清理, 但亦有機會有每日多於五百行或者五年不清理既情況發生. 以我在網上既搜尋下, 而家外國都開始使用 Guid, 除了同 database 有關既連結外, 我見過 M$ 既 WF Example 入面已經全部使用了 Guid, 我諗有時間既情況下都要了解一下 Guid 既好處同壞處. dtsv.dtse_post_440_permalink = 'http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/'; dtsv.dtse_post_440_title = 'Avoid [...]]]></description>
		<wfw:commentRss>http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

