<?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; Event Log</title>
	<atom:link href="http://www.artofcreation.be/tag/event-log/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>Writing in the event log from Dynamics AX</title>
		<link>http://www.artofcreation.be/2009/06/19/writing-in-the-event-log-from-dynamics-ax/</link>
		<comments>http://www.artofcreation.be/2009/06/19/writing-in-the-event-log-from-dynamics-ax/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 11:14:55 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Batch]]></category>
		<category><![CDATA[Event Log]]></category>
		<category><![CDATA[System.Diagnostics]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=125</guid>
		<description><![CDATA[Writing to the event log in Windows using AX is very easy when you use the EventLog class from the System.Diagnostics namespace. The following job demonstrates how to use the EventLog class. static void EventViewer&#40;Args _args&#41; &#123; &#160; &#160; System.Diagnostics.EventLog eventlog; &#160; &#160; #Define.LogSource&#40;&#34;Dynamics AX&#34;&#41; &#160; &#160; #Define.LogName&#40;&#34;Dynamics AX Log&#34;&#41; &#160; &#160; &#160; &#160; ; [...]]]></description>
			<content:encoded><![CDATA[<p>Writing to the event log in Windows using AX is very easy when you use the EventLog class from the System.Diagnostics namespace. The following job demonstrates how to use the EventLog class.</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> EventViewer<span style="color: #000000;">&#40;</span>Args _args<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; System.<span style="color: #000000;">Diagnostics</span>.<span style="color: #000000;">EventLog</span> eventlog;<br />
&nbsp; &nbsp; #Define.<span style="color: #000000;">LogSource</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;Dynamics AX&quot;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; #Define.<span style="color: #000000;">LogName</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;Dynamics AX Log&quot;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; ;<br />
&nbsp; &nbsp; <span style="color: #007f00;">// check if the log already exists</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span><span style="color: #00007f;">!</span>System.<span style="color: #000000;">Diagnostics</span>.<span style="color: #000000;">EventLog</span><span style="color: #00007f;">::</span><span style="color: #000000;">SourceExists</span><span style="color: #000000;">&#40;</span>#LogSource<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: #007f00;">// create new log</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; System.<span style="color: #000000;">Diagnostics</span>.<span style="color: #000000;">EventLog</span><span style="color: #00007f;">::</span><span style="color: #000000;">CreateEventSource</span><span style="color: #000000;">&#40;</span>#LogSource<span style="color: #00007f;">,</span> #LogName<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; eventlog <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> System.<span style="color: #000000;">Diagnostics</span>.<span style="color: #000000;">EventLog</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; eventlog.<span style="color: #000000;">set_Source</span><span style="color: #000000;">&#40;</span>#LogSource<span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// write info entry</span><br />
&nbsp; &nbsp; eventlog.<span style="color: #000000;">WriteEntry</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;Just writing in the event viewer.&quot;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #007f00;">// write error entry</span><br />
&nbsp; &nbsp; eventlog.<span style="color: #000000;">WriteEntry</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;Error! Please check the stack trace below. <span style="color: #000000;">\n</span><span style="color: #000000;">\n</span>&quot;</span> <span style="color: #00007f;">+</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; con2str<span style="color: #000000;">&#40;</span>xSession<span style="color: #00007f;">::</span><span style="color: #000000;">xppCallStack</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #00007f;">,</span> System.<span style="color: #000000;">Diagnostics</span>.<span style="color: #000000;">EventLogEntryType</span><span style="color: #00007f;">::</span><span style="color: #000000;">Error</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #007f00;">// write warning entry</span><br />
&nbsp; &nbsp; eventlog.<span style="color: #000000;">WriteEntry</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;Job finished.&quot;</span> <span style="color: #00007f;">,</span> System.<span style="color: #000000;">Diagnostics</span>.<span style="color: #000000;">EventLogEntryType</span><span style="color: #00007f;">::</span><span style="color: #000000;">Warning</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; info<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;Check the event viewer!&quot;</span><span style="color: #000000;">&#41;</span>;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>A possible use for this is when monitoring batch jobs.<br />
Tested using AX 2009, XP Pro. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2009/06/19/writing-in-the-event-log-from-dynamics-ax/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

