Yearly Archives: 2009

Common Mistakes in SQL Server – Part 5

Last to Last week we discussed how Null Values can cause a trouble in Common Mistakes in SQL Server – Part 4. This I will discuss about Auto Growth feature of SQL Server, and how it can impacts us.

What is Auto Growth?

Auto Growth is a feature that allowed database files (primary, secondary and log) to expand when database file becomes full – without manual intervention.

Auto Growth feature is really useful when we do not want to increase the size of database files manually. There are two ways you can set auto growth – using SQL Server Management Studio (SSMS here after) and T-SQL. Auto Growth can be configured – In Percent and In Megabytes.







How Auto Growth can impact us?
Now that we know what Auto Growth feature in SQL Server is; I’ll describe how this feature can impact us badly if we do not  configured this option carefully . Below is the table that will give you an idea what would happen if database file reaches to its threshold value and it needs to expand!!
See the calculation below when Auto Growth option is configured with in Percentage:


Configured to grow “In Percentage”







File Size (before growth)
Growth – 10%
File Size (after growth)
1st time
5000
500
5500
2nd time
5500
550
6050
3rd time
6050
605
6655
4th time
6655
665.5
7320.5
5th time
7320.5
732.05
8052.55
6th time
8052.55
805.255
8857.805
7th time
8857.805
885.7805
9743.5855
8th time
9743.5855
974.35855
10717.94405
9th time
10717.94405
1071.794405
11789.73846
10th time
11789.73846
1178.973846
12968.7123




You will notice that the database growth is exponential when it is configured with Percentage i.e. 10%.  This is because this is calculated in cumulative manner; the value I have used here is 20 times lower than what we used to work on production systems generally.  If we set Auto Growth in Percentage it will occupy our HD space unnecessarily and creates fragmentation. Moreover when database files are expanding you will notice high volume in CPU spikes and I/O cycle.   
What is the best practice for Auto Growth option?
Best practice is to configure Auto Growth option in static value. See the sample calculation below:




File Size (before growth) MB
Growth – 500MB
File Size (after growth) MB
1st Time
5000
500
5500
2nd Time
5500
500
6000
3rd Time
6000
500
6500
4th Time
6500
500
7000
5th Time
7000
500
7500
6th Time
7500
500
8000
7th Time
8000
500
8500
8th Time
8500
500
9000
9th Time
9000
500
9500
10th Time
9500
500
10000


Database grows in a controlled manner when Auto Growth is configured with the static/fix value in comparison to Percentage i.e. 10%.  The value I have used here is 20 times lower than what we used to work on production systems generally.   
 

It is true that now a day’s storage costs are lower down for desktops or home systems but it is really very costly when it comes to servers and data centers and this scenario will just add overhead to costing for storage solutions. So, the best bet is to configure Auto Growth with static value.
I would advise to configure Auto Growth option to static value only.

The last day of 2009 is an awesome time to prepare for MMS 2010

The Microsoft Management Summit is the best conference on Earth (I’ve not checked the one’s on Mars yet, so I can’t speak to that).  MMS has always been the best place to catch up on System Center products, attend labs, and develop friendships and networking contacts to help you manage your environment.  The cool thing is – myITforum has been part of MMS since the very beginning.  If you want to learn about that, drop out to the MMS Wiki and read all about it and even grab the RSS feed:

http://www.myitforum.com/myITWiki/MMS.ashx

During my talks at MMS, I ask the same question each year: “How many people are familiar with myITforum?”

In the early days, even with smaller attendance numbers, the majority of people did not know about myITforum.  These days, even with the larger attendance numbers (i.e., 3,000 or 4,000 people), the majority of people know about myITforum and use its services daily.

With our long history with MMS, its should be no surprise that we also provide many services in conjunction with MMS.  So, this post is kind of a reminder for all of you that:

  1. myITforum is the place to go for MMS 2010 information, and
  2. Its time to start thinking about getting approval to attend MMS 2010, if you haven’t already.

We have a couple docs to help you justify your attendance for MMS 2010.  You basically just grab these docs, tailor them to your own needs, and send them off to your manager for approval.  These docs are a sure-fire way to be able to attend MMS, meet the myITforum folks (System Center community), and become part of a System Center tradition.

Here’s the docs:

Henry Wilson's MMS 2010 Cost Justification Document

MMS 2010 Request to Management

System Center Service Manager : How to Write a Custom Connector: CSV Connector Example

 

One of the most important common ways partners and customers will extend Service Manager is to create custom connectors to get data into the system.  There are many ways of doing this and we will catalog all of them at this blog post.

System Center Service Manager : How to Write a Custom Connector: CSV Connector Example

An update is available that lets you add Windows 7 and Windows Server 2008 R2 as supported platforms for Configuration Manager 2007 Service Pack 1

 

On a computer that is running Microsoft System Center Configuration Manager 2007 Service Pack 1 (SP1), you have the following features:

  • Software distribution
  • Software update management
  • Desired configuration management
However, the following products are not listed as supported platforms for these features:
  • Windows 7
  • Windows Server 2008 R2

An update is available that lets you add Windows 7 and Windows Server 2008 R2 as supported platforms for Configuration Manager 2007 Service Pack 1

Best Windows Freebies and Guides 21 [December 2009]

Windows 7 – The Pocket Guide | Get FREE books (Password: ilikefree)Every month we take a look around some of the most interesting windows-related web sites. We collect the best free stuff and write tips to help you get more out of Windows. Below you’ll find wallpapers, icon packs, fonts, screensavers, and freeware we’ve found […]

Happy New Year 2010

Mise à jour des machines virtuelles

Hop, pour la fin d’année, quelques machines virtuelles pour bricoler / tester…

  • IE6-XPSP3.exe contains a Windows XP SP3 with IE6 VHD file. Expires April 1, 2010
  • IE7-XPSP3.exe contains a Windows XP SP3 with IE7 VHD file. Expires April 1, 2010
  • IE8-XPSP3.exe contains a Windows XP SP3 with IE8 VHD file. Expires April 1, 2010
  • IE7-VIS1.exe+IE7-VIS2.rar+IE7-VIS3.rar contain a Vista Image with IE7 VHD file. Expires 120 days after first run.
  • IE8-VIS1.exe+IE8-VIS2.rar+IE8-VIS3.rar+IE8-VIS4.rar contain a Vista Image with IE8 VHD file. Expires 120 days after
  • Download details: IE App Compat VHD

    www.training4sc.com – Unregister all SMS Tools

     

    The script attached below can be used to remove any tools that you have registered in the SMS Admin console.  These are the ones that you see when you right click an object under the 'SMS Tools' menu

    www.training4sc.com – Unregister all SMS Tools

    Manage your IT Infrastructure : OpsMgr Custom Reporting Tips & Tricks

     

    Lately I’ve been busy creating some OpsMgr Custom Reports for customers and wanted to share some tips & tricks for creating custom OpsMgr Reports. Hope you can use them in your own custom OpsMgr Reports.

    Stefan Stranger's Weblog – Manage your IT Infrastructure : OpsMgr Custom Reporting Tips & Tricks

    Free Desktop Wallpaper Showcase: Set 74

    Windows 7 – The Pocket Guide | Get FREE books (Password: ilikefree) A collection of desktop wallpapers for Windows, OS X, and Linux. If you have wallpapers you’ve made yourself or if you have any suggestions, leave them in the comments or contact me. (…)Read the rest of Free Desktop Wallpaper Showcase: Set 74© Rich for Windows […]

    snowland.se OpsMgr Monitor DemoService

     

    Wrote this little PHP-application for demostrating webmonitors in System Center Operations Manager 2007.


    It will probably work for any monitoring solution that catches http errorcodes or textstrings on a page:

    snowland.se DemoService : 200 OK

    ConfigMgr 2007/SMS 2003 Ready-Made Queries – myITforum.com Wiki Service

    Check out the new ConfigMgr 2007/SMS 2003 query Wiki and grab as many as you can:

    http://www.myitforum.com/myITWiki/ConfigMgr-2007-SMS-2003-Ready-Made-Queries.ashx 

     

    Also, grab the RSS feed so you can be notified as new queries are added:

    http://www.myitforum.com/myITWiki/RSS.aspx?Page=ConfigMgr-2007-SMS-2003-Ready-Made-Queries

    SharePoint Saturday – EMEA

    Hi All,

    Good News !!! First SharePoint Saturday @ EMEA will be held on 23 Jan 2010, If you are a sharepoint fan/developer/architect or Administrator, I encourage you to attend SharePoint Saturday online event, here is the link for the registration:

    http://20100123-spsemea.eventbrite.com/

    Speakers List:
    http://www.sharepointsaturday.org/emea/Pages/speakers.aspx


    I’m going to be a speaker on this event, meet you there.

    My Session Info:

    Session Topic : SharePoint 2010 Development Tips & Tricks
    This session will cover the new development model for SharePoint 2010 and the new architecture design for the sharepoint foundation and the client object model.
    The session will cover also other tips and tricks when developing sharepoint solutions and the best practices to following when developing sharepoint custom components and more….

    Meet you there. Thanks.

    Typography: Free Stylish Fonts Collection [Set 45]

    Windows 7 – The Pocket Guide | Get FREE books (Password: ilikefree) If you are making a PowerPoint presentation, poster, graphic, or anything that requires typography, you may find some of these fonts useful. There many free fonts out there but it is often hard to find good ones as there is so much choice and […]

    Looking for the Configuration Packs for ConfigMgr 2007?

    If you are looking for the Configuration Packs for ConfigMgr 2007, Microsoft has moved them to their new Pinpoint search management facility.  There’s currently no defined way of finding them except to use Pinpoint’s search engine.  However, here is the search URL for quick access:

    http://pinpoint.microsoft.com/en-US/SearchResults.aspx?qs=configuration%20pack&fl=&fpf=700004&fst=1 

    Microsoft Dynamics AX 2009 Programming: Getting Started

    Another book on Microsoft Dynamics AX ‘Microsoft Dynamics AX 2009: Getting Started has been released. Its good to see more and more books on Dynamics AX. This is the second book after ‘Inside Microsoft Dynamics AX 2009′. Presently I’m reviewing this book and will publish a review soon. The book is available from Packtub Publishing. Click on the image below to visit the site (Available in .pdf and Hard Copy).
    There is also a sample chapter available for download and you can view it by clicking on the link below:
    Looking forward to review this. Well since version 3 onwards there have been few books on AX and MSDN is primarily the developer source for learning. However more books on AX will really help the developer community. Developers would want to get a copy of this book.
    Happy DAXING :-)

    How to Prevent the Home Page from Downloading the TechCenter Page on Microsoft.com

     

    When the Microsoft System Center Configuration Manager 2007 console is running on a server with a connection to the Internet, the top node in the console automatically connects to the Microsoft TechNet site to display the System Center Configuration Manager TechCenter. In Configuration Manager 2007 SP1, you can modify the registry to prevent the console from contacting the Internet to display the TechCenter page.

     

    The information in this topic applies only to Configuration Manager 2007 SP1 and later.

    To prevent the System Center Configuration Manager console from downloading the TechCenter home page

    1. In a registry editor, locate the key HKLMSoftwareMicrosoftConfigMgrAdminUI.

    2. Create a new DWORD value DisableHomePage.

      You do not need to set any data for the DisableHomePage value; if the value exists, the console will not attempt to connect to the TechCenter home page.

    How to Prevent the Home Page from Downloading the TechCenter Page on Microsoft.com

    Apostrophes around column aliases

    Far too often I see SQL code which uses apostrophes around column aliases, like this:


    SELECT ProductID, SUM(LineTotal) AS ‘Total’
    FROM Sales.SalesOrderDetail
    GROUP BY ProductID;


    This is fine, but the worrying thing about this is if the user decides to use this alias in an outer query.


    SELECT ‘ID’, ‘Total’
    FROM
    (
    SELECT ProductID AS ‘ID’, SUM(LineTotal) AS ‘Total’
    FROM Sales.SalesOrderDetail
    GROUP BY ProductID
    ) AS p
    ;


    Here, the outer query will assume that ‘ID’ and ‘Total’ are strings, not the names of columns in sub-query. It’s really not pretty. The query runs, but doesn’t give the correct answers. Furthermore, if this had’ve been done in a GROUP BY clause, or a JOIN, etc, then the error may have been hidden some more. An error might have occurred, but only in certain circumstances.


    What should have been done is to have used square brackets, like [Total], or even no brackets at all. Using the table alias in the outer query would have helped too.


    SELECT p.ID, p.Total
    FROM
    (
    SELECT ProductID AS ID, SUM(LineTotal) AS Total
    FROM Sales.SalesOrderDetail
    GROUP BY ProductID
    ) AS p
    ;


    I’m not sure why SQL Server allows apostrophes to be used around column aliases, but unfortunately it does (and because it does now, it likely always will, if only to maintain backward-compatibility). So instead, any time you see code that uses apostrophes this way, please change it – just to help any developers that come after you who don’t understand where things can fall down.

    Microsoft Loses Appeal in Patent Case, Must Changes MS Word

     

    Microsoft lost an appeal in a patent case brought by software company i4i, and a federal court has prohibited the Redmond company from selling any more copies of Word and Office 2007 that have the infringing feature after Jan. 11.

    Read the rest: myITforum.com, Inc.

    An Interesting Response to a NYTimes Article on Cell Phones

    It seems that Apple is having issues selling phones to New York City, or rather AT&T is not selling their iPhones to New York City on-line (you can still purchase them at brick-and-mortar stores).  This article (http://bits.blogs.nytimes.com/2009/12/28/for-new-yorkers-trouble-buying-an-iphone-on-atts-site/) explores a little bit, but the following is a response from AAA in Central Pennsylvania.  It sounds like he might either work for AT&T, or else have a similar relationship to them as I do with Microsoft.  I am only editing his text for spacing and spelling.  I should mention that I am a customer of AT&T and have never had an issue with their network (in New York City or elsewhere), but am not an intensive data user – I usually just pull my e-mail, not videos.  -M

    I am a partner in a very mobile (as it we go to a variety of job sites each year) specialty systems integration business, and in a year, we all travel to many points within the "lower 48"
    Cell phone based technology is our life line, and very often in setting up a site, the land line data lines are not yet in place, let alone the land line telephone lines for our client, so very often we use cell phone based devices to get the projects started.

    What we have found from experience is that, like last week's, NYT article spelled out, ATT has a better network. Especially for our business cell phone account, and yes, there are provisioning (provisioning affects how a cell phone device interacts with the cell tower network) differences between residential / consumer / individual cell accounts and business cell accounts.

    Now I will point out, that there are some dead spots, in places like when using laptops when riding the DC Metro, or in a back seat of a car in the Baltimore Harbor Tunnel, or the NYC Lincoln Tunnel, or when on the NYC MTA, on the Elevated Sections in NYC or even on Amtrak (Boston to DC and Philadelphia to Harrisburg) where ATT does not always seem to work instantly, but that is a transitory event.

    Within seconds the problem clears, ether by moving slightly, or waiting until the cell device grabs a new tower. Only in rural New Hampshire do we sometimes have a problem, and that is fixed by leaning on the roof of a parked car and resting the cell phone so the lower edge just touches the roof (greatly increases reception as the "ground plane" of he cell phone internal antenna is improved).

    Though I will note, that nearly all cell phone based devices allow for the connection of an external antenna to improve reception and range.

    Even in places like when crossing the Woodrow WiIson Bridge, south of DC, where you start out in Maryland, touch the DC and then end up in Virginia, all within less than a mile, ATT keeps the connection.

    In terms of equipment, we use iPhones, Motorola Razors, HTC Advantages (paper back book sized cell phone with a 5 inch screen) and all manner of SIM card capable professional equipment (sourced from a variety of eBay based cell equipment vendors) that allows us to connect up regular telephone equipment on one side that, with the magic of the ATT SIM card installed in the device socket, is a cell phone on the other.

    Thus we can carry our regular, (plug into the local phone line) credit card machine, fax machine, and even a back up hard wired telephone gear with us at all times, and can easily connect to ATT anywhere we do a project within the lower 48.

    We have had the account since cell phones appeared in the 1980's and if there is anything to add, is that both ATT and Verizon started out poorly. But is has been ATT who has improved the most, and especially when ATT dropped analog cell technology.

    Add to that improvement in coverage, even in odd ball Texas locations where the cows out number the people, the fact that the ATT technology of the SIM card allows for all manner of extra telephone / communication equipment to become a cell phone device.

    The value of which is not to be underestimated, when coupled with the ATT signal.  It is something that Verizon and its technology will not allow, so that means only with ATT technology can you put your 87 year old parent on the family cell account, and yet give them the desk telephone , so they don't have to fuss with a cell phone. (Secret is the box that accepts the ATT SIM card and connects to that old style phone.)

    Or how on eBay we picked up unlocked European market netbooks that accepted ATT SIM cards so our entire staff has an instantly connected netbooks.  No dongles, no USB plug ins, just turn on and go. Again only with ATT type technology, and certainly not Verizon with CDMA.

    So, if your experience is only one tiny little iPhone, and you are not willing to walk down the hall or go to a window, I pity you, as, there are always going to be dead spots with any cell phone, and all you have to do is move.

    If you still have a problem, call the carrier and check to see how your account is provisioned, and be prepared to get a business account and pay for it.

    Like the days of hard wired phones, certain classes of service get the queue ahead of others which is why business cell accounts, always seem to have better service.

    You get what you pay for.

    Recent Comments

    Archives