<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Development</title>
        <link>http://bigkspub.com/blog/category/6.aspx</link>
        <description>Posts about software development.</description>
        <language>en-US</language>
        <copyright>Keith</copyright>
        <managingEditor>keith@bigkspub.com</managingEditor>
        <generator>Subtext Version 1.9.2.0</generator>
        <item>
            <title>The case of the ever growing database file</title>
            <link>http://bigkspub.com/blog/archive/2008/06/08/857.aspx</link>
            <description>&lt;p&gt;I created a maintenance plan for our warehouse management system SQL Server database that included a rebuild of the indexes on all the tables. All went well except that the size of the database file just happened to triple after my plan ran! Not good. Since I'm learning to be a DBA by the seat of my pants it took me a while to figure out what was going on.&lt;/p&gt;
&lt;p&gt;Before implementing the plan, I spent a lot of time researching the correct way to rebuild the indexes. I wanted to make sure we were doing things the way they should be done. I found an blog post about rebuilding the indexes with the correct Fill Factor so that the performance wouldn't suffer due to page faults and such. So after doing a little analysis and asking some questions to the boss, I came up with a Fill Factor percentage that I thought was suitable for the indexes on our tables.&lt;/p&gt;
&lt;p&gt;Using the built in tool in SQL Server Management Studio to create my rebuild task I entered the percentage of &lt;strong&gt;free space&lt;/strong&gt; that I wanted in my index pages just like the dialog says. &lt;strong&gt;THE AMOUNT OF FREE SPACE&lt;/strong&gt; which to me means that &lt;strong&gt;THE FILL FACTOR WILL BE 100 MINUS THE VALUE I ENTER. &lt;/strong&gt;Makes sense yes?&lt;/p&gt;
&lt;p&gt;&lt;img alt="SQL Server Management Studio Edit Rebuild Index Task Dialog" src="http://www.bigkspub.com/images/RebuildIndexEditDlg.JPG" /&gt;&lt;/p&gt;
&lt;p&gt; So I enter 30% because I want a Fill Factor of 70%. Well, that's not what happened! The T-SQL that was generated when the task ran gave me a Fill Factor of 30% and a free space of 70%. That made the size of the database file grow! I looked in sysindexes table to confirm my findings and saw that the OrigFillFactor values were indeed 30. I'm not sure what happened but when I checked the T-SQL myself by clicking the View T-SQL button on the dialog it showed a Fill Factor of 70. Because of this, I no longer trust the tool so I decided to write my own SQL to rebuild the indexes.&lt;/p&gt;
&lt;p&gt;So I guess the purpose of this post is to help anyone else who might be having trouble with this. It took me quite a while to find the answer to this problem so hopefully this post will get picked up by Google and help someone out.&lt;/p&gt;
&lt;p&gt;My code to rebuild the indexes is listed below. I ran this manually in SQL Management Studio and then had to shrink the database to get my database file size back to normal. Now, I know that shrinking the database fragments the indexes I just rebuilt but I'll do another rebuild after shrinking to get rid of the fragmenation.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="codeBlock"&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;USE&lt;/font&gt; [DatabaseName]&lt;br /&gt;
GO&lt;br /&gt;
&lt;br /&gt;
&lt;font color="#0000ff"&gt;DECLARE&lt;/font&gt; @currentTable &lt;font color="#0000ff"&gt;VARCHAR&lt;/font&gt;(50)&lt;br /&gt;
&lt;font color="#0000ff"&gt;DECLARE&lt;/font&gt; @cmd &lt;font color="#0000ff"&gt;VARCHAR&lt;/font&gt;(1000)&lt;br /&gt;
&lt;br /&gt;
&lt;font color="#0000ff"&gt;DECLARE&lt;/font&gt; tableNameCursor &lt;font color="#0000ff"&gt;CURSOR&lt;/font&gt;&lt;br /&gt;
&lt;font color="#0000ff"&gt;FOR SELECT&lt;/font&gt; [name] &lt;font color="#0000ff"&gt;FROM&lt;/font&gt; sysobjects &lt;font color="#0000ff"&gt;WHERE&lt;/font&gt; sysobjects.[type] = 'U' &lt;font color="#0000ff"&gt;ORDER BY&lt;/font&gt; [name] &lt;font color="#0000ff"&gt;ASC&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;font color="#0000ff"&gt;OPEN&lt;/font&gt; tableNameCursor&lt;br /&gt;
&lt;font color="#0000ff"&gt;FETCH NEXT FROM&lt;/font&gt; tableNameCursor &lt;font color="#0000ff"&gt;INTO&lt;/font&gt; @currentTable&lt;br /&gt;
&lt;br /&gt;
&lt;font color="#0000ff"&gt;WHILE&lt;/font&gt; @@FETCH_STATUS = 0&lt;br /&gt;
&lt;font color="#0000ff"&gt;BEGIN&lt;/font&gt;&lt;br /&gt;
&lt;font color="#0000ff"&gt;SET&lt;/font&gt; @cmd = &lt;font color="#ff0000"&gt;'ALTER INDEX ALL ON ['&lt;/font&gt; + @currentTable + '&lt;font color="#ff0000"&gt;] REBUILD WITH (FILLFACTOR = 95, SORT_IN_TEMPDB = ON, STATISTICS_NORECOMPUTE = ON)'&lt;/font&gt;&lt;br /&gt;
&lt;font color="#0000ff"&gt;EXEC&lt;/font&gt; (@cmd)&lt;br /&gt;
&lt;br /&gt;
&lt;font color="#0000ff"&gt;FETCH NEXT FROM&lt;/font&gt; tableNameCursor &lt;font color="#0000ff"&gt;INTO&lt;/font&gt; @currentTable&lt;br /&gt;
&lt;font color="#0000ff"&gt;END&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;font color="#0000ff"&gt;CLOSE&lt;/font&gt; tableNameCursor&lt;br /&gt;
&lt;font color="#0000ff"&gt;DEALLOCATE&lt;/font&gt; tableNameCursor&lt;/font&gt;&lt;/div&gt;
&lt;p&gt;Make sure you type the database name in the first line and enter your own Fill Factor. I have 95 which equates to 95% and leaves 5% free space.&lt;/p&gt;&lt;img src="http://bigkspub.com/blog/aggbug/857.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Keith</dc:creator>
            <guid>http://bigkspub.com/blog/archive/2008/06/08/857.aspx</guid>
            <pubDate>Sun, 08 Jun 2008 14:12:40 GMT</pubDate>
            <wfw:comment>http://bigkspub.com/blog/comments/857.aspx</wfw:comment>
            <comments>http://bigkspub.com/blog/archive/2008/06/08/857.aspx#feedback</comments>
            <wfw:commentRss>http://bigkspub.com/blog/comments/commentRss/857.aspx</wfw:commentRss>
            <trackback:ping>http://bigkspub.com/blog/services/trackbacks/857.aspx</trackback:ping>
        </item>
        <item>
            <title>Belle Tire - The First Week</title>
            <link>http://bigkspub.com/blog/archive/2008/04/26/853.aspx</link>
            <description>&lt;p&gt;Well my first week at &lt;a href="http://www.belletire.com"&gt;Belle Tire&lt;/a&gt; is over. I have to say that I really think I'm going to like it there (fingers crossed!). It's pretty laid back and I can pretty much make my own hours. So far, I've been going in early so I can leave early. I was home by 5:00 every day last week and that was sweet!&lt;/p&gt;
&lt;p&gt;Another thing that we &lt;em&gt;don't&lt;/em&gt; do there that I'm really happy about is keep track of our time. I know that sounds like a trivial item but at my last employer we had to track &lt;em&gt;EVERY 15 MINUTES&lt;/em&gt; of time we worked and it was really horrible. At least for me it was being the OCD freak that I am.&lt;/p&gt;
&lt;p&gt;My first assignment was to create a report detailing an estimate for work to be done. Not too bad even thought it took me pretty much all week to get it done. That said, I had a pretty big learning curve with the database (Informix - which I've never used) and Crystal Reports (again, I've never used). But, I got it done and even added a nice little feature that allows the customer service rep to email it right to the customer. All in all, a productive week.&lt;/p&gt;&lt;img src="http://bigkspub.com/blog/aggbug/853.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Keith</dc:creator>
            <guid>http://bigkspub.com/blog/archive/2008/04/26/853.aspx</guid>
            <pubDate>Sat, 26 Apr 2008 14:40:08 GMT</pubDate>
            <wfw:comment>http://bigkspub.com/blog/comments/853.aspx</wfw:comment>
            <comments>http://bigkspub.com/blog/archive/2008/04/26/853.aspx#feedback</comments>
            <wfw:commentRss>http://bigkspub.com/blog/comments/commentRss/853.aspx</wfw:commentRss>
            <trackback:ping>http://bigkspub.com/blog/services/trackbacks/853.aspx</trackback:ping>
        </item>
        <item>
            <title>Hybrid Training and Technology Partners (HTTP)</title>
            <link>http://bigkspub.com/blog/archive/2008/04/26/852.aspx</link>
            <description>&lt;p&gt;&lt;a class="postLink" href="http://www.linkedin.com/in/jeffm262"&gt;My friend&lt;/a&gt; and former co-worker has started &lt;a class="postLink" href="http://salinehttpblog.blogspot.com/"&gt;blogging&lt;/a&gt;. He started a technology company named &lt;a class="postLink" href="http://hybridtraining.net/"&gt;Hybrid Technology and Training Partners&lt;/a&gt; (HTTP for short) after leaving The Solutions Group where we both worked. So far, most, if not all of his posts are about the daily activities and growth of his business. I read nearly all of the posts today and I have to say it was pretty interesting. It doesn't hurt that Jeff has an incredible vocabulary and is quite the wordsmith.&lt;/p&gt;
&lt;p&gt;Anyway, Jeff does some great work and will treat you right. You should &lt;a class="postLink" href="http://hybridtraining.net/contactus.aspx"&gt;give him a call&lt;/a&gt; if you have computer problems. And don't forget to check out his blog and company web site!&lt;/p&gt;
&lt;p&gt;&lt;a class="postLink" href="http://hybridtraining.net"&gt;http://hybridtraining.net&lt;/a&gt; and &lt;a class="postLink" href="http://salinehttpblog.blogspot.com"&gt;http://salinehttpblog.blogspot.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://bigkspub.com/blog/aggbug/852.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Keith</dc:creator>
            <guid>http://bigkspub.com/blog/archive/2008/04/26/852.aspx</guid>
            <pubDate>Sat, 26 Apr 2008 14:25:26 GMT</pubDate>
            <wfw:comment>http://bigkspub.com/blog/comments/852.aspx</wfw:comment>
            <comments>http://bigkspub.com/blog/archive/2008/04/26/852.aspx#feedback</comments>
            <wfw:commentRss>http://bigkspub.com/blog/comments/commentRss/852.aspx</wfw:commentRss>
            <trackback:ping>http://bigkspub.com/blog/services/trackbacks/852.aspx</trackback:ping>
        </item>
        <item>
            <title>Crazy Day at Work</title>
            <link>http://bigkspub.com/blog/archive/2008/02/11/846.aspx</link>
            <description>&lt;p&gt;My very good friend, and the person who got me my current job, was fired today. Not only that, but the long time number 2 man turned in his resignation today. Things have not been good for a while at the office. Cash flow is tight. The direction of the company has changed since I hired in. The project list is short and not very interesting. Interesting to me anyway.&lt;/p&gt;
&lt;p&gt;The weird thing about Ronda getting fired is that she said it happened right in the middle of a meeting! Like it was something that just occurred to the owner! I'm sure he'd been thinking about it but you'd think it would be a meeting of its own. Strange. Very strange.&lt;/p&gt;
&lt;p&gt;The thing is now no one can feel safe. No one can be trusted.&lt;/p&gt;
&lt;p&gt;I just bought a new house. Shit.&lt;/p&gt;&lt;img src="http://bigkspub.com/blog/aggbug/846.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Keith</dc:creator>
            <guid>http://bigkspub.com/blog/archive/2008/02/11/846.aspx</guid>
            <pubDate>Tue, 12 Feb 2008 03:46:34 GMT</pubDate>
            <wfw:comment>http://bigkspub.com/blog/comments/846.aspx</wfw:comment>
            <comments>http://bigkspub.com/blog/archive/2008/02/11/846.aspx#feedback</comments>
            <wfw:commentRss>http://bigkspub.com/blog/comments/commentRss/846.aspx</wfw:commentRss>
            <trackback:ping>http://bigkspub.com/blog/services/trackbacks/846.aspx</trackback:ping>
        </item>
        <item>
            <title>I took it!</title>
            <link>http://bigkspub.com/blog/archive/2007/04/30/823.aspx</link>
            <description>&lt;p&gt;The &lt;a href="http://www.alistapart.com/"&gt;A List Apart&lt;/a&gt; &lt;a href="http://alistapart.com/articles/webdesignsurvey"&gt;Web Design Survey&lt;/a&gt; that is. Not that I would call myself a "web designer" but I do create, design (a little, mostly I ask my daughter for help), and code various web sites.&lt;/p&gt;
&lt;p&gt;You should take it too!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://alistapart.com/articles/webdesignsurvey"&gt;&lt;img alt="" src="http://www.bigkspub.com/images/WebDesignSurvey.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://bigkspub.com/blog/aggbug/823.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Keith</dc:creator>
            <guid>http://bigkspub.com/blog/archive/2007/04/30/823.aspx</guid>
            <pubDate>Mon, 30 Apr 2007 14:35:01 GMT</pubDate>
            <wfw:comment>http://bigkspub.com/blog/comments/823.aspx</wfw:comment>
            <comments>http://bigkspub.com/blog/archive/2007/04/30/823.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://bigkspub.com/blog/comments/commentRss/823.aspx</wfw:commentRss>
            <trackback:ping>http://bigkspub.com/blog/services/trackbacks/823.aspx</trackback:ping>
        </item>
        <item>
            <title>Introducing MyChkBook.com</title>
            <link>http://bigkspub.com/blog/archive/2007/02/25/811.aspx</link>
            <description>&lt;p&gt;I don’t know about you, but I use my debit card for pretty much &lt;em&gt;everything&lt;/em&gt; and also pay all my bills online using online banking. The last book of checks I went through lasted me over a year and outside of a couple other things, the only checks I ever write are for bowling and my stock club. Because I rarely use my checkbook I don’t record any of my transactions in the check register so I never know how much money I have left in my account. Yeah, I can always go online and check my balance there, but that only shows transactions that have cleared so there could be more coming in that I’ve forgotten about.&lt;/p&gt;
&lt;p&gt;I’ve tried using the Windows based financial software like Quicken and Microsoft Money, but you can only get to them if you’re at home in front of your computer and they are &lt;strong&gt;so bloated with features that I don’t want or need&lt;/strong&gt; that I just find them way too cumbersome to use. I want something &lt;strong&gt;simple&lt;/strong&gt; that operates just like the paper register in my checkbook &lt;strong&gt;but is also available when I’m not at home&lt;/strong&gt;. So, I decided to write a web based online checkbook register application so that wherever I have an Internet connection, I can logon and see how much money I have (or don’t have) and enter my latest transactions.&lt;/p&gt;
&lt;p&gt;I've been using it for a while now, and I think it's stable enough that I thought I would make it available to anyone else who would like to try it. So, if you're passing by here and this is something you think you'd like to use, please feel free to go over to the site and check it out. You can find it at &lt;a href="http://www.mychkbook.com"&gt;http://www.mychkbook.com&lt;/a&gt;. &lt;strong&gt;It's absolutely free of charge&lt;/strong&gt;. If you do create an account and start using this application, I would love to hear some feedback from you.&lt;/p&gt;&lt;img src="http://bigkspub.com/blog/aggbug/811.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Keith</dc:creator>
            <guid>http://bigkspub.com/blog/archive/2007/02/25/811.aspx</guid>
            <pubDate>Sun, 25 Feb 2007 19:56:59 GMT</pubDate>
            <wfw:comment>http://bigkspub.com/blog/comments/811.aspx</wfw:comment>
            <comments>http://bigkspub.com/blog/archive/2007/02/25/811.aspx#feedback</comments>
            <wfw:commentRss>http://bigkspub.com/blog/comments/commentRss/811.aspx</wfw:commentRss>
            <trackback:ping>http://bigkspub.com/blog/services/trackbacks/811.aspx</trackback:ping>
        </item>
        <item>
            <title>Adding a CheckBox Control to a TableCell in Asp.Net 2.0</title>
            <link>http://bigkspub.com/blog/archive/2007/01/08/810.aspx</link>
            <description>&lt;p&gt;This is kinda weird. I'm building a web application in ASP.Net 2.0 and I want to put a CheckBox control in a TableCell object. Should be pretty straight forward. Simply create the checkbox, set its properties, and add it to the TableCell's Controls collection. I run the app and the checkbox is not showing up. What's up with that?&lt;/p&gt;
&lt;p&gt;Stepping through the code, I can see the checkbox in the TableCell's Controls collection right after I add it, but after I set some properties on the TableCell and add it to the TableRow object, the checkbox isn't in the collection. I figured out that &lt;strong&gt;when I set the Text property on the TableCell to string.Empty (or any other string), that seemed to remove the control from the TableCell.&lt;/strong&gt; Weird. So, if I don't set the Text property on the TableCell, the checkbox shows up just fine.&lt;/p&gt;
&lt;p&gt;I guess you can't put text and controls in a TableCell?&lt;/p&gt;&lt;img src="http://bigkspub.com/blog/aggbug/810.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Keith</dc:creator>
            <guid>http://bigkspub.com/blog/archive/2007/01/08/810.aspx</guid>
            <pubDate>Tue, 09 Jan 2007 02:06:24 GMT</pubDate>
            <wfw:comment>http://bigkspub.com/blog/comments/810.aspx</wfw:comment>
            <comments>http://bigkspub.com/blog/archive/2007/01/08/810.aspx#feedback</comments>
            <wfw:commentRss>http://bigkspub.com/blog/comments/commentRss/810.aspx</wfw:commentRss>
            <trackback:ping>http://bigkspub.com/blog/services/trackbacks/810.aspx</trackback:ping>
        </item>
        <item>
            <title>Ok, I'm stumped</title>
            <link>http://bigkspub.com/blog/archive/2006/12/10/806.aspx</link>
            <description>Why doesn't the image in &lt;a href="http://www.bigkspub.com/blog/archive/2006/12/10/805.aspx"&gt;this post&lt;/a&gt; (the one right below) float left like the image in &lt;a href="http://www.bigkspub.com/blog/archive/2005/05/03/488.aspx"&gt;this post&lt;/a&gt;? Is this a &lt;a href="http://sourceforge.net/projects/subtext/"&gt;SubText&lt;/a&gt; thing? Anyone? Anyone? Bueller?&lt;img src="http://bigkspub.com/blog/aggbug/806.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Keith</dc:creator>
            <guid>http://bigkspub.com/blog/archive/2006/12/10/806.aspx</guid>
            <pubDate>Mon, 11 Dec 2006 03:38:57 GMT</pubDate>
            <wfw:comment>http://bigkspub.com/blog/comments/806.aspx</wfw:comment>
            <comments>http://bigkspub.com/blog/archive/2006/12/10/806.aspx#feedback</comments>
            <wfw:commentRss>http://bigkspub.com/blog/comments/commentRss/806.aspx</wfw:commentRss>
            <trackback:ping>http://bigkspub.com/blog/services/trackbacks/806.aspx</trackback:ping>
        </item>
        <item>
            <title>Tableless Layout</title>
            <link>http://bigkspub.com/blog/archive/2006/11/24/799.aspx</link>
            <description>&lt;P&gt;I've tried. I have &lt;EM&gt;really, really&lt;/EM&gt;&amp;nbsp;tried to layout web pages without tables. I can't do it. I suck at it. And, it takes me&amp;nbsp;longer to get the layout right than it does to create the page content and the code behind. So I give up. I &lt;EM&gt;will&lt;/EM&gt; however do the following...&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I will use the very minimum number of tables as I can&amp;nbsp;to do the layout - usually all I need is one
&lt;LI&gt;I will continue to try and do &amp;#8220;tableless&amp;#8220; layout but I can't spend hours and hours on it 
&lt;LI&gt;I will learn as much as I can about CSS and using it for layout&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;That said, anyone know any really good CSS layout tutorials? ;)&lt;/P&gt;&lt;img src="http://bigkspub.com/blog/aggbug/799.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Keith</dc:creator>
            <guid>http://bigkspub.com/blog/archive/2006/11/24/799.aspx</guid>
            <pubDate>Fri, 24 Nov 2006 22:44:00 GMT</pubDate>
            <wfw:comment>http://bigkspub.com/blog/comments/799.aspx</wfw:comment>
            <comments>http://bigkspub.com/blog/archive/2006/11/24/799.aspx#feedback</comments>
            <wfw:commentRss>http://bigkspub.com/blog/comments/commentRss/799.aspx</wfw:commentRss>
            <trackback:ping>http://bigkspub.com/blog/services/trackbacks/799.aspx</trackback:ping>
        </item>
        <item>
            <title>string.Format</title>
            <link>http://bigkspub.com/blog/archive/2006/04/14/638.aspx</link>
            <description>&lt;p&gt;Here's a &lt;a href="http://blogs.msdn.com/kathykam/archive/2006/03/29/564426.aspx"&gt;really good post&lt;/a&gt; from &lt;a href="http://blogs.msdn.com/kathykam/default.aspx"&gt;Kathy Kam&lt;/a&gt; on the .Net &lt;a href="http://blogs.msdn.com/bclteam/default.aspx"&gt;BCL Team&lt;/a&gt; that covers a lot of different things you can do with string.Format.&lt;/p&gt;
&lt;p&gt;Update: &lt;a href="http://blogs.msdn.com/kathykam/archive/2006/09/29/.NET-Format-String-102_3A00_-DateTime-Format-String.aspx"&gt;Formatting Dates&lt;/a&gt; from Kathy Kam.&lt;/p&gt;
&lt;p&gt;Update: And yet another &lt;a href="http://blog.stevex.net/index.php/string-formatting-in-csharp/"&gt;great reference post&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://bigkspub.com/blog/aggbug/638.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Keith</dc:creator>
            <guid>http://bigkspub.com/blog/archive/2006/04/14/638.aspx</guid>
            <pubDate>Fri, 14 Apr 2006 11:58:00 GMT</pubDate>
            <wfw:comment>http://bigkspub.com/blog/comments/638.aspx</wfw:comment>
            <comments>http://bigkspub.com/blog/archive/2006/04/14/638.aspx#feedback</comments>
            <wfw:commentRss>http://bigkspub.com/blog/comments/commentRss/638.aspx</wfw:commentRss>
            <trackback:ping>http://bigkspub.com/blog/services/trackbacks/638.aspx</trackback:ping>
        </item>
    </channel>
</rss>