<?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>Another My Program &#187; Alter Table</title>
	<atom:link href="http://tim.diary.tw/tag/alter-table/feed/" rel="self" type="application/rss+xml" />
	<link>http://tim.diary.tw</link>
	<description>just another my program</description>
	<lastBuildDate>Sun, 29 Jan 2012 10:40:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://tim.diary.tw/?pushpress=hub'/>
		<item>
		<title>SQL Server Replication下的異動資料表</title>
		<link>http://tim.diary.tw/2008/09/23/sql-server-replication-table-modify/</link>
		<comments>http://tim.diary.tw/2008/09/23/sql-server-replication-table-modify/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 07:41:17 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[資料庫]]></category>
		<category><![CDATA[Alter Table]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://tim.diary.tw/2008/09/23/sql-server-replication%e4%b8%8b%e7%9a%84%e7%95%b0%e5%8b%95%e8%b3%87%e6%96%99%e8%a1%a8/</guid>
		<description><![CDATA[若是SQL Server已設定完成Replication的Article時, 進行資料表異動, 其實會透過 DDL 傳送的方式, 將異動的指令也透過複寫的方式送出, 並進行同步. 可以參考相關文章: http://www.replicationanswers.com/AlterSchema2005.asp 不過若是異動的欄位是 Primary Key時, 將會觸發 exception, 發出如下的訊息: Msg 4929, Level 16, State 1, Line 2 Cannot alter the table &#8216;tbltest&#8217; because it is being published for replication. 如此一來便無法使用這種 ddl 傳遞的方式將 Replicated Table 的異動送出. 若是要執行這樣的異動需求, 得先解除掉發行及訂閱此 table, 才能進行調整, 調整完成後才能再重新設定回發行及訂閱, 接下來再做 snap shot 進行遞送出去.]]></description>
			<content:encoded><![CDATA[<p>若是SQL Server已設定完成Replication的Article時, 進行資料表異動, 其實會透過 DDL 傳送的方式, 將異動的指令也透過複寫的方式送出, 並進行同步. 可以參考相關文章: <a href="http://www.replicationanswers.com/AlterSchema2005.asp">http://www.replicationanswers.com/AlterSchema2005.asp</a></p>
<p>不過若是異動的欄位是 Primary Key時, 將會觸發 exception, 發出如下的訊息:</p>
<p>Msg 4929, Level 16, State 1, Line 2<br />
Cannot alter the table &#8216;tbltest&#8217; because it is being published for replication.</p>
<p>如此一來便無法使用這種 ddl 傳遞的方式將 Replicated Table 的異動送出. 若是要執行這樣的異動需求, 得先解除掉發行及訂閱此 table, 才能進行調整, 調整完成後才能再重新設定回發行及訂閱, 接下來再做 snap shot 進行遞送出去.</p>
]]></content:encoded>
			<wfw:commentRss>http://tim.diary.tw/2008/09/23/sql-server-replication-table-modify/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

