<?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/"
	>

<channel>
	<title>hibbins.com</title>
	<atom:link href="http://www.hibbins.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hibbins.com</link>
	<description>Software Development: C#, SQL Server, .NET, Analysis Services, Reporting Services, Intergration Services, OLAP, PHP, HTML, XML, CSS, Java, Javascript and anything else technical, complex and hibbins.com</description>
	<pubDate>Wed, 17 Dec 2008 16:13:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SQL Server Schema,Table,Function and Stored procedure Auditing</title>
		<link>http://www.hibbins.com/2008/12/17/sql-server-schematablefunction-and-stored-procedure-auditing/</link>
		<comments>http://www.hibbins.com/2008/12/17/sql-server-schematablefunction-and-stored-procedure-auditing/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 16:09:47 +0000</pubDate>
		<dc:creator>Jon Hibbins</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[MSSQL2005]]></category>

		<category><![CDATA[MSSQL2008]]></category>

		<category><![CDATA[Objective-C]]></category>

		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[Software Development]]></category>

		<category><![CDATA[TSQL]]></category>

		<category><![CDATA[iPhone]]></category>

		<category><![CDATA[Audit]]></category>

		<category><![CDATA[Function]]></category>

		<category><![CDATA[SQL Server Schema]]></category>

		<category><![CDATA[Stored Procedure]]></category>

		<category><![CDATA[Table]]></category>

		<guid isPermaLink="false">http://www.hibbins.com/?p=187</guid>
		<description><![CDATA[If you like to know what&#8217;s changing on your SQL Server then the following code creates an audit table and the associated trigger for logging the changes
The Audit Object Table

CREATE TABLE &#91;dbo&#93;.&#91;AuditObjects&#93;&#40;
&#160;&#91;EventID&#93; &#91;int&#93; IDENTITY&#40;1,1&#41; NOT NULL
,&#91;EventData&#93; &#91;xml&#93; NULL
PRIMARY KEY CLUSTERED &#40;
&#160; &#160;&#91;EventID&#93; ASC
&#41; WITH &#40;IGNORE_DUP_KEY = OFF&#41; ON &#91;PRIMARY&#93;
&#41; ON &#91;PRIMARY&#93;

And the associated Trigger

CREATE TRIGGER [...]]]></description>
			<content:encoded><![CDATA[<p>If you like to know what&#8217;s changing on your SQL Server then the following code creates an audit table and the associated trigger for logging the changes</p>
<p>The Audit Object Table</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw1">CREATE</span> <span class="kw1">TABLE</span> <span class="br0">&#91;</span>dbo<span class="br0">&#93;</span>.<span class="br0">&#91;</span>AuditObjects<span class="br0">&#93;</span><span class="br0">&#40;</span><br />
&nbsp;<span class="br0">&#91;</span>EventID<span class="br0">&#93;</span> <span class="br0">&#91;</span>int<span class="br0">&#93;</span> IDENTITY<span class="br0">&#40;</span><span class="nu0">1</span>,<span class="nu0">1</span><span class="br0">&#41;</span> <span class="kw1">NOT</span> <span class="kw1">NULL</span><br />
,<span class="br0">&#91;</span>EventData<span class="br0">&#93;</span> <span class="br0">&#91;</span>xml<span class="br0">&#93;</span> <span class="kw1">NULL</span><br />
<span class="kw1">PRIMARY</span> <span class="kw1">KEY</span> CLUSTERED <span class="br0">&#40;</span><br />
&nbsp; &nbsp;<span class="br0">&#91;</span>EventID<span class="br0">&#93;</span> <span class="kw1">ASC</span><br />
<span class="br0">&#41;</span> <span class="kw1">WITH</span> <span class="br0">&#40;</span>IGNORE_DUP_KEY = OFF<span class="br0">&#41;</span> <span class="kw1">ON</span> <span class="br0">&#91;</span><span class="kw1">PRIMARY</span><span class="br0">&#93;</span><br />
<span class="br0">&#41;</span> <span class="kw1">ON</span> <span class="br0">&#91;</span><span class="kw1">PRIMARY</span><span class="br0">&#93;</span></div>
</div>
<p>And the associated Trigger</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw1">CREATE</span> <span class="kw1">TRIGGER</span> <span class="br0">&#91;</span>TriggerAuditObjects<span class="br0">&#93;</span><br />
<span class="kw1">ON</span> <span class="kw1">DATABASE</span><br />
<span class="kw1">FOR</span> DDL_DATABASE_LEVEL_EVENTS<br />
<span class="kw1">AS</span><br />
<span class="kw1">INSERT</span> <span class="kw1">INTO</span> <span class="br0">&#91;</span>dbo<span class="br0">&#93;</span>.<span class="br0">&#91;</span>AuditObjects<span class="br0">&#93;</span><span class="br0">&#40;</span>EventData<span class="br0">&#41;</span><br />
<span class="kw1">SELECT</span> EVENTDATA<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
GO<br />
ENABLE <span class="kw1">TRIGGER</span> <span class="br0">&#91;</span>TriggerAuditObjects<span class="br0">&#93;</span> <span class="kw1">ON</span> <span class="kw1">DATABASE</span></div>
</div>
<p>You can now use xpath queries to analyse the data</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.hibbins.com%2F2008%2F12%2F17%2Fsql-server-schematablefunction-and-stored-procedure-auditing%2F';
  addthis_title  = 'SQL+Server+Schema%2CTable%2CFunction+and+Stored+procedure+Auditing';
  addthis_pub    = 'JHibbins';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.hibbins.com/2008/12/17/sql-server-schematablefunction-and-stored-procedure-auditing/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Search Stored Procedures</title>
		<link>http://www.hibbins.com/2008/12/05/search-stored-procedures/</link>
		<comments>http://www.hibbins.com/2008/12/05/search-stored-procedures/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 09:21:50 +0000</pubDate>
		<dc:creator>Jon Hibbins</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Database]]></category>

		<category><![CDATA[MSSQL2005]]></category>

		<category><![CDATA[MSSQL2008]]></category>

		<category><![CDATA[Objective-C]]></category>

		<category><![CDATA[Quick Tips]]></category>

		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[TSQL]]></category>

		<category><![CDATA[iPhone]]></category>

		<category><![CDATA[Find]]></category>

		<category><![CDATA[MSSQL]]></category>

		<category><![CDATA[Replace]]></category>

		<category><![CDATA[Search]]></category>

		<category><![CDATA[Stored Procedures]]></category>

		<guid isPermaLink="false">http://www.hibbins.com/?p=173</guid>
		<description><![CDATA[Ever had the need to search stored procedures to find redundant tables or text that needs replacing or re-factoring ?
Here&#8217;s a script to help (Sorry for the cursor, I&#8217;m sad with myself for using it  )

&#8211; Search string
DECLARE @SearchString nvarchar&#40;50&#41;
SET @SearchString = &#8216;Search String&#8217;
&#8211; Required Declares
DECLARE @getdbname sysname
DECLARE @sqlstm nvarchar&#40;1000&#41;
DECLARE SeachCursor cursor FOR 
&#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Ever had the need to search stored procedures to find redundant tables or text that needs replacing or re-factoring ?</p>
<p>Here&#8217;s a script to help (Sorry for the cursor, I&#8217;m sad with myself for using it <img src='http://www.hibbins.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> )</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="co1">&#8211; Search string</span><br />
DECLARE @SearchString nvarchar<span class="br0">&#40;</span><span class="nu0">50</span><span class="br0">&#41;</span><br />
<span class="kw1">SET</span> @SearchString = <span class="st0">&#8216;Search String&#8217;</span></p>
<p><span class="co1">&#8211; Required Declares</span><br />
DECLARE @getdbname sysname<br />
DECLARE @sqlstm nvarchar<span class="br0">&#40;</span><span class="nu0">1000</span><span class="br0">&#41;</span><br />
DECLARE SeachCursor cursor <span class="kw1">FOR</span> <br />
<span class="co1">&#8211; Get All The Names into the SeachCursor</span><br />
<span class="kw1">SELECT</span> <span class="st0">&#8216;['</span>+name+<span class="st0">']&#8216;</span> <span class="kw1">FROM</span> <span class="br0">&#91;</span>master<span class="br0">&#93;</span>.<span class="br0">&#91;</span>dbo<span class="br0">&#93;</span>.<span class="br0">&#91;</span>sysdatabases<span class="br0">&#93;</span> <span class="kw1">ORDER</span> <span class="kw1">BY</span> name <br />
OPEN SeachCursor<br />
<span class="co1">&#8211; Add the Search Pattern</span><br />
<span class="kw1">SET</span> @SearchString = <span class="st0">&#8216;%&#8217;</span> + @SearchString + <span class="st0">&#8216;%&#8217;</span><br />
<span class="co1">&#8211;Get the first Name</span><br />
FETCH NEXT <span class="kw1">FROM</span> SeachCursor <span class="kw1">INTO</span> @getdbname<br />
WHILE @@FETCH_STATUS=<span class="nu0">0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; BEGIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">&#8211;set the statement to define the search condition, with variables</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">SET</span> @sqlstm = <span class="st0">&#8216;<br />
&nbsp; &nbsp; &nbsp; &nbsp; SELECT [SP].[Specific_Catalog] AS [Database_Name], [SP].[Routine_Name] AS [Stored Procedure Name],[SP].[Routine_Definition] AS [Routine_Definition]<br />
&nbsp; &nbsp; &nbsp; &nbsp; FROM &#8216;</span>+ @getdbname+<span class="st0">&#8216;.[Information_Schema].[Routines] AS [SP]<br />
&nbsp; &nbsp; &nbsp; &nbsp; WHERE PatIndex(&#8217;</span>+<span class="st0">&#8221;</span><span class="st0">&#8221;</span>+@SearchString+<span class="st0">&#8221;</span><span class="st0">&#8221;</span>+<span class="st0">&#8216;, [Routine_Definition]) &gt; 0&#8242;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">&#8211;Execute the Query</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; EXEC <span class="br0">&#40;</span>@sqlstm<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; FETCH NEXT <span class="kw1">FROM</span> SeachCursor <span class="kw1">INTO</span> @getdbname<br />
&nbsp; &nbsp; &nbsp; &nbsp; END<br />
<span class="co1">&#8211;Close the Cursor and Deallocate it from memory</span><br />
CLOSE SeachCursor<br />
DEALLOCATE SeachCursor</div>
</div>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.hibbins.com%2F2008%2F12%2F05%2Fsearch-stored-procedures%2F';
  addthis_title  = 'Search+Stored+Procedures';
  addthis_pub    = 'JHibbins';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.hibbins.com/2008/12/05/search-stored-procedures/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SQL 2008 Enable Changes To Tables</title>
		<link>http://www.hibbins.com/2008/10/08/sql-2008-enable-changes-to-tables/</link>
		<comments>http://www.hibbins.com/2008/10/08/sql-2008-enable-changes-to-tables/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 13:23:34 +0000</pubDate>
		<dc:creator>Jon Hibbins</dc:creator>
		
		<category><![CDATA[Database]]></category>

		<category><![CDATA[MSSQL2008]]></category>

		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[TSQL]]></category>

		<category><![CDATA[Microsoft SQL Server Management Studio]]></category>

		<category><![CDATA[not permitted]]></category>

		<category><![CDATA[re-created]]></category>

		<category><![CDATA[re-creation]]></category>

		<category><![CDATA[saving]]></category>

		<guid isPermaLink="false">http://www.hibbins.com/?p=168</guid>
		<description><![CDATA[If you get the error in the SQL 2008 Management Studio :
&#8220;Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can&#8217;t be re-created or enabled the option Prevent saving changes that require the table to be [...]]]></description>
			<content:encoded><![CDATA[<p>If you get the error in the SQL 2008 Management Studio :</p>
<p><em>&#8220;Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can&#8217;t be re-created or enabled the option Prevent saving changes that require the table to be re-created.&#8221;</em></p>
<p>You can enable changes inside the Microsoft SQL Server Management Studio by going to &#8216;Tools|Options|Designers&#8217; then unchecking the &#8216;Prevent saving changes that require table re-creation&#8217; option</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.hibbins.com%2F2008%2F10%2F08%2Fsql-2008-enable-changes-to-tables%2F';
  addthis_title  = 'SQL+2008+Enable+Changes+To+Tables';
  addthis_pub    = 'JHibbins';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.hibbins.com/2008/10/08/sql-2008-enable-changes-to-tables/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Autostart Zend Core on Ubuntu</title>
		<link>http://www.hibbins.com/2008/09/18/autostart-zend-core-on-ubuntu/</link>
		<comments>http://www.hibbins.com/2008/09/18/autostart-zend-core-on-ubuntu/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 07:13:21 +0000</pubDate>
		<dc:creator>Jon Hibbins</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Platform]]></category>

		<category><![CDATA[Unix/Linux]]></category>

		<category><![CDATA[Auto]]></category>

		<category><![CDATA[Boot]]></category>

		<category><![CDATA[Core]]></category>

		<category><![CDATA[Restart]]></category>

		<category><![CDATA[Startup]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.hibbins.com/?p=164</guid>
		<description><![CDATA[This is the 2nd time I have had to search for starting up Zend Core automatically on Ubuntu Workstation, so here is the answer:
First change the permissions of /etc/rc.local by opening a terminal window (Applications&#124;Accessories&#124;Terminal) and enter the following command:
sudo chmod 777 /etc/rc.local
Then open this file with the text editor (Applications&#124;Accessories&#124;Text Editor) and put the [...]]]></description>
			<content:encoded><![CDATA[<p>This is the 2nd time I have had to search for starting up Zend Core automatically on Ubuntu Workstation, so here is the answer:</p>
<p>First change the permissions <span class="MsgBodyText">of /etc/rc.local by opening a terminal window (Applications|Accessories|Terminal) and enter the following command:</span></p>
<blockquote><p><span class="MsgBodyText">sudo chmod 777 /etc/rc.local</span></p></blockquote>
<p><span class="MsgBodyText">Then open this file with the text editor </span><span class="MsgBodyText">(Applications|Accessories|Text Editor) and</span><span class="MsgBodyText"> put the following text before the exit 0 command<br />
</span></p>
<blockquote><p><span class="MsgBodyText">cd /usr/local/Zend/Core/mysql &amp;&amp; ./bin/safe_mysqld &amp;<br />
/usr/local/Zend/apache2/bin/apachectl start &amp;</span></p></blockquote>
<p>Zend Core, PHP and MySQL should now all start automaticaly at boot time.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.hibbins.com%2F2008%2F09%2F18%2Fautostart-zend-core-on-ubuntu%2F';
  addthis_title  = 'Autostart+Zend+Core+on+Ubuntu';
  addthis_pub    = 'JHibbins';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.hibbins.com/2008/09/18/autostart-zend-core-on-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TSQL Count Number Of Stored Procedures, Views, Tables or Functions</title>
		<link>http://www.hibbins.com/2008/09/04/tsql-count-number-of-stored-procedures-views-tables-or-functions/</link>
		<comments>http://www.hibbins.com/2008/09/04/tsql-count-number-of-stored-procedures-views-tables-or-functions/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 10:19:53 +0000</pubDate>
		<dc:creator>Jon Hibbins</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Database]]></category>

		<category><![CDATA[MSSQL2005]]></category>

		<category><![CDATA[MSSQL2008]]></category>

		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[Software Development]]></category>

		<category><![CDATA[TSQL]]></category>

		<category><![CDATA[Count]]></category>

		<category><![CDATA[Function]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Microsoft SQL Server]]></category>

		<category><![CDATA[SQL]]></category>

		<category><![CDATA[Stored Procedure]]></category>

		<category><![CDATA[Table]]></category>

		<category><![CDATA[View]]></category>

		<guid isPermaLink="false">http://www.hibbins.com/?p=155</guid>
		<description><![CDATA[You can use TSQL to Count Number Of Stored Procedures, Views, Tables or Functions in a Database by using the Database INFORMATION_SCHEMA view

/* Count Number Of Tables In A Database */
&#160; &#160; SELECT COUNT&#40;*&#41; AS TABLE_COUNT FROM INFORMATION_SCHEMA.TABLES
&#160; &#160; WHERE TABLE_TYPE=&#8216;BASE TABLE&#8217;
&#160; &#160; /* Count Number Of Views In A Database */
&#160; &#160; SELECT COUNT&#40;*&#41; [...]]]></description>
			<content:encoded><![CDATA[<p>You can use TSQL to Count Number Of Stored Procedures, Views, Tables or Functions in a Database by using the Database INFORMATION_SCHEMA view</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="coMULTI">/* Count Number Of Tables In A Database */</span><br />
&nbsp; &nbsp; <span class="kw1">SELECT</span> COUNT<span class="br0">&#40;</span>*<span class="br0">&#41;</span> <span class="kw1">AS</span> TABLE_COUNT <span class="kw1">FROM</span> INFORMATION_SCHEMA.<span class="kw1">TABLES</span><br />
&nbsp; &nbsp; <span class="kw1">WHERE</span> TABLE_TYPE=<span class="st0">&#8216;BASE TABLE&#8217;</span><br />
&nbsp; &nbsp; <span class="coMULTI">/* Count Number Of Views In A Database */</span><br />
&nbsp; &nbsp; <span class="kw1">SELECT</span> COUNT<span class="br0">&#40;</span>*<span class="br0">&#41;</span> <span class="kw1">AS</span> VIEW_COUNT <span class="kw1">FROM</span> INFORMATION_SCHEMA.VIEWS<br />
&nbsp; &nbsp; <span class="coMULTI">/* Count Number Of Stored Procedures In A Database */</span><br />
&nbsp; &nbsp; <span class="kw1">SELECT</span> COUNT<span class="br0">&#40;</span>*<span class="br0">&#41;</span> <span class="kw1">AS</span> PROCEDURE_COUNT <span class="kw1">FROM</span> INFORMATION_SCHEMA.ROUTINES <span class="kw1">WHERE</span> ROUTINE_TYPE = <span class="st0">&#8216;PROCEDURE&#8217;</span><br />
&nbsp; &nbsp; <span class="coMULTI">/* Count Number Of Functions In A Database */</span><br />
&nbsp; &nbsp; <span class="kw1">SELECT</span> COUNT<span class="br0">&#40;</span>*<span class="br0">&#41;</span> <span class="kw1">AS</span> FUNCTION_COUNT <span class="kw1">FROM</span> INFORMATION_SCHEMA.ROUTINES <span class="kw1">WHERE</span> ROUTINE_TYPE = <span class="st0">&#8216;FUNCTION&#8217;</span></div>
</div>
<p>The same methodology can be used to query for information :</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="coMULTI">/* Select Table Information For A Database */</span><br />
&nbsp; &nbsp; <span class="kw1">SELECT</span> * <span class="kw1">FROM</span> INFORMATION_SCHEMA.<span class="kw1">TABLES</span> <span class="kw1">WHERE</span> TABLE_TYPE=<span class="st0">&#8216;BASE TABLE&#8217;</span><br />
&nbsp; &nbsp; <span class="coMULTI">/* Select View Information For A Database */</span><br />
&nbsp; &nbsp; <span class="kw1">SELECT</span> * <span class="kw1">FROM</span> INFORMATION_SCHEMA.VIEWS<br />
&nbsp; &nbsp; <span class="coMULTI">/* Select Stored Procedure Information For A Database */</span><br />
&nbsp; &nbsp; <span class="kw1">SELECT</span> * <span class="kw1">FROM</span> INFORMATION_SCHEMA.ROUTINES <span class="kw1">WHERE</span> ROUTINE_TYPE = <span class="st0">&#8216;PROCEDURE&#8217;</span><br />
&nbsp; &nbsp; <span class="coMULTI">/* Select Function Information For A Database */</span><br />
&nbsp; &nbsp; <span class="kw1">SELECT</span> * <span class="kw1">FROM</span> INFORMATION_SCHEMA.ROUTINES <span class="kw1">WHERE</span> ROUTINE_TYPE = <span class="st0">&#8216;FUNCTION&#8217;</span></div>
</div>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.hibbins.com%2F2008%2F09%2F04%2Ftsql-count-number-of-stored-procedures-views-tables-or-functions%2F';
  addthis_title  = 'TSQL+Count+Number+Of+Stored+Procedures%2C+Views%2C+Tables+or+Functions';
  addthis_pub    = 'JHibbins';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.hibbins.com/2008/09/04/tsql-count-number-of-stored-procedures-views-tables-or-functions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SQL Server - TSQL DISTINCT or GROUP BY?</title>
		<link>http://www.hibbins.com/2008/09/03/sql-server-tsql-distinct-or-group-by/</link>
		<comments>http://www.hibbins.com/2008/09/03/sql-server-tsql-distinct-or-group-by/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 10:47:46 +0000</pubDate>
		<dc:creator>Jon Hibbins</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Database]]></category>

		<category><![CDATA[MSSQL2005]]></category>

		<category><![CDATA[MSSQL2008]]></category>

		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[Software Development]]></category>

		<category><![CDATA[TSQL]]></category>

		<category><![CDATA[DISTINCT]]></category>

		<category><![CDATA[GROUP BY]]></category>

		<category><![CDATA[GROUPBY]]></category>

		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.hibbins.com/?p=153</guid>
		<description><![CDATA[DISTINCT v GROUP BY
A DISTINCT and GROUP BY usually generate the same query plan, so performance should be very simular or the same, if you only need to remove the dulicates then DISTINCT is easier to understand in the query, if you have a more complex query it may be worth running both and studdying [...]]]></description>
			<content:encoded><![CDATA[<p>DISTINCT v GROUP BY</p>
<p>A DISTINCT and GROUP BY usually generate the same query plan, so performance should be very simular or the same, if you only need to remove the dulicates then DISTINCT is easier to understand in the query, if you have a more complex query it may be worth running both and studdying the execution plan to see if your specific example wins</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.hibbins.com%2F2008%2F09%2F03%2Fsql-server-tsql-distinct-or-group-by%2F';
  addthis_title  = 'SQL+Server+-+TSQL+DISTINCT+or+GROUP+BY%3F';
  addthis_pub    = 'JHibbins';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.hibbins.com/2008/09/03/sql-server-tsql-distinct-or-group-by/feed/</wfw:commentRss>
		</item>
		<item>
		<title>iPhone Developer Provision Issue on Device</title>
		<link>http://www.hibbins.com/2008/08/27/iphone-developer-provision-issue-on-device/</link>
		<comments>http://www.hibbins.com/2008/08/27/iphone-developer-provision-issue-on-device/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 11:40:57 +0000</pubDate>
		<dc:creator>Jon Hibbins</dc:creator>
		
		<category><![CDATA[Objective-C]]></category>

		<category><![CDATA[Quick Tips]]></category>

		<category><![CDATA[iPhone]]></category>

		<category><![CDATA[application-identifier]]></category>

		<category><![CDATA[Code Signing]]></category>

		<category><![CDATA[Developer]]></category>

		<category><![CDATA[Distribution]]></category>

		<guid isPermaLink="false">http://www.hibbins.com/?p=150</guid>
		<description><![CDATA[After a number of compile to iPhone device issues, specifically: &#8220;entitlement &#8216;application-identifier&#8217; has value not permitted by provisioning profile&#8221; and &#8220;Command /usr/bin/codesign failed with exit code 1&#8243;, I have worked out you can have one and only one developer provision and developer application on the iPhone at a time otherwise you get installation errors etc&#8230;
I [...]]]></description>
			<content:encoded><![CDATA[<p>After a number of compile to iPhone device issues, specifically: &#8220;entitlement &#8216;application-identifier&#8217; has value not permitted by provisioning profile&#8221; and &#8220;Command /usr/bin/codesign failed with exit code 1&#8243;, I have worked out you can have one and only one developer provision and developer application on the iPhone at a time otherwise you get installation errors etc&#8230;</p>
<p>I also had to have the correct Bundle Identifier in the Info.plist file and make sure the &#8216;Code Signing Identity&#8217; and &#8216;Code Signing Provisioning Profile&#8217; was also correct.</p>
<p>Hopefully this is useful to someone, Good Luck!!!</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.hibbins.com%2F2008%2F08%2F27%2Fiphone-developer-provision-issue-on-device%2F';
  addthis_title  = 'iPhone+Developer+Provision+Issue+on+Device';
  addthis_pub    = 'JHibbins';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.hibbins.com/2008/08/27/iphone-developer-provision-issue-on-device/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Objective-C Mod Command</title>
		<link>http://www.hibbins.com/2008/08/22/objective-c-mod-command/</link>
		<comments>http://www.hibbins.com/2008/08/22/objective-c-mod-command/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 11:43:40 +0000</pubDate>
		<dc:creator>Jon Hibbins</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Objective-C]]></category>

		<category><![CDATA[Quick Tips]]></category>

		<category><![CDATA[Software Development]]></category>

		<category><![CDATA[iPhone]]></category>

		<category><![CDATA[Command]]></category>

		<category><![CDATA[div]]></category>

		<category><![CDATA[Mod]]></category>

		<guid isPermaLink="false">http://www.hibbins.com/?p=145</guid>
		<description><![CDATA[If you are looking for the Objective-C Mod Command then look no further
To get the equivalent of a = b div c then :

a = b % c


  addthis_url    = 'http%3A%2F%2Fwww.hibbins.com%2F2008%2F08%2F22%2Fobjective-c-mod-command%2F';
  addthis_title  = 'Objective-C+Mod+Command';
  addthis_pub    = 'JHibbins';

]]></description>
			<content:encoded><![CDATA[<p>If you are looking for the Objective-C Mod Command then look no further</p>
<p>To get the equivalent of a = b div c then :</p>
<div class="codesnip-container" >
<div class="codesnip">a = b % c</div>
</div>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.hibbins.com%2F2008%2F08%2F22%2Fobjective-c-mod-command%2F';
  addthis_title  = 'Objective-C+Mod+Command';
  addthis_pub    = 'JHibbins';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.hibbins.com/2008/08/22/objective-c-mod-command/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Quick Tip: C# Current Application Version</title>
		<link>http://www.hibbins.com/2008/08/11/quick-tip-c-current-application-version/</link>
		<comments>http://www.hibbins.com/2008/08/11/quick-tip-c-current-application-version/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 16:38:41 +0000</pubDate>
		<dc:creator>Jon Hibbins</dc:creator>
		
		<category><![CDATA[Quick Tips]]></category>

		<category><![CDATA[Application]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[Quick Tip]]></category>

		<category><![CDATA[Version]]></category>

		<guid isPermaLink="false">http://www.hibbins.com/?p=142</guid>
		<description><![CDATA[Quick Tip: C# Current Application Version:

System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion;


  addthis_url    = 'http%3A%2F%2Fwww.hibbins.com%2F2008%2F08%2F11%2Fquick-tip-c-current-application-version%2F';
  addthis_title  = 'Quick+Tip%3A+C%23+Current+Application+Version';
  addthis_pub    = 'JHibbins';

]]></description>
			<content:encoded><![CDATA[<p>Quick Tip: C# Current Application Version:</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw5">System</span>.<span class="me1">Deployment</span>.<span class="me1">Application</span>.<span class="me1">ApplicationDeployment</span>.<span class="me1">CurrentDeployment</span>.<span class="me1">CurrentVersion</span>;</div>
</div>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.hibbins.com%2F2008%2F08%2F11%2Fquick-tip-c-current-application-version%2F';
  addthis_title  = 'Quick+Tip%3A+C%23+Current+Application+Version';
  addthis_pub    = 'JHibbins';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.hibbins.com/2008/08/11/quick-tip-c-current-application-version/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Take a MSSQL database offline and back online with TSQL</title>
		<link>http://www.hibbins.com/2008/08/05/take-a-mssql-database-offline-and-back-online-with-tsql/</link>
		<comments>http://www.hibbins.com/2008/08/05/take-a-mssql-database-offline-and-back-online-with-tsql/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 06:29:29 +0000</pubDate>
		<dc:creator>Jon Hibbins</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Database]]></category>

		<category><![CDATA[MSSQL2005]]></category>

		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[Software Development]]></category>

		<category><![CDATA[TSQL]]></category>

		<category><![CDATA[MSSQL]]></category>

		<category><![CDATA[Offline]]></category>

		<category><![CDATA[Online]]></category>

		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.hibbins.com/?p=119</guid>
		<description><![CDATA[Take a database offline with TSQL:
&#8211; Kill All Other Users Processes And Set The Database To Single User Mode
ALTER DATABASE AdventureWorks
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
&#8211; Take Offline
EXEC sp_dboption &#8216;AdventureWorks&#8217;, &#8216;offline&#8217;, &#8216;TRUE&#8217; 
And restoring the database back to online with TSQL:
&#8211; Allow Users Back In By Setting Multi User Mode On
ALTER DATABASE AdventureWorks SET MULTI_USER
&#8211; Bring Back [...]]]></description>
			<content:encoded><![CDATA[<p>Take a database offline with TSQL:</p>
<blockquote><p><span style="color: #008000;">&#8211; Kill All Other Users Processes And Set The Database To Single User Mode</span><br />
<span style="color: #0000ff;">ALTER DATABASE </span>AdventureWorks<br />
<span style="color: #0000ff;">SET SINGLE_USER</span><br />
<span style="color: #0000ff;">WITH ROLLBACK IMMEDIATE</span><br />
<span style="color: #008000;">&#8211; Take Offline<br />
</span><span style="color: #0000ff;">EXEC </span><span style="color: #800000;">sp_dboption </span><span style="color: #ff0000;">&#8216;AdventureWorks&#8217;</span>, <span style="color: #ff0000;">&#8216;offline&#8217;</span>, <span style="color: #ff0000;">&#8216;TRUE&#8217; </span></p></blockquote>
<p>And restoring the database back to online with TSQL:</p>
<blockquote><p><span style="color: #008000;">&#8211; Allow Users Back In By Setting Multi User Mode On</span><br />
<span style="color: #0000ff;">ALTER DATABASE</span> AdventureWorks <span style="color: #0000ff;">SET MULTI_USER</span><br />
<span style="color: #008000;">&#8211; Bring Back Online<br />
</span><span style="color: #0000ff;">EXEC </span><span style="color: #800000;">sp_dboption </span><span style="color: #ff0000;">&#8216;AdventureWorks&#8217;</span>, <span style="color: #ff0000;">&#8216;offline&#8217;</span>, <span style="color: #ff0000;">&#8216;FALSE&#8217; </span></p></blockquote>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.hibbins.com%2F2008%2F08%2F05%2Ftake-a-mssql-database-offline-and-back-online-with-tsql%2F';
  addthis_title  = 'Take+a+MSSQL+database+offline+and+back+online+with+TSQL';
  addthis_pub    = 'JHibbins';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.hibbins.com/2008/08/05/take-a-mssql-database-offline-and-back-online-with-tsql/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
