<?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>Art Of Creation - Dynamics AX Blog &#187; synchronize</title>
	<atom:link href="http://www.artofcreation.be/tag/synchronize/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.artofcreation.be</link>
	<description>The everyday life of a Dynamics AX developer</description>
	<lastBuildDate>Thu, 02 Feb 2012 12:20:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>SQLDictionary synchronization problem</title>
		<link>http://www.artofcreation.be/2011/03/22/sqldictionary-synchronization-problem/</link>
		<comments>http://www.artofcreation.be/2011/03/22/sqldictionary-synchronization-problem/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 09:47:50 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Event Log]]></category>
		<category><![CDATA[synchronize]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=1106</guid>
		<description><![CDATA[Today, the following message popped up when synchronizing the Data Dictonary (Dutch): Kan meerdere records in Table list (SqlDictionary) niet toevoegen. Tabel: 118, 4. De SQL-database heeft een fout gegenereerd: It roughly translates to: Cannot insert multiple records in Table list (SQLDictionary). Tabel 118, 4. The SQL-Database has issued an error: Thanks to my colleague [...]]]></description>
			<content:encoded><![CDATA[<p>Today, the following message popped up when synchronizing the Data Dictonary (Dutch):</p>
<blockquote><p>Kan meerdere records in Table list (SqlDictionary) niet toevoegen. Tabel: 118, 4.<br />
De SQL-database heeft een fout gegenereerd:</p></blockquote>
<p>It roughly translates to:</p>
<blockquote><p>Cannot insert multiple records in Table list (SQLDictionary). Tabel 118, 4. The SQL-Database has issued an error:</p></blockquote>
<p>Thanks to my colleague <a href="http://www.ksaelen.be">Kenny</a>, we quickly figured out that the problem was that the <strong>disk was full</strong> on the SQL server where the data and log files were stored. SQL server also logged an error in the event viewer on the SQL server saying that the disk was full. </p>
<p>Lessons learned:</p>
<ul>
<li>Errors in AX don&#8217;t always point in the right direction</li>
<li>Check the event viewer on your servers</li>
<li>Be carefull with low disk space</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2011/03/22/sqldictionary-synchronization-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove duplicate key entry from a table</title>
		<link>http://www.artofcreation.be/2010/04/12/remove-duplicate-key-entry-in-a-table/</link>
		<comments>http://www.artofcreation.be/2010/04/12/remove-duplicate-key-entry-in-a-table/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 16:12:08 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Job]]></category>
		<category><![CDATA[synchronize]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=547</guid>
		<description><![CDATA[Sometimes, you can&#8217;t synchronize a table because is contains duplicate records. This can occur when you change field lengths on a extended data type for example. I’ve seen people write huge SQL statements, and even jobs that create these SQL statements to remove these duplicates from a table, but there’s actually a easy way to [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, you can&#8217;t synchronize a table because is contains duplicate records. This can occur when you change field lengths on a extended data type for example. </p>
<p>I’ve seen people write huge SQL statements, and even jobs that create these SQL statements to remove these duplicates from a table, but there’s actually a easy way to do this in AX. </p>
<p>Say you have a table KLFTestDuplicates that contains duplicates, then simple run the following job to remove them.</p>
<div class="codecolorer-container xpp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="xpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> KLFRemoveDuplicates<span style="color: #000000;">&#40;</span>Args _args<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; Set fieldSet <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> set<span style="color: #000000;">&#40;</span>Types<span style="color: #00007f;">::</span><span style="color: #000000;">Integer</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; DictIndex &nbsp;dictIndex <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> DictIndex<span style="color: #000000;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">tablenum</span><span style="color: #000000;">&#40;</span>KLFTestDuplicates<span style="color: #000000;">&#41;</span><span style="color: #00007f;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">indexnum</span><span style="color: #000000;">&#40;</span>KLFTestDuplicates<span style="color: #00007f;">,</span> AUniqueIdx<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #0000ff;">int</span> i;<br />
&nbsp; &nbsp; ;<br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>dictIndex.<span style="color: #000000;">numberOfFields</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">for</span><span style="color: #000000;">&#40;</span>i<span style="color: #00007f;">=</span><span style="color: #000000;">1</span>;i<span style="color: #00007f;">&lt;=</span>dictIndex.<span style="color: #000000;">numberOfFields</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;i<span style="color: #00007f;">++</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fieldSet.<span style="color: #000000;">add</span><span style="color: #000000;">&#40;</span>dictIndex.<span style="color: #000000;">field</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; ReleaseUpdateDB<span style="color: #00007f;">::</span><span style="color: #000000;">indexAllowDup</span><span style="color: #000000;">&#40;</span>dictIndex<span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; ReleaseUpdateDB<span style="color: #00007f;">::</span><span style="color: #000000;">deleteDuplicatesUsingIds</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">tablenum</span><span style="color: #000000;">&#40;</span>KLFTestDuplicates<span style="color: #000000;">&#41;</span><span style="color: #00007f;">,</span> <span style="color: #000000;">0</span><span style="color: #00007f;">,</span> fieldSet<span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; ReleaseUpdateDB<span style="color: #00007f;">::</span><span style="color: #000000;">indexAllowNoDup</span><span style="color: #000000;">&#40;</span>dictIndex<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; info<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;done&quot;</span><span style="color: #000000;">&#41;</span>;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Remember: this is useful when developing and testing, but it will remove data from you database, so use it with caution. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2010/04/12/remove-duplicate-key-entry-in-a-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

