<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Journey to SQL Authority with Pinal Dave &#187; Software Development</title>
	<atom:link href="http://blog.sqlauthority.com/category/software-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com</link>
	<description>Notes of a SQL Server MVP and Database Administrator</description>
	<lastBuildDate>Sat, 21 Nov 2009 01:30:19 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='blog.sqlauthority.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/08e35387c05b61340e885b1763a69d9f?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Journey to SQL Authority with Pinal Dave &#187; Software Development</title>
		<link>http://blog.sqlauthority.com</link>
	</image>
			<item>
		<title>SQL SERVER &#8211; Policy Based Management &#8211; Create, Evaluate and Fix Policies</title>
		<link>http://blog.sqlauthority.com/2009/11/13/sql-server-policy-based-management-create-evaluate-and-fix-policies/</link>
		<comments>http://blog.sqlauthority.com/2009/11/13/sql-server-policy-based-management-create-evaluate-and-fix-policies/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 01:30:10 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Policy Management]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7118</guid>
		<description><![CDATA[Introduction
This article will cover the most spectacular feature of SQL 2008 &#8211; Policy-based management and how the configuration of SQL Server with policy-based management architecture can make a powerful difference. Policy based management is loaded with several advantages. It can help you implement various policies for reliable configuration of the system. It also provides additional [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=7118&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h3 style="text-align:justify;">Introduction</h3>
<p style="text-align:justify;">This article will cover the most spectacular feature of SQL 2008 &#8211; Policy-based management and how the configuration of SQL Server with policy-based management architecture can make a powerful difference. Policy based management is loaded with several advantages. It can help you implement various policies for reliable configuration of the system. It also provides additional administration assistance to DBAs and helps them effortlessly manage various tasks of SQL Server across the enterprise.</p>
<h3 style="text-align:justify;">Basics of Policy Management</h3>
<p style="text-align:justify;">SQL server 2008 has introduced policy management framework, which is the latest technique for SQL server database engine. SQL policy administrator uses SQL Server Management Studio to create policies that can handle entities on the server side like the SQL Server objects and the instance of SQL Server databases. It consists of three components: policy administrators (who create policies), policy management, and explicit administration. Policy-based management in SQL Server assists the database administrators in defining and enforcing policies that tie to database objects and instances. These policies allow the administrator to configure and manage SQL server across the enterprise.</p>
<p style="text-align:justify;">The following advantages can be achieved by appropriate administration of policy management system.</p>
<ul style="text-align:justify;">
<li>It interacts with various policies for successful system configuration.</li>
<li>It handles the changes in the systems that are the result of configuration against authoring policies.</li>
<li>It reduces the cost of ownership with simple elaboration of administration tasks.</li>
<li>It detects various compliance issues in SQL Server Management Studio.</li>
</ul>
<h3 style="text-align:justify;">Policy Management Terms</h3>
<p style="text-align:justify;">To have a better grip on the concept of Policy-based management there are some key terms you need to understand.</p>
<ul style="text-align:justify;">
<li><strong>Target </strong> – A type of entity that is appropriately managed by Policy-based management. For example, a table, database and index, to name a few.</li>
<li><strong>Facet </strong> -A property that can be managed in policy-based management. A clear example of facet is the name of Trigger or the Auto Shrink Property of database.</li>
<li><strong>Conditions </strong> – Criteria that specifies the state of facet to true or false. For example, you can adjust the state of a facet that gives you clear specifications of all stored procedures in the Schema “Banking”.</li>
<li><strong>Policy </strong> &#8211; A set of rules specified for the server objects or the properties of database.</li>
</ul>
<h3 style="text-align:justify;">Practical Example of Policy Management</h3>
<h4 style="text-align:justify;">Exploring of Facets</h4>
<p style="text-align:justify;">Facets are database objects and each of them is a container of one or more database object. First, you need to navigate the object explorer and expand the policy-based management node and the management node. You will see conditions, policies and facets nodes. SQL Server 2008 has many different facets available to use.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/PolicyManagement1.jpg" alt="" /></p>
<p style="text-align:justify;">To view the list of facets, expand the facet node</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/PolicyManagement2.jpg" alt="" /></p>
<p style="text-align:justify;">Double click on each of these facets to the list of the facet properties.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/PolicyManagement3.jpg" alt="" /></p>
<p style="text-align:justify;">Let us understand the two next elements of creating condition and creating policy with real life example of Statistics. We will try to create statistic property of the database. We have property of statistic <code>IsAutoCreated</code>. We can set that using database property window under option tab. This property takes two values <code>True </code> or <code>False</code>.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/PolicyManagement3a.jpg" alt="" width="0" height="0" /></p>
<p style="text-align:justify;">We will follow up on this property in different steps. We will first create condition and right after we will use the same condition in a policy. That policy will be evaluated by user. User will have to two options either let us evaluated by scheduled task or fix non complaining policy manually.</p>
<h4 style="text-align:justify;">Create a Condition</h4>
<p style="text-align:justify;"><em>Creation of condition </em> in Policy-based management is the next thing after identifying the problem. In our case, we want to make sure that everywhere <code>IsAutoCreate </code> is set to <code>True </code> everywhere.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/PolicyManagement4.jpg" alt="" /></p>
<p style="text-align:justify;">Each facet displays different kinds of properties. As we are interested in the <code>IsAutoCreated </code> property of the statistics we have to select facet as Statistic.</p>
<h4 style="text-align:justify;">Create a Policy</h4>
<p style="text-align:justify;">Creating a policy is the next important task after creating a condition. The condition has to be created to select the proper property of the object. However, a policy is created to specify the location where the condition has to be applied.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/PolicyManagement5.jpg" alt="" /></p>
<p style="text-align:justify;">Please follow the instructions given in the above image. Make sure to select all target databases. In given example I have two database installed on my server that brings up two different targets servers.</p>
<p style="text-align:justify;">This brings up an interesting concept of targets. Targets are database objects. They can be whole database or single parts of the database. It may be possible that they are different kind of objects but have same kind of properties.</p>
<p style="text-align:justify;">While creating a policy we have kept the evaluation mode as “on demand”, which means that we will be running this policy manually, instead of scheduled job. Scheduled job is good idea to run policy.</p>
<h4 style="text-align:justify;">Evaluate a Policy</h4>
<p style="text-align:justify;">As in the previous step, we have selected to evaluate the policy manually; we will evaluate that using SSMS. Right click on policy brings up with lots of options. Select Evaluate from the menu, this will bring up the following image.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/PolicyManagement8.jpg" alt="" /></p>
<p style="text-align:justify;">On the screen of Evaluate Policies there is a button which suggests evaluating the policies. Once clicked it will give the following kind of screen with a status.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/PolicyManagement8a.jpg" alt="" /></p>
<p style="text-align:justify;">You will see a green icon in the image. This icon indicates the policy evaluated the status to <code>True</code>. If you notice you will find that in our example all the policies are complied with.</p>
<h4 style="text-align:justify;">Fix Non-complying Policy</h4>
<p style="text-align:justify;">Now, let us change the <code>IsAutoCreate </code> policy of one of test databases to <code>true </code> and run the evaluation all over again. If you observe you will notice that one of the statuses is marked as <code>false </code> with a little red image on the left.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/PolicyManagement9.jpg" alt="" /></p>
<p style="text-align:justify;">Furthermore, once you select the checkbox and clicked on the Apply button you will find an additional checkbox on the side. This Apply button will raise a popup confirming that the property of the target has been changed to comply with the policy. Next, click Ok to confirm. This will change the properties of the Test database to comply with the new policy on all of our targets specified earlier.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/PolicyManagement9a.jpg" alt="" /></p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/PolicyManagement9b.jpg" alt="" /></p>
<p style="text-align:justify;">In our example, we have manually evaluated the policy and fixed its noncompliance. With powershell you can perform the same using SQL Server Agent.</p>
<h3 style="text-align:justify;">Summary</h3>
<p style="text-align:justify;">Policy-Based Management empowers you with greater control over the procedures of database as a Database Administrator. It provides you the ability to enforce paper policies at database level. Paper polices are used as guidelines for understanding database standards. However, it necessitates some skills, time and efforts to enforce these polices. You need to go with a fine toothed comb to enforce these policies. Policy-based management system helps you define these polices and ensure that they will be enforced appropriately.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong>, <a href="http://dotnetslackers.com/articles/sql/Policy-Based-Management-Create-Evaluate-and-Fix-Policies.aspx" target="_blank">DNS</a></p>
Posted in Database, Pinal Dave, Software Development, SQL, SQL Authority, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology Tagged: Policy Management <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/7118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/7118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/7118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/7118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/7118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/7118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/7118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/7118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/7118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/7118/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=7118&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/11/13/sql-server-policy-based-management-create-evaluate-and-fix-policies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/PolicyManagement1.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/PolicyManagement2.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/PolicyManagement3.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/PolicyManagement3a.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/PolicyManagement4.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/PolicyManagement5.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/PolicyManagement8.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/PolicyManagement8a.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/PolicyManagement9.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/PolicyManagement9a.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/PolicyManagement9b.jpg" medium="image" />
	</item>
		<item>
		<title>SQLAuthority News &#8211; Effect of Oracle acquiring MySQL &#8211; A Delayed Analysis</title>
		<link>http://blog.sqlauthority.com/2009/08/31/sqlauthority-news-effect-of-oracle-acquiring-mysql-a-delayed-analysis/</link>
		<comments>http://blog.sqlauthority.com/2009/08/31/sqlauthority-news-effect-of-oracle-acquiring-mysql-a-delayed-analysis/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 01:30:03 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6683</guid>
		<description><![CDATA[
On 20 April 2009, Oracle Corporation announced its acquisition of Sun Microsystems in a deal worth about US$ 6 billion. This would have been just another one of corporate mega-deals that sound interesting in the news but really have no effect on your life. Except for the fact that with the purchase, Oracle acquired the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=6683&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/ss2008.gif" alt="" width="363" height="75" /><img class="alignnone" src="http://www.pinaldave.com/bimg/oracle.jpg" alt="" width="129" height="97" /><img class="alignnone" src="http://www.pinaldave.com/bimg/MySQL.jpg" alt="" width="124" height="90" /></p>
<p style="text-align:justify;">On 20 April 2009,<strong> Oracle Corporation</strong> announced its acquisition of<strong> Sun Microsystems</strong> in a deal worth about US$ 6 billion. This would have been just another one of corporate mega-deals that sound interesting in the news but really have no effect on your life. Except for the fact that with the purchase, Oracle acquired the world’s most widely used open-source database engine- MySQL. About 12 million small databases, mainly in websites and small businesses, run on the open-source MySQL platform, since it is stable, easily adaptable and most important of all for cash-strapped small companies, free. Note that ‘free’ here means that there is no software license to purchase (unlike commercial database engines like Oracle DB and Microsoft SQL Server), but most customers still have to pay third-party vendors for additional services like user interface design, technical support, bug fixes and so on. This is what makes the open-source model paradoxically both free and profitable.</p>
<p style="text-align:justify;">First of all, <strong>why did Oracle buy Sun Microsystems?</strong> The main reason for the purchase was to get Sun’s major products- Sun hardware, Solaris and Java. The SunServer+Solaris+Oracle combination (especially the Oracle database), is globally used in mission-critical systems, from banks to hospitals to nuclear power stations, because of its stability and robustness. It is perhaps the most trusted combination of hardware, operating system and database there is. Java is also a key platform and supporting component for several Oracle products, for example Oracle’s Fusion Middleware is wholly built to run on Java.</p>
<p style="text-align:justify;">So the MySQL acquisition was not really the focal point of the purchase, but it was nevertheless an important aside. Sun itself acquired MySQL in 2008 for about US$ 1 billion, Oracle now owns both of them. While Sun was known for its commitment to open source software, Oracle is a corporate giant without a track record for supporting open-source initiatives. So there arose understandable concern within the IT community about what will happen to MySQL. Will Oracle try to kill MySQL so that it does not compete with Oracle’s own offering? Will Oracle help to develop MySQL further as a platform? Will they leave it alone and not be bothered? Will they sell it off to another company? The real answer right now is that nobody knows, except perhaps Oracle senior management.</p>
<h3 style="text-align:justify;">Major Outcomes</h3>
<p style="text-align:justify;">Let us now examine the different outcomes being put forth by pundits. The first one, from insiders like IHL Consulting Group President Greg Buzek, is the glum opinion that Oracle will kill off MySQL because it partially competes with Oracle’s own database engine. Matters are complicated more by the fact that even though Oracle is mainly bought by large organizations (whose chief concern is system stability, vendor robustness and support, and not the software license fee), while MySQL is primarily used by small companies and small websites, its development has recently scaled up and MySQL can now offer enterprise-class computing, which then becomes a major headache for Oracle.</p>
<p style="text-align:justify;">Another reason given for Oracle deciding to bury MySQL is that the company is not really a supporter of the open-source model, instead preferring the tried and tested pay-per-license route. In fact Oracle is viewed with some suspicion in the open-source community- a sort of mega-corporation bent on world (software) domination. This is the chief cause for concern for the MySQL community. However, Oracle does have some redeeming acts in its interaction with open-source products. For example, the company has fully supported development of its software products to run on Linux.</p>
<p style="text-align:justify;">The second possible outcome is that Oracle will continue to encourage and support MySQL development. One argument for this is that MySQL, as part of the Sun purchase together with Java and Solaris, offers Oracle CEO Larry Ellison a weapon to fight his main rival Microsoft. Also, don’t discount the fact that Oracle is keenly aware that MySQL is open-source, meaning its source code and original developers are still around. So even if Oracle were to try and kill MySQL, either by stopping development or by licensing and charging for it, the development community can simply start working on an open-source, similar clone application. This is how Linux itself was originally conceived- as a free spin-off of commercial Unix operating systems.</p>
<p style="text-align:justify;">A third possibility is that Oracle executives may decide that MySQL is simply too much bother, and decide to sell off the company to someone else. Sun Microsystems acquired MySQL for about a billion dollars, and Oracle may decide that since MySQL was not the main reason they bought Sun anyway, they might as well dispose of it for roughly the same amount.</p>
<p style="text-align:justify;">A fourth possible outcome is that Oracle may elect to offer support contracts and consulting on MySQL to companies that need a lighter-weight solution than Oracle’s full, and at times bloated, database products. In this way, they offer the comfort of their large-vendor status to the potential clients who may be worried about using open-source software- a shrewd market-capturing move.</p>
<p style="text-align:justify;">But that same decision may have its own potential pitfall. Oracle’s main reason for buying Sun was to integrate and sell whole computing platforms. But IT managers might choose to avoid this one-vendor offering, from server to database application to support services, because it can also result in a single point of failure or arbitrary price changes in the platform’s licensing.</p>
<h3 style="text-align:justify;">Conclusion</h3>
<p style="text-align:justify;">In conclusion, the truth is that simply don’t know what Oracle will do with MySQL. There are several interesting alternatives, some more viable than others. But it is safe to assume that in the short-term, Larry Ellison will not take any drastic steps that may alienate his huge client base. Only time will tell.</p>
<h3 style="text-align:justify;">My Opinion</h3>
<p style="text-align:justify;">In many of the application, I do not need full featured SQL Server Enterprise Version. I just need something simple and free. This is when I use SQL Server Express Edition. You can read the complete reference over here <strong><a href="http://blog.sqlauthority.com/2009/08/26/sql-server-sql-server-express-a-complete-reference-guide/" target="_blank">SQL SERVER – SQL Server Express – A Complete Reference Guide</a></strong>.</p>
<p style="text-align:justify;">Please contribute here with your comments and opinion.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.sqlauthority.com</strong></a><strong>)</strong></p>
Posted in Database, Pinal Dave, Software Development, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology Tagged: MySQL <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/6683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/6683/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/6683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/6683/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/6683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/6683/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/6683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/6683/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/6683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/6683/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=6683&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/08/31/sqlauthority-news-effect-of-oracle-acquiring-mysql-a-delayed-analysis/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/ss2008.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/oracle.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/MySQL.jpg" medium="image" />
	</item>
		<item>
		<title>SQLAuthority News &#8211; Proposed eGov Standards Policy &#8211; Benefit for All or Only A Chosen Few</title>
		<link>http://blog.sqlauthority.com/2009/08/02/sqlauthority-news-proposed-egov-standards-policy-benefit-for-all-or-only-a-chosen-few/</link>
		<comments>http://blog.sqlauthority.com/2009/08/02/sqlauthority-news-proposed-egov-standards-policy-benefit-for-all-or-only-a-chosen-few/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 01:30:23 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6509</guid>
		<description><![CDATA[Does the proposed eGov Standards Policy benefit all or only a chosen few? 
As a wider audience comes to accept new technology, so the technology itself grows. The recent debate in India on the eGov Standards policy has been a point of contention for some time. I would like to start our discussion on this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=6509&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;"><strong>Does the proposed eGov Standards Policy benefit all or only a chosen few? </strong></p>
<p style="text-align:justify;">As a wider audience comes to accept new technology, so the technology itself grows. The recent debate in India on the <a href="http://fosscomm.in/OpenStandards?action=AttachFile&amp;do=get&amp;target=Policy_On_Open_Standards_V2.pdf" target="_blank">eGov Standards policy</a> has been a point of contention for some time. I would like to start our discussion on this topic by posing two questions:</p>
<p style="text-align:justify;"><strong>Question 1: Should government mandate single standards for a given technology domain?</strong></p>
<p style="text-align:justify;">The obvious answer would appear to be “Yes”, but the considered answer is actually “No”.</p>
<p style="text-align:justify;">The stipulation of a “single standard” would unnecessarily restrict the technology choices for the Government and would result in the exclusion from Government projects of Indian ISV’s who do not conform to the standard. In the Indian IT ecosystem, not many software companies offer their products for free. This is not only an Indian phenomenon, but a global one too. Software is not generally free.</p>
<p style="text-align:justify;"><strong>Question 2: Should royalty free IP in standards be used in eGovernment solutions as suggested in section 5.1.1? </strong></p>
<p style="text-align:justify;">Once again, the obvious answer would appear to be “Yes”, but the considered answer is actually “No”.</p>
<p style="text-align:justify;">If everything is free, who will pay the bills? We all know that in life there is no such thing as a free lunch. To build a sustainable standard takes time, people and money. The Ethernet standards, developed in the IEEE in the IEEE 802 series, provide us with a good example of this. If everything has to be royalty-free, how is the inventor to be paid for his efforts? It is simply impractical to expect everything to be free.</p>
<p style="text-align:justify;"><strong>Open Standard vs. Open Source</strong></p>
<p style="text-align:justify;">The real eGovernment debate revolves around understanding the true meaning of “Open Standards”. <a href="http://en.wikipedia.org/wiki/Open_standard">Wikipedia</a> is a great source on the subject and provides various points of view.</p>
<p style="text-align:justify;">A clear understanding of the differences between Open Standards and Open Source is necessary. Open Standards can be used both in Open Source and paid technologies. For example, UNICODE is standardized under RAND terms and is used in both Windows and Linux. Sadly, Open Source has become a tool of exploitation in hands of the few who usurp the claim on Open Standard<a href="#_msocom_1"></a>.</p>
<p style="text-align:justify;"><strong>Facing Reality</strong></p>
<p style="text-align:justify;">For Government procurements, the lowest bidder is generally awarded the contract. The “artificial” imposition of a single royalty-free standard would preclude Government Departments from selecting solutions on a value-for-money basis. Many eGovernment Interoperability Frameworks across the globe do not impose such stipulations for the very reason that they have adverse effects on interoperability.</p>
<p style="text-align:justify;">A number of organizations offer their software for free, but profit by charging surreptitiously for support. To my mind, it is better to be upfront and open about the real costs. Many have found themselves locked into agreements, only to be shocked by the actual long-term costs. This is what most Open Source implementations end up doing.</p>
<p style="text-align:justify;">By towing the “free line”, effectively the Government is siding with the Open Source philosophy and killing vendors who charge for their software upfront. This is not in the best interests of the emerging software economy, nor the development of intellectual property.</p>
<p style="text-align:justify;">The debate on standards is NOT purely academic in nature. If this standard is passed, Open Source commercial vendors stand to gain millions in Government contracts. Please refer to section 7.4 on this point. The debate is also NOT about what is good or bad. It is really a debate on how the proponents of a single standard will secure their profits from the Government.</p>
<p style="text-align:justify;">The proponents of a single standard have a loud voice, and they appeal loudly to higher authorities and institutions. I believe that this should come to and end. The real issue, i.e. the confusion between Open Standards and Open Source needs to be clarified before a crucial error is made.</p>
<p style="text-align:justify;"><strong>Suggestion for Better eGovernment Standard Policy</strong></p>
<p style="text-align:justify;">As we have seen, the term “open standard” means different things to different bodies. While I support the Indian Government’s goals to achieve interoperability for e-government, I recommend the following amendments to the <a href="http://fosscomm.in/OpenStandards?action=AttachFile&amp;do=get&amp;target=Policy_On_Open_Standards_V2.pdf" target="_blank">eGov Standards policy</a>:</p>
<ol style="text-align:justify;">
<li>Remove section 5.1.4, because to prove that a particular standard is better than all other existing standard is virtually impossible to do objectively.</li>
<li>Remove all preferences in section 5.2 for Open Source as they only favor commercial Open Source companies.</li>
<li>If preference needs to be given at all, give them to software developed in India by Indian companies. As an added advantage, the Government can more tightly regulate these companies.</li>
<li>To let the taxpayer’s money be utilized most effectively and to meet the objectives detailed in section 3.4, the committee should think of including a “lowest cost preference” clause in section 5.</li>
<li>Define Open Extensions and/or Open Subsets clearly.</li>
</ol>
<p style="text-align:justify;">I sincerely urge the intellectuals of this country to climb down from “socialist” viewpoints and ensure that the IT the ecosystem is best leveraged to the benefit of the nation.</p>
<p style="text-align:justify;">To better e-governance!</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
Posted in Pinal Dave, Software Development, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology Tagged: MySQL <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/6509/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/6509/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/6509/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/6509/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/6509/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/6509/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/6509/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/6509/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/6509/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/6509/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=6509&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/08/02/sqlauthority-news-proposed-egov-standards-policy-benefit-for-all-or-only-a-chosen-few/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Introduction to Cloud Computing</title>
		<link>http://blog.sqlauthority.com/2009/07/31/sql-server-introduction-to-cloud-computing/</link>
		<comments>http://blog.sqlauthority.com/2009/07/31/sql-server-introduction-to-cloud-computing/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 01:30:40 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Documentation]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Cloud Computing]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6168</guid>
		<description><![CDATA[Introduction
&#8220;Cloud Computing,&#8221; to put it simply, means &#8220;Internet Computing.&#8221; The Internet is commonly visualized as clouds; hence the term “cloud computing” for computation done through the Internet. With Cloud Computing users can access database resources via the Internet from anywhere, for as long as they need, without worrying about any maintenance or management of actual [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=6168&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h3 style="text-align:justify;">Introduction</h3>
<p style="text-align:justify;">&#8220;Cloud Computing,&#8221; to put it simply, means &#8220;Internet Computing.&#8221; The Internet is commonly visualized as clouds; hence the term “cloud computing” for computation done through the Internet. With Cloud Computing users can access database resources via the Internet from anywhere, for as long as they need, without worrying about any maintenance or management of actual resources. Besides, databases in cloud are very dynamic and scalable.</p>
<p style="text-align:justify;">Cloud computing is unlike grid computing, utility computing, or autonomic computing. In fact, it is a very independent platform in terms of computing. The best example of cloud computing is Google Apps where any application can be accessed using a browser and it can be deployed on thousands of computer through the Internet.</p>
<h3 style="text-align:justify;">Key Characteristics</h3>
<p style="text-align:justify;">Cloud computing is cost-effective. Here, cost is greatly reduced as initial expense and recurring expenses are much lower than traditional computing. Maintenance cost is reduced as a third party maintains everything from running the cloud to storing data. Cloud is characterized by features such as platform, location and device independency, which make it easily adoptable for all sizes of businesses, in particular small and mid-sized. However, owing to redundancy of computer system networks and storage system cloud may not be reliable for data, but it scores well as far as security is concerned. In cloud computing, security is tremendously improved because of a superior technology security system, which is now easily available and affordable. Yet another important characteristic of cloud is scalability, which is achieved through server virtualization.</p>
<p style="text-align:justify;">In a nutshell, cloud computing means getting the best performing system with the best value for money.</p>
<h3 style="text-align:justify;">Cloud Computing Architecture</h3>
<p style="text-align:justify;">Cloud computing architecture, just like any other system, is categorized into two main sections: Front End and Back End. Front End can be end user or client or any application (i.e. web browser etc.) which is using cloud services. Back End is the network of servers with any computer program and data storage system. It is usually assumed that cloud contains infinite storage capacity for any software available in market. Cloud has different applications that are hosted on their own dedicated server farms.</p>
<p style="text-align:justify;">Cloud has centralized server administration system. Centralized server administers the system, balances client supply, adjusts demands, monitors traffic and avoids congestion. This server follows protocols, commonly known as middleware. Middleware controls the communication of cloud network among them.</p>
<p style="text-align:justify;">Cloud Architecture runs on a very important assumption, which is mostly true. The assumption is that the demand for resources is not always consistent from client to cloud. Because of this reason the servers of cloud are unable to run at their full capacity. To avoid this scenario, server virtualization technique is applied. In sever virtualization, all physical servers are virtualized and they run multiple servers with either same or different application. As one physical server acts as multiple physical servers, it curtails the need for more physical machines.</p>
<p style="text-align:justify;">As a matter of fact, data is the most important part of cloud computing; thus, data security is the top most priority in all the data operations of cloud. Here, all the data are backed up at multiple locations. This astoundingly increases the data storage to multiple times in cloud compared with a regular system. Redundancy of data is crucial, which is a must-have attribute of cloud computing.</p>
<h3 style="text-align:justify;">Different forms of Cloud Computing</h3>
<p style="text-align:justify;">Google Apps., Salesforce.com, Zoho Office and various other online applications use cloud computing as Software-As-Service (SAAS) model. These applications are delivered through browser, and multiple customers can access it from various locations. This model has become the most common form of cloud computing because it is beneficial and practical for both the customers and the services providers. For customers, there is no upfront investment and they can Pay-As-They-Go and Pay-As-They-Grow. On the other hand, the service providers, can grow easily as their customer base grows.</p>
<p style="text-align:justify;">Aamzon.com, Sun and IBM offer on-demand storage and computing resources. Web service and APIs enable developers to use all the cloud from internet and allow them to create large-scale, full-featured application. Cloud is not simply limited to providing data storage or computing resources, it can also provide managed services or specific application services through web.</p>
<h3 style="text-align:justify;">Cloud Computing Concerns</h3>
<p style="text-align:justify;">Security of confidential data (e.g., SSN or Credit Card Numbers) is a very important area of concern as it can make way for very big problems if unauthorized users get access to it. Misuse of data can create big issues; hence, in cloud computing it is very important to be aware of data administrators and their extent of data access rights. Large organizations dealing with sensitive data often have well laid out regulatory compliance policies. However, these polices should be verified prior to engaging them in cloud computing. There is a possibility that in cloud computing network, sometimes the network utilizes resources from another country or they might not be fully protected; hence, the need arises for appropriate regulatory compliance policies.</p>
<p style="text-align:justify;">In cloud computing, it is very common to store data of multiple customers at one common location. Cloud computing should have proper techniques where data is segregated properly for data security and confidentiality. Care must be taken to ensure that one customer’s data does not affect another customer’s data. In addition, Cloud computing providers must be equipped with proper disaster recovery policies to deal with any unfortunate event.</p>
<h3 style="text-align:justify;">Selection of Provider</h3>
<p style="text-align:justify;">A good service provider is the key to good service. So, it is imperative to select the right service provider. One must make sure that the provider is reliable, well-reputed for their customer service and should have a proven track record in IT- related ventures. The Cloud Computing Incidents Database (CCID) records and monitors verifiable, noteworthy events that impact cloud computing providers. Visit the following Wikipedia link to obtain the list all such events. <a rel="nofollow" href="http://wiki.cloudcommunity.org/wiki/CCID">http://wiki.cloudcommunity.org/wiki/CCID</a></p>
<h3 style="text-align:justify;">Relational Database and Cloud Computing</h3>
<p style="text-align:justify;">Comparison has often been drawn between Relational Database and Cloud Computing. They are related for sure but they should not be confused for being the same thing. In actual fact, they are not really competing with each other. There are some unique requirements of applications when they do not call for any advance query techniques but rather need fast access to database. In such scenarios cloud computing should be used. In cloud, data is stored across myriad geographic locations, and processing data from different geographic database leads to delay in receiving data. In case of applications where there is the need of processing huge database using complex queries, traditional relational database is best suited. Cloud has its limitations. As for now, it only supports distributed computing; transactional operations are not currently supported in cloud computing.</p>
<h3 style="text-align:justify;">Summary</h3>
<p style="text-align:justify;">Cloud Computing is the next big thing in the arena of computing and storage. There are some concerns about security and its availability. However, different service providers are coming up with various solutions and suggestions in response to customers’ concerns. In any case, cloud is getting bigger and better, and as long as they are available through web services, without capital infrastructure investment at reasonable price, it is for sure going to proliferate and create robust demand in times to come.</p>
<h3 style="text-align:justify;">Additional Reads</h3>
<p style="text-align:justify;">While writing this article, I really enjoyed reading Cloud Computing Manifesto (<a rel="nofollow" href="http://wiki.cloudcommunity.org/wiki/Cloud_Computing_Manifesto">http://wiki.cloudcommunity.org/wiki/Cloud_Computing_Manifesto</a> ) &#8211; public declaration of principles and intentions for cloud computing. Manifesto suggests 10 principles of cloud computing, namely User centric, Philanthropic, Openness, Transparency, Interoperability, Representation, Discrimination, Evolution, Balance, and Security.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong>, <a href="http://dotnetslackers.com/articles/sql/Introduction-to-Cloud-Computing.aspx" target="_blank">Dotnetslakers</a></p>
Posted in Pinal Dave, Software Development, SQL, SQL Authority, SQL Documentation, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology Tagged: Cloud Computing <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/6168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/6168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/6168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/6168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/6168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/6168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/6168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/6168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/6168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/6168/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=6168&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/07/31/sql-server-introduction-to-cloud-computing/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQLAuthority News &#8211; Author&#8217;s Birthday &#8211; Top 7 Commenters &#8211; Volunteers</title>
		<link>http://blog.sqlauthority.com/2009/07/30/sqlauthority-news-authors-birthday-top-7-commenters-volunteers/</link>
		<comments>http://blog.sqlauthority.com/2009/07/30/sqlauthority-news-authors-birthday-top-7-commenters-volunteers/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 01:30:18 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[About Me]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[Readers Contribution]]></category>
		<category><![CDATA[Readers Question]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6060</guid>
		<description><![CDATA[Today is July 30 and I am very happy; it’s my Birthday, celebration time!!! The most common question I receive on my every birthday is -what are my plans for birthday. Let me share my plans here today. Additionally, if you are interested to know when SQL Server was born read my post SQLAuthority News [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=6060&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">Today is <strong>July 30</strong> and I am very happy; it’s <strong>my Birthday</strong>, celebration time!!! The most common question I receive on my every birthday is -what are my plans for birthday. Let me share my plans here today. Additionally, if you are interested to know when SQL Server was born read my post <strong><a href="http://blog.sqlauthority.com/2008/07/30/sqlauthority-news-author-birthday-sql-server-birthday/" target="_blank">SQLAuthority News – Author BirthDay – SQL Server Birthday</a></strong>.</p>
<p style="text-align:justify;">My first plan is that I am going to take a break from blogging on anything technical today and spend more time with my family.</p>
<p style="text-align:justify;">Let me tell you about my second plan. I am very much pleased and encouraged with active participation from many of you on this blog. I have received so far more than 10s of thousands of comments on my blog. These comments are open for you all to read and you can use them in any fashion that can help you out. Without good participation there is no life in any community, whether it is offline or online.</p>
<p style="text-align:justify;">For the same reason, I have introduced Top 7 Commenters section in the side bar of SQLAuthority.com. There are many active users who have been participating for a long time. One of them I just recognized is Imran Mohammed. This SQL Expert has been extremely helpful to the community and has been providing comprehensive answers to hundreds of questions. Hats Off to you Imran! I totally appreciate your knowledge and dedication to SQL community. Without passion and love toward helping community, this is absolutely not possible.</p>
<p>You can subscribe to <a href="http://feedproxy.google.com/SQLAuthority" target="_blank">SQLAuthority.com feed</a>, which will display all the new posts of my blog as they are published.</p>
<p>You can subscribe to<a href="http://blog.sqlauthority.com/comments/feed/" target="_blank"> SQLAuthority.com comments</a>, which will show all the new comments posted on the blog as they are published.</p>
<p style="text-align:justify;">If you prefer to receive <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=872428" target="_blank">SQLAuthority.com articles in email</a>, you will get all the fresh posts in email.</p>
<p style="text-align:justify;">There is no automated feature for top commenters where I host, so I will have to calculate this manually. I will keep it updated on weekly basis. Every week we will see new names there. First column is number of post, and second column is number name with link to experts website or blog or email.</p>
<p style="text-align:justify;">Every day I receive a couple of emails about starting a forum on SQLAuthority.com. I do plan to start the forum in future. Currently, there are plenty of very good forums on the web. SQLAuthority.com is a blog and below every blog post there is a discussion related to the subject discussed in the blog post.</p>
<p style="text-align:justify;">SQLAuthority.com is all about community and people who are passionate about SQL. Everyone is welcome to participate here. There are many ways to participate.</p>
<p style="text-align:justify;">
<ul style="text-align:justify;">
<li>Discussing blog post</li>
<li>Helping user who have posted their issues on blog</li>
<li>Asking questions</li>
<li>Writing Guest Post</li>
<li>Submitting useful SQL Scripts</li>
<li>Reviewing any Microsoft-related products</li>
<li>Reviewing Books</li>
</ul>
<p style="text-align:justify;">Let me know if you have any other useful and interesting suggestions on how I can involve YOU more in my efforts to take SQL community to the next level.</p>
<p style="text-align:justify;">If you are interested in participating in volunteer program do send me email at pinal &#8216;at&#8217; SQLAuthority.com and we can discuss something out.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
Posted in About Me, Database, DBA, Pinal Dave, Readers Contribution, Readers Question, Software Development, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/6060/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/6060/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/6060/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/6060/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/6060/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/6060/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/6060/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/6060/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/6060/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/6060/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=6060&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/07/30/sqlauthority-news-authors-birthday-top-7-commenters-volunteers/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Server Type and File Extention</title>
		<link>http://blog.sqlauthority.com/2009/04/07/sql-server-server-type-and-file-extention/</link>
		<comments>http://blog.sqlauthority.com/2009/04/07/sql-server-server-type-and-file-extention/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 01:30:01 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Add-On]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Utility]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=4241</guid>
		<description><![CDATA[Owing to my personal experience so far, I can undeniably say that Microsoft Windows products are outstanding. One of the reasons that make them exceptional is their little nifty tricks. For instance, every time I double click myfilename.sql it opens Microsoft SQL Server Management Studio (SSMS). The reason how Windows discerns that it has to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=4241&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">Owing to my personal experience so far, I can undeniably say that Microsoft Windows products are outstanding. One of the reasons that make them exceptional is their little nifty tricks. For instance, every time I double click <em>myfilename<strong>.sql</strong></em> it opens Microsoft SQL Server Management Studio (SSMS). The reason how Windows discerns that it has to open SSMS is because the extension of file I had clicked is<em><strong> .sql</strong></em>. I explored and found that SQL Server has few more filetypes associated with it, which are as follows.</p>
<p style="text-align:justify;">SQL Server -<strong> .sql</strong><br />
SQL Server Compact 3.5 SP1 -<strong> .sqlce</strong><br />
SQL Server Analysis Service &#8211; <strong>.mdx, .xmla</strong>
</p>
<p style="text-align:justify;">Moving on, I would like to talk about another command that can open SQL Server Management Studio. Just type sqlwb in command prompt to open SSMS and bring credential prompt on screen.</p>
<p style="text-align:justify;">I hope you find this article useful. Let me have your feedback so that we can take this topic further.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
Posted in Database, Pinal Dave, Software Development, SQL, SQL Add-On, SQL Authority, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQL Utility, SQLServer, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/4241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/4241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/4241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/4241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/4241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/4241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/4241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/4241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/4241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/4241/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=4241&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/04/07/sql-server-server-type-and-file-extention/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Logical Query Processing Phases &#8211; Order of Statement Execution</title>
		<link>http://blog.sqlauthority.com/2009/04/06/sql-server-logical-query-processing-phases-order-of-statement-execution/</link>
		<comments>http://blog.sqlauthority.com/2009/04/06/sql-server-logical-query-processing-phases-order-of-statement-execution/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 01:30:20 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[Readers Contribution]]></category>
		<category><![CDATA[Readers Question]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Joins]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Logical Query Processing Phases]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=4218</guid>
		<description><![CDATA[Download Logical Query Processing Poster
Of late, I penned down an article &#8211; SQL SERVER &#8211; Interesting Observation of ON Clause on LEFT JOIN &#8211; How ON Clause Effects Resultset in LEFT JOIN &#8211; which received a very intriguing comment  from one of my regular blog readers Craig. According to him this phenomenon happens due [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=4218&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;"><strong><a href="http://www.pinaldave.com/best-sql-server-download.cfm?Download=Logical-Query-Processing-Poster" target="_blank"><strong>Download Logical Query Processing Poster</strong></a></strong></p>
<p style="text-align:justify;">Of late, I penned down an article &#8211; <strong><a href="http://blog.sqlauthority.com/2009/03/15/sql-server-interesting-observation-of-on-clause-on-left-join-how-on-clause-effects-resultset-in-left-join/" target="_blank">SQL SERVER &#8211; Interesting Observation of ON Clause on LEFT JOIN &#8211; How ON Clause Effects Resultset in LEFT JOIN</a></strong> &#8211; which received a very intriguing <a href="http://blog.sqlauthority.com/2009/03/15/sql-server-interesting-observation-of-on-clause-on-left-join-how-on-clause-effects-resultset-in-left-join/#comment-49834" target="_blank">comment </a> from one of my regular blog readers <strong>Craig</strong>. According to him this phenomenon happens due to Logical Query Processing. His comment instigated a question in my mind. I have put forth this question to all my readers at the end of the article. Let me first give you an introduction to Logical Query Processing Phase.</p>
<p style="text-align:justify;">What actually sets SQL Server apart from other programming languages is the way SQL Server processes its code. Generally, most programming languages process statement from top to bottom. By contrast, SQL Server processes them in a unique order which is known as Logical Query Processing Phase. These phases generate a series of virtual tables with each virtual table feeding into the next phase (virtual tables not viewable). These phases and their orders are given as follows:</p>
<p style="text-align:justify;">1. FROM<br />
2. ON<br />
3. OUTER<br />
4. WHERE<br />
5. GROUP BY<br />
6. CUBE | ROLLUP<br />
7. HAVING<br />
8. SELECT<br />
9. DISTINCT<br />
10 ORDER BY<br />
11. TOP</p>
<p style="text-align:justify;">As OUTER join is applied subsequent to ON clause, all rows eliminated by the ON clause will still be included by the OUTER join as described in the article <strong><a href="http://blog.sqlauthority.com/2009/03/15/sql-server-interesting-observation-of-on-clause-on-left-join-how-on-clause-effects-resultset-in-left-join/" target="_blank">SQL SERVER &#8211; Interesting Observation of ON Clause on LEFT JOIN &#8211; How ON Clause Effects Resultset in LEFT JOIN</a>.</strong></p>
<p style="text-align:justify;">However, I am perplexed about the last two, ORDER BY and TOP. According to some people TOP comes first in logical query processing phase while others suggest that ORDER BY comes first. Now, here I’ve laid down my questions for you all to think about:</p>
<p style="text-align:justify;">1) What is the correct answer for order query processing phase &#8211; ORDER BY or TOP?<br />
2) How can we create an example to verify query processing phase for ORDER BY and TOP?</p>
<p style="text-align:justify;">I will soon publish the answers I receive to the above questions on this blog, with due credit given to my readers.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Database, Pinal Dave, Readers Contribution, Readers Question, Software Development, SQL, SQL Authority, SQL Joins, SQL Query, SQL Server, SQL Tips and Tricks, SQLServer, T SQL, Technology Tagged: Logical Query Processing Phases <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/4218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/4218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/4218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/4218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/4218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/4218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/4218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/4218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/4218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/4218/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=4218&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/04/06/sql-server-logical-query-processing-phases-order-of-statement-execution/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQLAuthority News &#8211; Top 10 Strategic Technologies for 2009</title>
		<link>http://blog.sqlauthority.com/2009/03/30/sqlauthority-news-top-10-strategic-technologies-for-2009/</link>
		<comments>http://blog.sqlauthority.com/2009/03/30/sqlauthority-news-top-10-strategic-technologies-for-2009/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 01:30:50 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Documentation]]></category>
		<category><![CDATA[SQL Download]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[SQLAuthority Website Review]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=4103</guid>
		<description><![CDATA[Gartner, Inc. analysts highlighted the top 10 technologies and trends that will be strategic for most organizations. Factors that denote significant impact include a high potential for disruption to IT or the business, the need for a major dollar investment, or the risk of being late to adopt.
The top 10 strategic technologies for 2009 include:
Virtualization. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=4103&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;"><a href="http://www.gartner.com/it/page.jsp?id=777212" target="_blank">Gartner, Inc.</a> analysts highlighted the top 10 technologies and trends that will be strategic for most organizations. Factors that denote significant impact include a high potential for disruption to IT or the business, the need for a major dollar investment, or the risk of being late to adopt.</p>
<p style="text-align:justify;">The top 10 strategic technologies for 2009 include:</p>
<p style="text-align:justify;"><strong>Virtualization.</strong> Much of the current buzz is focused on server virtualization, but virtualization in storage and client devices is also moving rapidly.</p>
<p style="text-align:justify;"><strong>Cloud Computing.</strong> Cloud computing is a style of computing that characterizes a model in which providers deliver a variety of IT-enabled capabilities to consumers</p>
<p style="text-align:justify;"><strong>Servers</strong> &#8211; <strong>Beyond Blades.</strong> Servers are evolving beyond the blade server stage that exists today. This evolution will simplify the provisioning of capacity to meet growing needs.</p>
<p style="text-align:justify;"><strong>Web-Oriented Architectures.</strong> The Internet is arguably the best example of an agile, interoperable and scalable service-oriented environment in existence.</p>
<p style="text-align:justify;"><strong>EnterpriseMashups.</strong> Enterprises are now investigating taking mashups from cool Web hobby to enterprise-class systems to augment their models for delivering and managing applications.</p>
<p style="text-align:justify;"><strong>Specialized Systems.</strong> Appliances have been used to accomplish IT purposes, but only with a few classes of function have appliances prevailed.</p>
<p style="text-align:justify;"><strong>Social Software and Social Networking.</strong> Social software includes a broad range of technologies, such as social networking, social collaboration, social media and social validation.</p>
<p style="text-align:justify;"><strong>Unified Communications.</strong> During the next five years, the number of different communications vendors with which a typical organization works with will be reduced by at least 50 percent.</p>
<p style="text-align:justify;"><strong>Business Intelligence.</strong> Business Intelligence (BI) have a direct positive impact on a company&#8217;s business performance, dramatically improving its ability to accomplish its mission by making smarter decisions at every level of the business from corporate strategy to operational processes.</p>
<p style="text-align:justify;"><strong>Green IT.</strong> Shifting to more efficient products and approaches can allow for more equipment to fit within an energy footprint, or to fit into a previously filled center.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>),</strong> Gartner Inc.(Published after receiving permission)</p>
Posted in Best Practices, Software Development, SQL, SQL Authority, SQL Documentation, SQL Download, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, SQLAuthority Website Review, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/4103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/4103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/4103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/4103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/4103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/4103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/4103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/4103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/4103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/4103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=4103&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/03/30/sqlauthority-news-top-10-strategic-technologies-for-2009/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Interesting Interview Questions &#8211; Revisited</title>
		<link>http://blog.sqlauthority.com/2008/12/17/sql-server-interesting-interview-questions-revisited/</link>
		<comments>http://blog.sqlauthority.com/2008/12/17/sql-server-interesting-interview-questions-revisited/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 01:30:00 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[Readers Contribution]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Interview Questions and Answers]]></category>
		<category><![CDATA[SQL Puzzle]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1754</guid>
		<description><![CDATA[I really enjoyed users participation in my previous question. Read SQL SERVER &#8211; Interesting Interview Questions before continuing reading this article. This interview question was about user participation and about how good and how different you can come with your T-SQL script. What I really liked is that many users took this test seriously and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1754&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">I really enjoyed users participation in my previous question. Read <strong><a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/" target="_blank">SQL SERVER &#8211; Interesting Interview Questions</a></strong> before continuing reading this article. This interview question was about user participation and about how good and how different you can come with your T-SQL script. What I really liked is that many users took this test seriously and did their best to answer. I really want to congratulate all the readers who have attempted to answer this question.</p>
<p style="text-align:justify;">As I have said earlier it did not matter what is the database structure, but it mattered what should be the good database architecture design. Here it only mattered if you can write T-SQL based on question.</p>
<p style="text-align:justify;">Following readers have got correct answer.</p>
<p style="text-align:justify;"><a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/#comment-44580" target="_blank">Zod</a></p>
<p style="text-align:justify;"><a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/#comment-44584" target="_blank">Eric</a></p>
<p style="text-align:justify;"><a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/#comment-44598" target="_blank">Imran Mohammed</a></p>
<p style="text-align:justify;"><a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/#comment-44605" target="_blank">bhadeliaimran</a></p>
<p style="text-align:justify;"><a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/#comment-44607" target="_blank">fly</a></p>
<p style="text-align:justify;"><a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/#comment-44629" target="_blank">pom</a></p>
<p style="text-align:justify;">I really want to thank and congratulate readers who have answered this question correct. I would suggest that you book mark this article as well original article for your personal reference. In future if you need ever recommendation regarding any interview I will be happy to list this articles for you in reference.</p>
<p style="text-align:justify;">Now let us see their solution in detail.Please go over <strong><a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/" target="_blank">interview question</a></strong> again before continuing reading following comments.</p>
<p style="text-align:justify;"><strong>Solution by</strong><a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/#comment-44580" target="_blank"><strong>Zod </strong><br />
</a></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">DECLARE </span><span style="color:#434343;">@Class1 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:#434343;">@Class2 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:#434343;">@Class3 </span><span style="color:blue;">INT</span><span style="color:gray;">,<br />
</span><span style="color:#434343;">@Class1Total </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:#434343;">@Class2Total </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:#434343;">@Class3Total </span><span style="color:blue;">INT<br />
SET </span><span style="color:#434343;">@Class1Total </span><span style="color:blue;">= </span><span style="color:black;">0<br />
</span><span style="color:blue;">SET </span><span style="color:#434343;">@Class2Total </span><span style="color:blue;">= </span><span style="color:black;">0<br />
</span><span style="color:blue;">SET </span><span style="color:#434343;">@Class3Total </span><span style="color:blue;">= </span><span style="color:black;">0<br />
</span><span style="color:blue;">DECLARE </span><span style="color:black;">student_CURSOR </span><span style="color:blue;">CURSOR FOR<br />
SELECT </span><span style="color:black;">Class1</span><span style="color:gray;">, </span><span style="color:black;">Class2</span><span style="color:gray;">, </span><span style="color:black;">Class3<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">StudentsEnroll<br />
</span><span style="color:blue;">OPEN </span><span style="color:black;">student_CURSOR<br />
</span><span style="color:blue;">FETCH </span><span style="color:black;">next </span><span style="color:blue;">FROM </span><span style="color:black;">student_CURSOR<br />
</span><span style="color:blue;">INTO </span><span style="color:#434343;">@Class1</span><span style="color:gray;">, </span><span style="color:#434343;">@Class2</span><span style="color:gray;">, </span><span style="color:#434343;">@Class3<br />
</span><span style="color:blue;">WHILE </span><span style="color:#434343;">@@FETCH_STATUS </span><span style="color:blue;">= </span><span style="color:black;">0<br />
</span><span style="color:blue;">BEGIN<br />
SET </span><span style="color:#434343;">@Class1Total </span><span style="color:blue;">= </span><span style="color:#434343;">@Class1Total </span><span style="color:gray;">+ </span><span style="color:#434343;">@Class1<br />
</span><span style="color:blue;">SET </span><span style="color:#434343;">@Class2Total </span><span style="color:blue;">= </span><span style="color:#434343;">@Class2Total </span><span style="color:gray;">+ </span><span style="color:#434343;">@Class2<br />
</span><span style="color:blue;">SET </span><span style="color:#434343;">@Class3Total </span><span style="color:blue;">= </span><span style="color:#434343;">@Class3Total </span><span style="color:gray;">+ </span><span style="color:#434343;">@Class3<br />
</span><span style="color:blue;">FETCH </span><span style="color:black;">next </span><span style="color:blue;">FROM </span><span style="color:black;">student_CURSOR<br />
</span><span style="color:blue;">INTO </span><span style="color:#434343;">@Class1</span><span style="color:gray;">, </span><span style="color:#434343;">@Class2</span><span style="color:gray;">, </span><span style="color:#434343;">@Class3<br />
</span><span style="color:blue;">END<br />
CLOSE </span><span style="color:black;">student_CURSOR<br />
</span><span style="color:blue;">DEALLOCATE </span><span style="color:black;">student_CURSOR<br />
</span><span style="color:blue;">SELECT </span><span style="color:red;">'Class1 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:#434343;">@Class1Total </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">10</span><span style="color:gray;">)) + </span><span style="color:red;">' students'<br />
</span><span style="color:blue;">UNION </span><span style="color:gray;">ALL<br />
</span><span style="color:blue;">SELECT </span><span style="color:red;">'Class2 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:#434343;">@Class2Total </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">10</span><span style="color:gray;">)) + </span><span style="color:red;">' students'<br />
</span><span style="color:blue;">UNION </span><span style="color:gray;">ALL<br />
</span><span style="color:blue;">SELECT </span><span style="color:red;">'Class3 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:#434343;">@Class3Total </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">10</span><span style="color:gray;">)) + </span><span style="color:red;">' students'<br />
</span><span style="color:black;">GO<br />
</span></code>
</p>
<p style="text-align:justify;"><strong>Solution by </strong><strong><a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/#comment-44584" target="_blank">Eric</a></strong></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT<br />
</span><span style="color:red;">'Class1 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:black;">[Class1] </span><span style="color:blue;">AS INT</span><span style="color:gray;">)) </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">10</span><span style="color:gray;">)) + </span><span style="color:red;">' students.\n'<br />
</span><span style="color:gray;">+ </span><span style="color:red;">'Class2 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:black;">[Class2] </span><span style="color:blue;">AS INT</span><span style="color:gray;">)) </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">10</span><span style="color:gray;">)) + </span><span style="color:red;">' students.\n'<br />
</span><span style="color:gray;">+ </span><span style="color:red;">'Class3 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:black;">[Class3] </span><span style="color:blue;">AS INT</span><span style="color:gray;">)) </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">10</span><span style="color:gray;">)) + </span><span style="color:red;">' students.\n'<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">[StudentsEnroll]</span><span style="color:gray;">;</span></code>
</p>
<p style="text-align:justify;"><strong>Solution by </strong><strong><a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/#comment-44598" target="_blank">Imran Mohammed</a></strong></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">CLASS</span><span style="color:gray;">+ </span><span style="color:red;">' has '</span><span style="color:gray;">+</span><span style="color:magenta;">CONVERT(</span><span>VARCHAR</span><span>(</span><span>10</span><span style="color:gray;">),</span><span style="color:magenta;">COUNT</span><span style="color:gray;">(</span><span style="color:black;">orders </span><span style="color:gray;">))+</span><span style="color:red;">' Students ' 'Output' </span><span style="color:blue;">FROM </span><span style="color:gray;">(<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">students</span><span style="color:gray;">, </span><span style="color:black;">Class</span><span style="color:gray;">, </span><span style="color:black;">Orders<br />
</span><span style="color:blue;">FROM<br />
</span><span style="color:gray;">(</span><span style="color:blue;">SELECT </span><span style="color:black;">students</span><span style="color:gray;">, </span><span style="color:black;">class1</span><span style="color:gray;">, </span><span style="color:black;">class2</span><span style="color:gray;">,</span><span style="color:black;">class3<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">studentsenroll </span><span style="color:gray;">) </span><span style="color:black;">p<br />
UNPIVOT<br />
</span><span style="color:gray;">(</span><span style="color:black;">Orders </span><span style="color:blue;">FOR </span><span style="color:black;">Class </span><span style="color:blue;">IN<br />
</span><span style="color:gray;">(</span><span style="color:black;">class1</span><span style="color:gray;">, </span><span style="color:black;">class2</span><span style="color:gray;">, </span><span style="color:black;">class3 </span><span style="color:gray;">)<br />
)</span><span style="color:blue;">AS </span><span style="color:black;">unpvt</span><span style="color:gray;">) </span><span style="color:black;">X </span><span style="color:blue;">WHERE </span><span style="color:black;">orders </span><span style="color:blue;">= </span><span style="color:black;">1 </span><span style="color:blue;">GROUP BY </span><span style="color:black;">class</span></code>
</p>
<p style="text-align:justify;"><strong>Solution by </strong><strong><a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/#comment-44605" target="_blank">bhadeliaimran</a></strong></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">DECLARE </span><span style="color:#434343;">@opXml </span><span style="color:blue;">AS </span><span style="color:black;">XML<br />
</span><span style="color:blue;">SET </span><span style="color:#434343;">@opXml </span><span style="color:blue;">= </span><span style="color:red;">'&lt;ClassStud value=''' </span><span style="color:gray;">+ </span><span style="color:magenta;">REPLACE</span><span style="color:gray;">(<br />
(</span><span style="color:blue;">SELECT<br />
</span><span style="color:red;">'Class1 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:black;">Class1 </span><span style="color:blue;">AS </span><span style="color:black;">SMALLINT</span><span style="color:gray;">)) </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">4</span><span style="color:gray;">)) + </span><span style="color:red;">' students' </span><span style="color:gray;">,<br />
</span><span style="color:red;">',Class2 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:black;">Class2 </span><span style="color:blue;">AS </span><span style="color:black;">SMALLINT</span><span style="color:gray;">)) </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">4</span><span style="color:gray;">)) + </span><span style="color:red;">' students' </span><span style="color:gray;">,<br />
</span><span style="color:red;">',Class3 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:black;">Class3 </span><span style="color:blue;">AS </span><span style="color:black;">SMALLINT</span><span style="color:gray;">)) </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">4</span><span style="color:gray;">)) + </span><span style="color:red;">' students'<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">[StudentsEnroll]<br />
</span><span style="color:blue;">FOR </span><span style="color:black;">XML PATH</span><span style="color:gray;">(</span><span style="color:red;">''</span><span style="color:gray;">) ), </span><span style="color:red;">','</span><span style="color:gray;">, </span><span style="color:red;">''' /&gt;&lt;ClassStud value='''</span><span style="color:gray;">) + </span><span style="color:red;">''' /&gt;'<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">x.value</span><span style="color:gray;">(</span><span style="color:red;">'@value'</span><span style="color:gray;">, </span><span style="color:red;">'varchar(100)'</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">[output]<br />
</span><span style="color:blue;">FROM </span><span style="color:#434343;">@opXml</span><span style="color:black;">.nodes</span><span style="color:gray;">(</span><span style="color:red;">'/ClassStud'</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">p</span><span style="color:gray;">(</span><span style="color:black;">x</span><span style="color:gray;">)</span></code>
</p>
<p style="text-align:justify;"><strong>Solution by </strong><strong><a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/#comment-44607" target="_blank">fly</a></strong></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">DECLARE </span><span style="color:#434343;">@tbl </span><span style="color:blue;">TABLE </span><span style="color:gray;">(</span><span style="color:black;">i </span><span style="color:blue;">INT</span><span style="color:gray;">)<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:#434343;">@tbl </span><span style="color:gray;">(</span><span style="color:black;">i</span><span style="color:gray;">)<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">1<br />
</span><span style="color:blue;">UNION<br />
SELECT </span><span style="color:black;">2<br />
</span><span style="color:blue;">UNION<br />
SELECT </span><span style="color:black;">3<br />
</span><span style="color:blue;">SELECT<br />
</span><span style="color:magenta;">CASE </span><span style="color:blue;">WHEN </span><span style="color:black;">i </span><span style="color:blue;">= </span><span style="color:black;">1 </span><span style="color:blue;">THEN </span><span style="color:red;">'Class 1 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:magenta;">CAST </span><span style="color:gray;">(</span><span style="color:black;">class1 </span><span style="color:blue;">AS INT</span><span style="color:gray;">)) </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">100</span><span style="color:gray;">)) + </span><span style="color:red;">' Students' </span><span style="color:blue;">ELSE<br />
</span><span style="color:magenta;">CASE </span><span style="color:blue;">WHEN </span><span style="color:black;">i </span><span style="color:blue;">= </span><span style="color:black;">2 </span><span style="color:blue;">THEN </span><span style="color:red;">'Class 2 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:magenta;">CAST </span><span style="color:gray;">(</span><span style="color:black;">class2 </span><span style="color:blue;">AS INT</span><span style="color:gray;">)) </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">100</span><span style="color:gray;">)) + </span><span style="color:red;">' Students' </span><span style="color:blue;">ELSE<br />
</span><span style="color:magenta;">CASE </span><span style="color:blue;">WHEN </span><span style="color:black;">i </span><span style="color:blue;">= </span><span style="color:black;">3 </span><span style="color:blue;">THEN </span><span style="color:red;">'Class 3 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:magenta;">CAST </span><span style="color:gray;">(</span><span style="color:black;">class3 </span><span style="color:blue;">AS INT</span><span style="color:gray;">)) </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">100</span><span style="color:gray;">)) + </span><span style="color:red;">' Students' </span><span style="color:blue;">ELSE </span><span style="color:red;">'' </span><span style="color:blue;">END<br />
END<br />
END<br />
FROM </span><span style="color:black;">[StudentsEnroll]<br />
</span><span style="color:blue;">JOIN </span><span style="color:#434343;">@tbl </span><span style="color:black;">t </span><span style="color:blue;">ON </span><span style="color:black;">i </span><span style="color:gray;">&lt;= </span><span style="color:black;">3<br />
</span><span style="color:blue;">GROUP BY </span><span style="color:black;">i</span></code>
</p>
<p style="text-align:justify;"><strong>Solution by<a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/#comment-44629" target="_blank"> pom</a></strong></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:red;">'class1 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">((</span><span style="color:blue;">SELECT </span><span style="color:magenta;">COUNT</span><span style="color:gray;">(*) </span><span style="color:blue;">FROM </span><span style="color:black;">StudentsEnroll </span><span style="color:blue;">WHERE </span><span style="color:black;">class1</span><span style="color:blue;">=</span><span style="color:black;">1 </span><span style="color:blue;">GROUP BY </span><span style="color:black;">class1</span><span style="color:gray;">) </span><span style="color:blue;">AS CHAR</span><span style="color:gray;">(</span><span style="color:black;">3</span><span style="color:gray;">)) + </span><span style="color:red;">'Students'<br />
</span><span style="color:blue;">UNION<br />
SELECT </span><span style="color:red;">'class2 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">((</span><span style="color:blue;">SELECT </span><span style="color:magenta;">COUNT</span><span style="color:gray;">(*) </span><span style="color:blue;">FROM </span><span style="color:black;">StudentsEnroll </span><span style="color:blue;">WHERE </span><span style="color:black;">class2</span><span style="color:blue;">=</span><span style="color:black;">1 </span><span style="color:blue;">GROUP BY </span><span style="color:black;">class2</span><span style="color:gray;">) </span><span style="color:blue;">AS CHAR</span><span style="color:gray;">(</span><span style="color:black;">3</span><span style="color:gray;">)) + </span><span style="color:red;">'Students'<br />
</span><span style="color:blue;">UNION<br />
SELECT </span><span style="color:red;">'class3 has ' </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">((</span><span style="color:blue;">SELECT </span><span style="color:magenta;">COUNT</span><span style="color:gray;">(*) </span><span style="color:blue;">FROM </span><span style="color:black;">StudentsEnroll </span><span style="color:blue;">WHERE </span><span style="color:black;">class3</span><span style="color:blue;">=</span><span style="color:black;">1 </span><span style="color:blue;">GROUP BY </span><span style="color:black;">class3</span><span style="color:gray;">) </span><span style="color:blue;">AS CHAR</span><span style="color:gray;">(</span><span style="color:black;">3</span><span style="color:gray;">)) + </span><span style="color:red;">'Students'</span></code>
</p>
<p style="text-align:justify;">Other two solution proposed earlier in<a href="http://blog.sqlauthority.com/2008/12/07/sql-server-interesting-interview-questions/" target="_blank"> original article</a>.</p>
<p style="text-align:justify;"><strong>Solution 1 &#8211; Using only SELECT statement</strong></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">DECLARE </span><span style="color:#434343;">@Col </span><span style="color:blue;">INT<br />
SET </span><span style="color:#434343;">@Col </span><span style="color:blue;">= </span><span style="color:black;">1<br />
</span><span style="color:blue;">WHILE </span><span style="color:gray;">(</span><span style="color:#434343;">@Col </span><span style="color:gray;">&lt; </span><span style="color:black;">4</span><span style="color:gray;">)<br />
</span><span style="color:blue;">BEGIN<br />
EXEC</span><span style="color:gray;">(</span><span style="color:red;">‘SELECT     ”Class’</span><span style="color:gray;">+</span><span style="color:#434343;">@Col</span><span style="color:gray;">+</span><span style="color:red;">‘ Has ” + CAST(COUNT(Students) AS VARCHAR(100)) + ” Students” Results<br />
FROM         studentsenroll<br />
WHERE         Class’</span><span style="color:gray;">+</span><span style="color:#434343;">@Col</span><span style="color:gray;">+</span><span style="color:red;">‘ = 1<br />
GROUP BY      Class’</span><span style="color:gray;">+</span><span style="color:#434343;">@Col</span><span style="color:gray;">)<br />
</span><span style="color:blue;">SET </span><span style="color:#434343;">@Col </span><span style="color:blue;">= </span><span style="color:#434343;">@Col </span><span style="color:gray;">+ </span><span style="color:black;">1<br />
</span><span style="color:blue;">CONTINUE<br />
END</span></code>
</p>
<p style="text-align:justify;"><strong>Solution 2 &#8211; Getting results in one resultset</strong></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:red;">‘Class1 has ’ </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">COUNT</span><span style="color:gray;">(*) </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">10</span><span style="color:gray;">)) +</span><span style="color:red;">‘ Students’<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">StudentsEnroll<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">Class1 </span><span style="color:blue;">= </span><span style="color:black;">1<br />
</span><span style="color:blue;">GROUP BY </span><span style="color:black;">Class1<br />
</span><span style="color:blue;">UNION </span><span style="color:gray;">ALL<br />
</span><span style="color:blue;">SELECT </span><span style="color:red;">‘Class2 has ’ </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">COUNT</span><span style="color:gray;">(*) </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">10</span><span style="color:gray;">)) +</span><span style="color:red;">‘ Students’<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">StudentsEnroll<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">Class2 </span><span style="color:blue;">= </span><span style="color:black;">1<br />
</span><span style="color:blue;">GROUP BY </span><span style="color:black;">Class2<br />
</span><span style="color:blue;">UNION </span><span style="color:gray;">ALL<br />
</span><span style="color:blue;">SELECT </span><span style="color:red;">‘Class3 has ’ </span><span style="color:gray;">+ </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">COUNT</span><span style="color:gray;">(*) </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">10</span><span style="color:gray;">)) +</span><span style="color:red;">‘ Students’<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">StudentsEnroll<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">Class3 </span><span style="color:blue;">= </span><span style="color:black;">1<br />
</span><span style="color:blue;">GROUP BY </span><span style="color:black;">Class3</span></code>
</p>
<p style="text-align:justify;"><span style="color:black;">Now the real question is which of this articles are favorite solution of yours. Please leave your choice along with reason in comment. </span></p>
<p style="text-align:justify;"><span style="color:black;">I promise if you can not write solution but if you understand the proposed solution in this article you will usually pass any database T-SQL problem in interviews. Additionally, if you are looking for job in SQL Server related area please find your <strong><a href="http://jobs.sqlauthority.com/" target="_blank">right job</a> </strong>here. Make sure to read all the <strong><a href="http://blog.sqlauthority.com/2008/09/20/sql-server-2008-interview-questions-and-answers-complete-list-download/" target="_blank">interview questions and answers for SQL Server 2008</a></strong> before you appear for interview. </span></p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Best Practices, Pinal Dave, Readers Contribution, Software Development, SQL, SQL Authority, SQL Interview Questions and Answers, SQL Puzzle, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1754/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1754&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/12/17/sql-server-interesting-interview-questions-revisited/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER 2008 &#8211; Top 10 SQL Server 2008 Features for Independent Software Vendor Applications</title>
		<link>http://blog.sqlauthority.com/2008/12/10/sql-server-2008-top-10-sql-server-2008-features-for-independent-software-vendor-applications/</link>
		<comments>http://blog.sqlauthority.com/2008/12/10/sql-server-2008-top-10-sql-server-2008-features-for-independent-software-vendor-applications/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 01:30:53 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Documentation]]></category>
		<category><![CDATA[SQL Download]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Utility]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1631</guid>
		<description><![CDATA[Microsoft SQL Server 2008 has hundreds of new and improved features, many of which are specifically designed for large scale independent software vendor (ISV) applications, which need to leverage the power of the underlying database while keeping their code database agnostic. This article presents details of the top 10 features that we believe are most [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1631&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">Microsoft SQL Server 2008 has hundreds of new and improved features, many of which are specifically designed for large scale independent software vendor (ISV) applications, which need to leverage the power of the underlying database while keeping their code database agnostic. This article presents details of the top 10 features that we believe are most applicable to such applications based on our work with strategic ISV partners. Along with the description of each feature, the main pain-points the feature helps resolve and some of the important limitations that need to be considered are also presented.</p>
<p style="text-align:justify;">1 Data Compression<br />
2 Backup Compression<br />
3 Transparent Data Encryption<br />
4 Data Collector and Management Data Warehouse<br />
5 Lock Escalation<br />
6 Plan Freezing<br />
7 Optimize for Ad hoc Workloads Option<br />
8 Resource Governor<br />
9 Table-Valued Parameters<br />
10 Filestream
</p>
<p style="text-align:justify;"><a href="http://sqlcat.com/top10lists/archive/2008/11/24/top-10-sql-server-2008-features-for-isv-applications-burzin.aspx" target="_blank">Read complete article here.</a></p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Best Practices, Database, Software Development, SQL, SQL Authority, SQL Documentation, SQL Download, SQL Performance, SQL Query, SQL Server, SQL Tips and Tricks, SQL Utility, SQLAuthority News, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1631/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1631&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/12/10/sql-server-2008-top-10-sql-server-2008-features-for-independent-software-vendor-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQLAuthority News &#8211; SQL Server White Paper: SQL Server 2008 Compliance Guide</title>
		<link>http://blog.sqlauthority.com/2008/11/21/sqlauthority-news-sql-server-white-paper-sql-server-2008-compliance-guide/</link>
		<comments>http://blog.sqlauthority.com/2008/11/21/sqlauthority-news-sql-server-white-paper-sql-server-2008-compliance-guide/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 01:30:57 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Documentation]]></category>
		<category><![CDATA[SQL Download]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL White Papers]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1547</guid>
		<description><![CDATA[Organizations across the globe are being inundated with regulatory requirements. They also have a strong need to better manage their IT systems to ensure they are operating efficiently and staying secure. Microsoft is often asked to provide guidance and technology to assist organizations struggling with compliance. The SQL Server 2008 Compliance Guidance white paper was [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1547&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;"><span>Organizations across the globe are being inundated with regulatory requirements. They also have a strong need to better manage their IT systems to ensure they are operating efficiently and staying secure. Microsoft is often asked to provide guidance and technology to assist organizations struggling with compliance. The SQL Server 2008 Compliance Guidance white paper was written to help organizations and individuals understand how to use the features of the Microsoft SQL Server 2008 database software to address their compliance needs. This paper serves as an accompaniment to the SQL Server 2008 compliance software development kit (SDK), which provides sample code and guidance for understanding SQL Server 2008 compliance features and using them for developing solutions.</span></p>
<h2 style="text-align:justify;"><span><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6e1021dd-65b9-41c2-8385-438028f5acc2&amp;DisplayLang=en" target="_blank"><strong>Download White Paper</strong></a><br />
</span></h2>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Software Development, SQL, SQL Authority, SQL Documentation, SQL Download, SQL Query, SQL Server, SQL Tips and Tricks, SQL White Papers, SQLAuthority News, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1547/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1547&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/11/21/sqlauthority-news-sql-server-white-paper-sql-server-2008-compliance-guide/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQLAuthority News &#8211; TOP Downloads &#8211; Bookmark</title>
		<link>http://blog.sqlauthority.com/2008/10/24/sqlauthority-news-top-downloads-bookmark/</link>
		<comments>http://blog.sqlauthority.com/2008/10/24/sqlauthority-news-top-downloads-bookmark/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 01:30:02 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Download]]></category>
		<category><![CDATA[SQL Interview Questions and Answers]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Outsourcing Technology]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1424</guid>
		<description><![CDATA[Recently I have got many many request for SQL Server Interview Questions and Answers as well related articles. It seems many people are looking for Job or appearing for interview at this time of the year. I have included list of the my top downloads in side bar of the blog, still I receive many [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1424&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">Recently I have got many many request for SQL Server Interview Questions and Answers as well related articles. It seems many people are looking for Job or appearing for interview at this time of the year. I have included list of the my top downloads in side bar of the blog, still I receive many curious questions as side bar does not show up in RSS feed.</p>
<p style="text-align:justify;">Please book mark this post for future reference.</p>
<h3 style="text-align:justify;"><a href="http://www.pinaldave.com/best-sql-server-download.cfm?download=SQL-SERVER-2008-Download-Interview-Questions-and-Answers" target="_blank">SQL Server 2008 Interview Questions and Answers Download</a></h3>
<h3 style="text-align:justify;"><a href="http://www.pinaldave.com/best-sql-server-download.cfm?download=Data-Warehousing-Business-Intelligence-Interview-Questions-and-Answers-Download" target="_blank">SQL Server Data Warehousing and BI Interview Q and A Download</a></h3>
<h3 style="text-align:justify;"><a href="http://www.pinaldave.com/best-sql-server-download.cfm?download=SQL-SERVER-Database-Coding-Standards-and-Guidelines-Complete-List-Download" target="_blank">SQL Server Database Coding Standards and Guidelines Complete List Download</a></h3>
<h3 style="text-align:justify;"><a href="http://www.pinaldave.com/best-sql-server-download.cfm?download=SQL-SERVER-Cheat-Sheet" target="_blank">SQL Server Cheat Sheet Download</a></h3>
<h3 style="text-align:justify;"><a href="http://www.pinaldave.com/best-sql-server-download.cfm?download=SQL-SERVER-Download-Frequently-Asked-Generic-Interview-Questions" target="_blank">SQL Server Frequently Asked Generic Interview Questions Download</a></h3>
<h3 style="text-align:justify;"><a href="http://www.pinaldave.com/best-sql-server-download.cfm?download=SQL-SERVER-Download-SQL-Server-Management-Studio-Keyboard-Shortcuts-(SSMS-Shortcuts)" target="_blank">SQL Server Management Studio Keyboard Shortcuts (SSMS Shortcuts) Download</a></h3>
<h3 style="text-align:justify;"><a href="http://www.pinaldave.com/best-sql-server-download.cfm?download=SQL-SERVER-2008-Brochure-Download" target="_blank">SQL Server 2008 Brochure Download</a></h3>
<h3 style="text-align:justify;"><a href="http://www.pinaldave.com/best-sql-server-download.cfm?download=SQL-SERVER-ScreenSaver-Download" target="_blank">SQL Server 2008 Screen Saver Download</a></h3>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Best Practices, Database, Software Development, SQL, SQL Authority, SQL Download, SQL Interview Questions and Answers, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology Tagged: Outsourcing Technology <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1424/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1424&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/10/24/sqlauthority-news-top-downloads-bookmark/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Introduction to CLR &#8211; Simple Example of CLR Stored Procedure</title>
		<link>http://blog.sqlauthority.com/2008/10/19/sql-server-introduction-to-clr-simple-example-of-clr-stored-procedure/</link>
		<comments>http://blog.sqlauthority.com/2008/10/19/sql-server-introduction-to-clr-simple-example-of-clr-stored-procedure/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 01:30:51 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Stored Procedure]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Utility]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[CLR]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1390</guid>
		<description><![CDATA[CLR is abbreviation of Common Language Runtime. In SQL Server 2005 and later version of it database objects can be created which are created in CLR. Stored Procedures, Functions, Triggers can be coded in CLR. CLR is faster than T-SQL in many cases. CLR is mainly used to accomplish task which are not possible by [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1390&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">CLR is abbreviation of Common Language Runtime. In SQL Server 2005 and later version of it database objects can be created which are created in CLR. Stored Procedures, Functions, Triggers can be coded in CLR. CLR is faster than T-SQL in many cases. CLR is mainly used to accomplish task which are not possible by T-SQL or can use lots of resources. CLR can be usually implemented where there is intense string operation, thread management or iteration methods which can be complicated for T-SQL. Implementing CLR provides more security to Extended Stored Procedure.</p>
<p style="text-align:justify;">Let us create one very simple CLR where we will print current system datetime.</p>
<p style="text-align:justify;"><strong>1) Open Microsoft Visual Studio &gt;&gt; Click New Project &gt;&gt; Select Visual C# &gt;&gt; Database &gt;&gt; SQL Server Project</strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/clr/clr1.gif" alt="" width="500" height="429" /></p>
<p style="text-align:justify;"><strong>2) Either choose from existing database connection as reference or click on Add New Reference. In my example I have selected Add New Reference. </strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/clr/clr2.gif" alt="" width="364" height="374" /></p>
<p style="text-align:justify;"><strong>3) If you have selected existing reference skip to next step or add database reference as displayed in image.</strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/clr/clr3.gif" alt="" width="451" height="657" /></p>
<p style="text-align:justify;"><strong>4) Once database reference is added following project will be displayed in Solution Explorer. Right click on Solution Explorer &gt;&gt; Click on Add &gt;&gt; Stored Procedure.</strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/clr/clr4.gif" alt="" width="434" height="699" /></p>
<p style="text-align:justify;"><strong>5) Add new stored procedure template from following screen.</strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/clr/clr5.gif" alt="" width="500" height="383" /></p>
<p style="text-align:justify;"><strong>6) Once template added it will look like following image. </strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/clr/clr6.gif" alt="" width="437" height="431" /></p>
<p style="text-align:justify;"><strong>7) Now where it suggest to //Put your code here. Replace it with code displayed in the image. Once the code is complete do following two steps.<br />
a) Click on menu bar &gt;&gt; Build &gt;&gt; Build ProjectName<br />
b) Click on menu bar &gt;&gt; Build &gt;&gt; Deploy ProjectName<br />
Building and Deploying project should give successful message.<br />
</strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/clr/clr7.gif" alt="" width="500" height="386" /><br />
<span class="kwrd">using</span> System;<br />
<span class="kwrd">using</span> System.Data;<br />
<span class="kwrd">using</span> System.Data.SqlClient;<br />
<span class="kwrd">using</span> System.Data.SqlTypes;<br />
<span class="kwrd">using</span> Microsoft.SqlServer.Server;</p>
<p style="text-align:justify;"><span class="kwrd">public</span> <span class="kwrd">partial</span> <span class="kwrd">class</span> StoredProcedures<br />
{<br />
[Microsoft.SqlServer.Server.SqlProcedure]<br />
<span class="kwrd">public</span> <span class="kwrd">static</span> <span class="kwrd">void</span> CLRSPTest()<br />
{<br />
SqlPipe sp;<br />
sp = SqlContext.Pipe;<br />
String strCurrentTime = <span class="str">&#8220;Current System DateTime is: &#8220;</span><br />
+ System.DateTime.Now.ToString();<br />
sp.Send(strCurrentTime);<br />
}<br />
};<br />
<strong>8) Now open SQL Server Management Studio and run following script in Query Editor. It should return current system datetime. Running it again the time will change.</strong>
</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/clr/clr8.gif" alt="" width="387" height="162" /></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks<br />
GO<br />
</span><span style="color:blue;">EXEC </span><span style="color:black;">dbo.CLRSPTest<br />
GO</span></code>
</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Pinal Dave, Software Development, SQL, SQL Authority, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, SQL Utility, T SQL, Technology Tagged: CLR <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1390/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1390&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/10/19/sql-server-introduction-to-clr-simple-example-of-clr-stored-procedure/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/blogfolder/clr/clr1.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/clr/clr2.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/clr/clr3.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/clr/clr4.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/clr/clr5.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/clr/clr6.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/clr/clr7.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/clr/clr8.gif" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Downgrade Database to Previous Version</title>
		<link>http://blog.sqlauthority.com/2008/10/16/sql-server-downgrade-database-to-previous-version/</link>
		<comments>http://blog.sqlauthority.com/2008/10/16/sql-server-downgrade-database-to-previous-version/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 01:30:11 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1375</guid>
		<description><![CDATA[Today I am writing on the topic which I do not like to write much. I enjoy writing usually positive or affirmative posts. Recently I got email from two different DBA where they upgraded to SQL Server 2005 trial version on their production server and now as their trial version was expire they wanted to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1375&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">Today I am writing on the topic which I do not like to write much. I enjoy writing usually positive or affirmative posts. Recently I got email from two different DBA where they upgraded to SQL Server 2005 trial version on their production server and now as their trial version was expire they wanted to downgrade their database to previous licensed version they had.</p>
<p style="text-align:justify;">The main questions is <em><strong>how they can downgrade the from SQL Server 2005 to SQL Server 2000?</strong></em></p>
<p style="text-align:justify;">Answer is : <strong>Not Possible.</strong></p>
<p style="text-align:justify;">There are no tools or native SQL Server facility which does this. I am also not aware of any of the tool available from third party software vendors. Database (.mdf, .ndf, .ldf) can not be restored from higher version to lower versions. If you want to downgrade your server, fresh install of previous version of server should be done first. Right after that recreate all the schema to create empty tables and database objects (SP, UDFs etc). Use SSIS/DTS or any other import/export utility and import data from upgraded version to downgraded version.</p>
<p style="text-align:justify;">First of all I am true believer of licensed software. I do not like to use or encourage use of pirated software. Again, I do not like to even downgrade to lower version. SQL Server 2008 and SQL Server 2005 have many new and advance features over SQL Server 2000. One must keep on moving towards new technology and upgrade themselves and company technology.</p>
<p style="text-align:justify;">It is responsibility of the each developer to encourage technological advancement and prevent piracy.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Database, Pinal Dave, Software Development, SQL, SQL Authority, SQL Performance, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1375/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1375&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/10/16/sql-server-downgrade-database-to-previous-version/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQLAuthority News &#8211; SQL Server 2008 &#8211; Microsoft Certifications for 70-432 70-433 70-450 70-452</title>
		<link>http://blog.sqlauthority.com/2008/10/08/sqlauthority-news-sql-server-2008-microsoft-certifications-for-70-432-70-433-70-450-70-452/</link>
		<comments>http://blog.sqlauthority.com/2008/10/08/sqlauthority-news-sql-server-2008-microsoft-certifications-for-70-432-70-433-70-450-70-452/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 01:30:48 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Documentation]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Microsoft Certifications]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1339</guid>
		<description><![CDATA[I have received many emails requesting information about SQL Server certifications examples. Microsoft has released new set of exams for SQL Server 2008 certifications. I am listing them here for quick reference.
Exam 70-432 &#8211; TS: Microsoft SQL Server 2008, Implementation and Maintenance
Installing and Configuring SQL Server 2008 (10 percent)
Maintaining SQL Server Instances (13 percent)
Managing SQL [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1339&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">I have received many emails requesting information about SQL Server certifications examples. Microsoft has released new set of exams for SQL Server 2008 certifications. I am listing them here for quick reference.</p>
<p style="text-align:justify;"><strong><a href="http://www.microsoft.com/learning/en/us/exams/70-432.mspx" target="_blank">Exam 70-432 &#8211; TS: Microsoft SQL Server 2008, Implementation and Maintenance</a></strong></p>
<p style="text-align:justify;">Installing and Configuring SQL Server 2008 (10 percent)<br />
Maintaining SQL Server Instances (13 percent)<br />
Managing SQL Server Security (15 percent)<br />
Maintaining a SQL Server Database (16 percent)<br />
Performing Data Management Tasks (14 percent)<br />
Monitoring and Troubleshooting SQL Server (13 percent)<br />
Optimizing SQL Server Performance (10 percent)<br />
Implementing High Availability (9 percent)
</p>
<p style="text-align:justify;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p style="text-align:justify;"><strong><a href="http://www.microsoft.com/learning/en/us/exams/70-433.mspx" target="_blank">Exam 70-433 &#8211; TS: Microsoft SQL Server 2008, Database Development</a></strong></p>
<p style="text-align:justify;">Implementing Tables and Views (14 percent)<br />
Implementing Programming Objects (16 percent)<br />
Working with Query Fundamentals (21 percent)<br />
Applying Additional Query Techniques (15 percent)<br />
Working with Additional SQL Server Components (11 percent)<br />
Working with XML Data (12 percent)<br />
Gathering Performance Information (11 percent)
</p>
<p style="text-align:justify;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p style="text-align:justify;"><strong><a href="http://www.microsoft.com/learning/en/us/exams/70-450.mspx" target="_blank">Exam 70-450 &#8211; PRO: Designing, Optimizing, and Maintaining a Database Administrative Solution Using Microsoft SQL Server 2008</a></strong></p>
<p style="text-align:justify;">Designing a SQL Server Instance and a Database Solution (14 percent)<br />
Designing a Database Server Security Solution (15 percent)<br />
Designing a Database Solution for High Availability (15 percent)<br />
Designing a Backup and Recovery Solution (20 percent)<br />
Designing a Monitoring Strategy (13 percent)<br />
Designing a Strategy to Maintain and Manage Databases (14 percent)<br />
Designing a Strategy for Data Distribution (9 percent)
</p>
<p style="text-align:justify;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p style="text-align:justify;"><strong><a href="http://www.microsoft.com/learning/en/us/exams/70-452.mspx" target="_blank">Exam 70-452 &#8211; PRO: Designing a Business Intelligence Infrastructure Using Microsoft SQL Server 2008</a></strong></p>
<p style="text-align:justify;">Designing and Managing Reports (20 percent)<br />
Designing Data Mining Models (10 percent)<br />
Administering a BI Solution (15 percent)<br />
Designing the BI Architecture (21 percent)<br />
Designing and Deploying SSIS Packages (16 percent)<br />
Designing an Analysis Services Database (18 percent)
</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Database, Software Development, SQL, SQL Authority, SQL Documentation, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology Tagged: Microsoft Certifications <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1339/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1339&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/10/08/sqlauthority-news-sql-server-2008-microsoft-certifications-for-70-432-70-433-70-450-70-452/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; 2008 &#8211; Fix Connection Error with Visual Studio 2008 &#8211; Server Version is not supported &#8211; VS SP1 ISO Download</title>
		<link>http://blog.sqlauthority.com/2008/10/05/sql-server-2008-fix-connection-error-with-visual-studio-2008-server-version-is-not-supported-vs-sp1-iso-download/</link>
		<comments>http://blog.sqlauthority.com/2008/10/05/sql-server-2008-fix-connection-error-with-visual-studio-2008-server-version-is-not-supported-vs-sp1-iso-download/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 01:30:04 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Download]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Utility]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1309</guid>
		<description><![CDATA[I previously wrote article SQL SERVER &#8211; 2008 &#8211; Fix Connection Error with Visual Studio 2008 &#8211; Server Version is not supported where I discussed how downloading Visual Studio SP1 will fix the error of Visual Studio 2008 connecting to SQL Server 2008. I have provided link to SP1 which was downloading only installer and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1309&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">I previously wrote article <a href="http://blog.sqlauthority.com/2008/09/21/sql-server-2008-fix-connection-error-with-visual-studio-2008-server-version-is-not-supported/" target="_blank">SQL SERVER &#8211; 2008 &#8211; Fix Connection Error with Visual Studio 2008 &#8211; Server Version is not supported</a> where I discussed how downloading Visual Studio SP1 will fix the error of Visual Studio 2008 connecting to SQL Server 2008. I have provided link to SP1 which was downloading only installer and after that it downloads SP1 component from internet.</p>
<p style="text-align:justify;">.NET Expert <strong><a href="http://blog.sqlauthority.com/2008/09/21/sql-server-2008-fix-connection-error-with-visual-studio-2008-server-version-is-not-supported/#comment-43259" target="_blank">Vidya Vrat Agarwal</a></strong> has pointed out that Visual Studio SP1 can be downloaded as ISO. It is really good that now after downloading only one it can be used again to installed SP1 on multiple computers.</p>
<h3 style="text-align:justify;"><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=27673c47-b3b5-4c67-bd99-84e525b5ce61&amp;displaylang=en" target="_blank">Download Microsoft Visual Studio 2008 Service Pack 1 (iso)</a></h3>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Pinal Dave, Software Development, SQL, SQL Authority, SQL Download, SQL Query, SQL Server, SQL Tips and Tricks, SQL Utility, SQLAuthority News, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1309/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1309&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/10/05/sql-server-2008-fix-connection-error-with-visual-studio-2008-server-version-is-not-supported-vs-sp1-iso-download/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Server &#8211; 2008 &#8211; Cheat Sheet &#8211; One Page PDF Download</title>
		<link>http://blog.sqlauthority.com/2008/10/02/sql-server-2008-cheat-sheet-one-page-pdf-download/</link>
		<comments>http://blog.sqlauthority.com/2008/10/02/sql-server-2008-cheat-sheet-one-page-pdf-download/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 01:30:48 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Add-On]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Coding Standards]]></category>
		<category><![CDATA[SQL Documentation]]></category>
		<category><![CDATA[SQL Download]]></category>
		<category><![CDATA[SQL Interview Questions and Answers]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Utility]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL Cheat Sheet]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1289</guid>
		<description><![CDATA[Very frequently I have been asked to create a page, post or article where in one page all the important concepts of SQL Server are covered. SQL Server 2008 is very large subject and can not be even covered 1000 of pages. In daily life of DBA there are few commands very frequently used and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1289&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">Very frequently I have been asked to create a page, post or article where in one page all the important concepts of SQL Server are covered. SQL Server 2008 is very large subject and can not be even covered 1000 of pages. In daily life of DBA there are few commands very frequently used and for novice developers it is good to keep all the important SQL Script and SQL Statements handy.</p>
<p style="text-align:justify;">I have attempted to create cheat sheet for SQL Server 2008 most important commands. User can print this in one A4 size page and keep along with them. This can be used in interviews where T-SQL scripts are being asked.</p>
<p style="text-align:justify;">Let me know your opinion and if you find this useful.</p>
<h2 style="text-align:justify;"><a href="http://www.pinaldave.com/best-sql-server-download.cfm?download=SQL-SERVER-Cheat-Sheet" target="_blank">Download SQL Server 2008 Cheat Sheet</a></h2>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Best Practices, Database, DBA, Pinal Dave, Software Development, SQL, SQL Add-On, SQL Authority, SQL Coding Standards, SQL Documentation, SQL Download, SQL Interview Questions and Answers, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQL Utility, T SQL, Technology Tagged: SQL Cheat Sheet <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1289/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1289&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/10/02/sql-server-2008-cheat-sheet-one-page-pdf-download/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Guidelines and Coding Standards Part &#8211; 2</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/</link>
		<comments>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 01:30:49 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Coding Standards]]></category>
		<category><![CDATA[SQL Documentation]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Stored Procedure]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110</guid>
		<description><![CDATA[
 To express apostrophe within a string, nest single quotes (two single quotes).
Example:
SET @sExample = 'SQL''s Authority'

 When working with branch conditions or complicated expressions, use parenthesis to increase readability.
IF ((SELECT 1
FROM TableName
WHERE 1=2) ISNULL)

 To mark single line as comment use (&#8211;) before statement. To mark section of code as comment use (/*&#8230;*/).


 Avoid the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1110&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><ul class="unIndentedList" style="text-align:justify;">
<li> To express <strong>apostrophe</strong> within a string, nest single quotes (two single quotes).</li>
<p>Example:</p>
<p><code style="font-size:12px;"><span style="color:blue;">SET </span><span style="color:#434343;">@sExample </span><span style="color:blue;">= </span><span style="color:red;">'SQL''s Authority'</span></code></ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> When working with branch conditions or <strong>complicated expressions</strong>, use parenthesis to increase readability.</li>
<p><code style="font-size:12px;"><span style="color:blue;">IF </span><span style="color:gray;">((</span><span style="color:blue;">SELECT </span><span style="color:black;">1<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">TableName<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">1</span><span style="color:blue;">=</span><span style="color:black;">2</span><span style="color:gray;">) </span><span style="color:magenta;">ISNULL</span><span style="color:gray;">)</span></code></ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> To mark single line as comment use (&#8211;) before statement. To mark section of code as comment use (/*&#8230;*/).</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Avoid the use of cross joins if possible. (<a href="http://blog.sqlauthority.com/2007/04/20/sql-server-interview-questions-part-6/">Read More Here</a>)</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> If there is no need of resultset then use syntax that doesn&#8217;t return a resultset.</li>
<p><code style="font-size:12px;"><span style="color:blue;">IF </span><span style="color:gray;">EXISTS   (</span><span style="color:blue;">SELECT </span><span style="color:black;">1</span></code><br />
<code style="font-size:12px;"><span style="color:blue;">FROM </span><span style="color:black;">UserDetails</span></code><br />
<code style="font-size:12px;"><span style="color:blue;">WHERE </span><span style="color:black;">UserID </span><span style="color:blue;">= </span><span style="color:black;">50</span><span style="color:gray;">)</span></code></ul>
<ul class="unIndentedList" style="text-align:justify;">Rather than,<br />
<code style="font-size:12px;"><span style="color:blue;">IF </span><span style="color:gray;">EXISTS  (</span><span style="color:blue;">SELECT </span><span style="color:magenta;">COUNT </span><span style="color:gray;">(</span><span style="color:black;">UserID</span><span style="color:gray;">)</span></code><br />
<code style="font-size:12px;"><span style="color:blue;">FROM </span><span style="color:black;">UserDetails</span></code><br />
<code style="font-size:12px;"><span style="color:blue;">WHERE </span><span style="color:black;">UserID </span><span style="color:blue;">= </span><span style="color:black;">50</span><span style="color:gray;">)</span></code></ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Use graphical execution plan in <strong>Query Analyzer</strong> or <strong>SHOWPLAN_TEXT</strong> or <strong>SHOWPLAN_ALL</strong> commands to analyze SQL queries. Your queries should do an <strong>&#8220;Index Seek&#8221;</strong> instead of an &#8220;Index Scan&#8221; or a &#8220;Table Scan&#8221;. (<a href="http://blog.sqlauthority.com/2007/08/28/sql-server-actual-execution-plan-vs-estimated-execution-plan/">Read More Here</a>)</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Do not prefix stored procedure names with &#8220;SP_&#8221;, as<strong> &#8220;SP_&#8221; is reserved for system stored procedures</strong>.<br />
Example:<br />
<strong>SP&lt;App Name&gt;_ [&lt;Group Name &gt;_] &lt;Action&gt;&lt;table/logical instance&gt;</strong></li>
<li> Incorporate your frequently required, complicated joins and calculations into a <strong>view</strong> so that you don&#8217;t have to repeat those joins/calculations in all your queries. Instead, just select from the view. (<a href="http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/">Read More Here</a>)</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Do not query / manipulate the data directly in your front end application, instead <strong>create stored procedures</strong>, and let your applications to access stored procedure.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Avoid using <strong>ntext</strong>, <strong>text</strong>, and <strong>image</strong> data types in new development work. Use <a href="http://msdn.microsoft.com/en-us/library/ms186939.aspx">nvarchar (max)</a>, <a href="http://msdn.microsoft.com/en-us/library/ms176089.aspx">varchar (max)</a>, and <a href="http://msdn.microsoft.com/en-us/library/ms188362.aspx">varbinary (max)</a> instead.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Do not store <strong>binary or image files (Binary Large Objects or BLOBs)</strong> inside the database. Instead, store the path to the binary or image file in the database and use that as a pointer to the actual file stored on a server.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Use the <strong>CHAR</strong> datatype for a non-nullable column, as it will be the fixed length column, NULL value will also block the defined bytes.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> <strong>Avoid using dynamic SQL statements</strong>. Dynamic SQL tends to be slower than static SQL, as SQL Server generate execution plan every time at runtime.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Minimize the use of Nulls. Because they incur more complexity in queries and updates. <strong>ISNULL</strong> and <strong>COALESCE</strong> functions are helpful in dealing with NULL values</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Use <strong>Unicode</strong> datatypes, like <strong>NCHAR, NVARCHAR</strong> or <strong>NTEXT</strong> if it needed, as they use twice as much space as non-Unicode datatypes.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Always use column list in <strong>INSERT</strong> statements of SQL queries. This will avoid problem when table structure changes.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Perform all <strong>referential integrity</strong> checks and <strong>data validations</strong> using <strong>constraints</strong> instead of <strong>triggers</strong>, as they are faster. Limit the use of triggers only for auditing, custom tasks, and validations that cannot be performed using constraints.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Always access tables in the same order in all stored procedure and triggers consistently. This will avoid deadlocks. (<a href="http://blog.sqlauthority.com/2007/05/16/sql-server-fix-error-1205-transaction-process-id-was-deadlocked-on-resources-with-another-process-and-has-been-chosen-as-the-deadlock-victim-rerun-the-transaction/">Read More Here</a>)</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Do not call functions repeatedly in stored procedures, triggers, functions and batches, instead call the function once and store the result in a variable, for later use.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> With Begin and End Transaction always use global variable <strong>@@ERROR</strong>, immediately after data manipulation statements (INSERT/UPDATE/DELETE), so that if there is an Error the transaction can be <strong>rollback</strong>.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Excessive usage of <strong>GOTO</strong> can lead to hard-to-read and understand code.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Do not use <strong>column numbers</strong> in the ORDER BY clause; it will reduce the readability of SQL query.<br />
Example: <em>Wrong Statement</em><br />
<code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">UserID</span><span style="color:gray;">, </span><span style="color:black;">UserName</span><span style="color:gray;">, </span><span style="color:black;">Password<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">UserDetails<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">2</span></code></li>
<p>Example: <em>Correct Statement</em><br />
<code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">UserID</span><span style="color:gray;">, </span><span style="color:black;">UserName</span><span style="color:gray;">, </span><span style="color:black;">Password<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">UserDetails<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">UserName</span></code></ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> To avoid <strong>trips from application to SQL Server</strong>, we should retrive multiple resultset from single Stored Procedure instead of using output param.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> The <strong>RETURN</strong> statement is meant for returning the execution status only, but not data. If you need to return data, use <strong>OUTPUT</strong> parameters.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> If stored procedure always returns single row resultset, then consider returning the resultset using <strong>OUTPUT</strong> parameters instead of <strong>SELECT</strong> statement, as ADO handles OUTPUT parameters faster than resultsets returned by SELECT statements.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Effective <strong>indexes</strong> are one of the best ways to improve performance in a database application.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> <strong>BULK INSERT</strong> command helps to import a data file into a database table or view in a user‐specified format.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Use <strong>Policy Management</strong> to make or define and enforce your own policies fro configuring and managing SQL Server across the enterprise, eg. Policy that Prefixes for stored procedures should be sp.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Use <strong>sparse columns</strong> to reduce the space requirements for null values. (<span style="text-decoration:underline;">Read More Here</span>)</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Use <strong>MERGE Statement</strong> to implement multiple DML operations instead of writing separate INSERT, UPDATE, DELETE statements.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> When some particular records are retrieved frequently, apply <strong>Filtered Index</strong> to improve query performace, faster retrieval and reduce index maintenance costs.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Using the <strong>NOLOCK</strong> query optimizer hint is considered good practice in order to improve concurrency on a busy system.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> <strong>EXCEPT </strong>or <strong>NOT EXIST</strong> clause can be used in place of LEFT JOIN or NOT IN for better peformance.</li>
<p>Example:<br />
<code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">EmpNo</span><span style="color:gray;">, </span><span style="color:black;">EmpName</span></code><br />
<code style="font-size:12px;"><span style="color:blue;">FROM </span><span style="color:black;">EmployeeRecord</span></code><br />
<code style="font-size:12px;"><span style="color:blue;">WHERE </span><span style="color:black;">Salary </span><span style="color:gray;">&gt; </span><span style="color:black;">1000 </span><span style="color:gray;">AND </span><span style="color:black;">Salary</span></code><br />
<code style="font-size:12px;"><span style="color:gray;">NOT </span><span style="color:blue;">IN </span><span style="color:gray;">(</span><span style="color:blue;">SELECT </span><span style="color:black;">Salary</span></code><br />
<code style="font-size:12px;"><span style="color:blue;">FROM </span><span style="color:black;">EmployeeRecord</span></code><br />
<code style="font-size:12px;"><span style="color:blue;">WHERE </span><span style="color:black;">Salary </span><span style="color:gray;">&gt; </span><span style="color:black;">2000</span><span style="color:gray;">);</span></code></ul>
<ul class="unIndentedList" style="text-align:justify;">(Recomended)<br />
<code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">EmpNo</span><span style="color:gray;">, </span><span style="color:black;">EmpName<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">EmployeeRecord<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">Salery </span><span style="color:gray;">&gt; </span><span style="color:black;">1000<br />
</span><span style="color:blue;">EXCEPT<br />
SELECT </span><span style="color:black;">EmpNo</span><span style="color:gray;">, </span><span style="color:black;">EmpName<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">EmployeeRecord<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">Salery </span><span style="color:gray;">&gt; </span><span style="color:black;">2000<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">EmpName</span><span style="color:gray;">;</span></code></ul>
<p style="text-align:justify;">© Copyright 2000-2008<a title="Pinal Dave" href="http://www.pinaldave.com/"> Pinal Dave.</a> All Rights Reserved. <a href="http://blog.sqlauthority.com/">SQLAuthority.com</a></p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Best Practices, Database, Pinal Dave, Software Development, SQL, SQL Authority, SQL Coding Standards, SQL Documentation, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1110&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Guidelines and Coding Standards Part &#8211; 1</title>
		<link>http://blog.sqlauthority.com/2008/09/23/sql-server-coding-standards-guidelines-part-1/</link>
		<comments>http://blog.sqlauthority.com/2008/09/23/sql-server-coding-standards-guidelines-part-1/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 01:30:30 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Coding Standards]]></category>
		<category><![CDATA[SQL Constraint and Keys]]></category>
		<category><![CDATA[SQL Documentation]]></category>
		<category><![CDATA[SQL Index]]></category>
		<category><![CDATA[SQL Joins]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Stored Procedure]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1107</guid>
		<description><![CDATA[
 Use &#8220;Pascal&#8221; notation for SQL server Objects Like Tables, Views, Stored Procedures. Also tables and views should have ending &#8220;s&#8221;.
Example:
UserDetails
Emails

 If you have big subset of table group than it makes sense to give prefix for this table group. Prefix should be separated by _. 
Example:
Page_ UserDetails
Page_ Emails

 Use following naming convention for Stored [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1107&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><ul class="unIndentedList" style="text-align:justify;">
<li> <strong>Use &#8220;Pascal&#8221; notation for SQL server Objects Like Tables, Views, Stored Procedures. Also tables and views should have ending &#8220;s&#8221;.</strong></li>
<p>Example:</p>
<p>UserDetails</p>
<p>Emails</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> <strong>If you have big subset of table group than it makes sense to give prefix for this table group. Prefix should be separated by _. </strong></li>
<p>Example:</p>
<p>Page_ UserDetails</p>
<p>Page_ Emails</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> <strong>Use following naming convention for Stored Procedure. sp&lt;Application Name&gt;_[&lt;group name &gt;_]&lt;action type&gt;&lt;table name or logical instance&gt; Where action is: Get, Delete, Update, Write, Archive, Insert&#8230; i.e. verb </strong></li>
<p>Example:</p>
<p>spApplicationName_GetUserDetails</p>
<p>spApplicationName_UpdateEmails</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> <strong>Use following Naming pattern for triggers: TR_&lt;TableName&gt;_&lt;action&gt;&lt;description&gt; </strong></li>
<p>Example:</p>
<p>TR_Emails_LogEmailChanges</p>
<p>TR_UserDetails_UpdateUserName</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> <strong>Indexes : IX_&lt;tablename&gt;_&lt;columns separated by_&gt; </strong></li>
<p>Example:</p>
<p>IX_UserDetails_UserID</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> <strong>Primary Key : PK_&lt;tablename&gt; </strong></li>
<p>Example:</p>
<p>PK_UserDetails</p>
<p>PK_ Emails</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> <strong>Foreign Key : FK_&lt;tablename_1&gt;_&lt;tablename_2&gt; </strong></li>
<p>Example:</p>
<p>FK_UserDetails_Emails</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> <strong>Default: DF_&lt;table name&gt;_&lt;column name&gt; </strong></li>
<p>Example:</p>
<p>DF_ UserDetails _UserName</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Normalize Database structure based on <strong>3<sup>rd</sup> Normalization Form</strong>. Normalization is the process of designing a data model to efficiently store data in a database. (<a href="http://blog.sqlauthority.com/2007/11/26/sql-server-rules-of-third-normal-form-and-normalization-advantage-3nf/">Read More Here</a>)</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Avoid use of <strong>SELECT *</strong> in SQL queries. Instead practice writing required <strong>column</strong> names after <strong>SELECT</strong> statement.</li>
<p>Example:</p>
<p><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">Username</span><span style="color:gray;">, </span><span style="color:black;">Password<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">UserDetails</span></code></ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Avoid using temporary tables and derived tables as it uses more disks I/O. Instead use <strong>CTE (Common Table Expression); </strong>its scope is limited to the next statement in SQL query. (<a href="http://blog.sqlauthority.com/2007/06/11/sql-server-2005-t-sql-paging-query-technique-comparison-over-and-row_number-cte-vs-derived-table/">Read More Here</a>)</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Use <strong>SET NOCOUNT ON</strong> at the beginning of SQL Batches, Stored Procedures and Triggers. This improves the performance of Stored Procedure. (<a href="http://blog.sqlauthority.com/2006/11/30/sql-server-cursor-to-process-tables-in-database-with-static-prefix-and-date-created/">Read More Here</a>)</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Properly <strong>format</strong> SQL queries using indents.</li>
<p>Example: <em><strong>Wrong</strong> Format</em></p>
<p><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">Username</span><span style="color:gray;">, </span><span style="color:black;">Password </span><span style="color:blue;">FROM </span><span style="color:black;">UserDetails ud </span><span style="color:blue;">INNER JOIN </span><span style="color:black;">Employee e </span><span style="color:blue;">ON </span><span style="color:black;">e.EmpID </span><span style="color:blue;">= </span><span style="color:black;">ud.UserID</span></code></p>
<p>Example: <em><strong>Correct</strong> Format</em></p>
<p><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">Username</span><span style="color:gray;">, </span><span style="color:black;">Password</span></code><br />
<code style="font-size:12px;"><span style="color:blue;">FROM </span><span style="color:black;">UserDetails ud</span></code><br />
<code style="font-size:12px;"><span style="color:blue;">INNER JOIN </span><span style="color:black;">Employee e </span><span style="color:blue;">ON </span><span style="color:black;">e.EmpID </span><span style="color:blue;">= </span><span style="color:black;">ud.UserID</span></code></ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Practice writing Upper Case for all SQL keywords.</li>
<p>Example:</p>
<p>SELECT, UPDATE, INSERT, WHERE, INNER JOIN, AND, OR, LIKE.</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> There must be <strong>PRIMARY KEY</strong> in all the tables of database with column name ID. It is common practice to use Primary Key as <strong>IDENTITY</strong> column.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> If &#8220;One Table&#8221; references &#8220;Another Table&#8221; than the column name used in reference should use the following rule :</li>
<p><strong>Column of Another Table : &lt;OneTableName&gt; ID</strong></p>
<p>Example:</p>
<p>If User table references Employee table than the column name used in reference should be <strong>UserID</strong> where User is table name and ID primary column of User table and UserID is reference column of Employee table.</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Columns with <strong>Default value</strong> constraint should not allow NULLs.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Practice using <strong>PRIMARY</strong> key in <strong>WHERE</strong> condition of <strong>UPDATE</strong> or <strong>DELETE</strong> statements as this will avoid error possibilities.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Always create stored procedure in <strong>same database</strong> where its relevant table exists otherwise it will reduce network performance.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> <strong>Avoid server-side Cursors</strong> as much as possible, instead use SELECT statement. If you need to use cursor then replace it with WHILE loop (or read next suggestion).</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Instead of using <strong>LOOP</strong> to insert data from Table B to Table A, try to use <strong>SELECT</strong> statement with <strong>INSERT</strong> statement. (<a href="http://blog.sqlauthority.com/2007/08/15/sql-server-insert-data-from-one-table-to-another-table-insert-into-select-select-into-table/">Read More Here</a>)</li>
<p><code style="font-size:12px;"><span style="color:blue;">INSERT INTO TABLE </span><span style="color:black;">A </span><span style="color:gray;">(</span><span style="color:black;">column1</span><span style="color:gray;">, </span><span style="color:black;">column2</span><span style="color:gray;">)</span></code><br />
<code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">column1</span><span style="color:gray;">, </span><span style="color:black;">column2</span></code><br />
<code style="font-size:12px;"><span style="color:blue;">FROM TABLE </span><span style="color:black;">B</span></code><br />
<code style="font-size:12px;"><span style="color:blue;">WHERE </span><span style="color:black;">.... </span></code></ul>
<ul class="unIndentedList" style="text-align:justify;">
<li><strong>Avoid using spaces within the name of database objects</strong>; this may create issues with front-end data access tools and applications. If you need spaces in your database object name then will accessing it surround the database object name with square brackets.</li>
<p>Example:</p>
<p>[Order Details]</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Do not use <strong>reserved words</strong> for naming database objects, as that can lead to some unpredictable situations. (<a href="http://blog.sqlauthority.com/2007/04/09/sql-server-2005-reserved-keywords/">Read More Here</a>)</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> <strong>Practice writing comments</strong> in stored procedures, triggers and SQL batches, whenever something is not very obvious, as it won&#8217;t impact the performance.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Do not use <strong>wild card characters</strong> at the beginning of word while search using LIKE keyword as it results in Index scan.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> <strong>Indent code</strong> for better readability. (<a href="http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/">Example</a>)</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> While using <strong>JOINs</strong> in your SQL query always <strong>prefix column name</strong> with the table name. (<a href="http://blog.sqlauthority.com/2008/08/02/sql-server-effect-of-order-of-join-in-query/">Example</a>). If additionally require then prefix Table name with ServerName, DatabaseName, DatabaseOwner. (<a href="http://blog.sqlauthority.com/2007/06/26/sql-server-explanation-and-example-four-part-name/">Example</a>)</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Default constraint must be defined at the <strong>column level</strong>. All other constraints must be defined at the <strong>table level</strong>. (<a href="http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/">Read More Here</a>)</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Avoid using rules of database objects instead use <strong>constraints</strong>.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Do not use the <strong>RECOMPILE</strong> option for Stored Procedure as it reduces the performance.</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Always put the <strong>DECLARE</strong> statements at the starting of the code in the stored procedure. This will make the query optimizer to reuse query plans. (<a href="http://blog.sqlauthority.com/2007/04/11/sql-server-udf-user-defined-function-to-extract-only-numbers-from-string/">Example</a>)</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Put the <strong>SET</strong> statements in beginning (after DECLARE) before executing code in the stored procedure. (<a href="http://blog.sqlauthority.com/2007/04/11/sql-server-udf-user-defined-function-to-extract-only-numbers-from-string/">Example</a>)</li>
</ul>
<ul class="unIndentedList" style="text-align:justify;">
<li> Use <strong>BEGIN&#8230;END</strong> blocks only when multiple statements are present within a conditional code segment. (<a href="http://blog.sqlauthority.com/2007/11/28/sql-server-correct-syntax-for-stored-procedure-sp/">Read More Here</a>)</li>
</ul>
<p style="text-align:justify;">© Copyright 2000-2008<a title="Pinal Dave" href="http://www.pinaldave.com/"> Pinal Dave.</a> All Rights Reserved. <a href="http://blog.sqlauthority.com/">SQLAuthority.com</a></p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Best Practices, Database, Pinal Dave, Software Development, SQL, SQL Authority, SQL Coding Standards, SQL Constraint and Keys, SQL Documentation, SQL Index, SQL Joins, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1107&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/09/23/sql-server-coding-standards-guidelines-part-1/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; 2008 &#8211; Fix Connection Error with Visual Studio 2008 &#8211; Server Version is not supported</title>
		<link>http://blog.sqlauthority.com/2008/09/21/sql-server-2008-fix-connection-error-with-visual-studio-2008-server-version-is-not-supported/</link>
		<comments>http://blog.sqlauthority.com/2008/09/21/sql-server-2008-fix-connection-error-with-visual-studio-2008-server-version-is-not-supported/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 01:30:14 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Download]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Management Studio]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLAuthority]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL Service Pack]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1153</guid>
		<description><![CDATA[While attending conference SQLAuthority Author Visit &#8211; Microsoft Student Partner Conference, some developers informed me that SQL SERVER 2008 cannot be connected to Visual Studio 2008 and error displays as MS does not support SQL Server version. I was surprised initially as I could not believe that two MS products are not compatible. When trying myself [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1153&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">While attending conference <a href="http://blog.sqlauthority.com/2008/09/03/sqlauthority-author-visit-microsoft-student-partner-conference/" target="_blank">SQLAuthority Author Visit &#8211; Microsoft Student Partner Conference</a>, some developers informed me that SQL SERVER 2008 cannot be connected to Visual Studio 2008 and error displays as MS does not support SQL Server version. I was surprised initially as I could not believe that two MS products are not compatible. When trying myself I got the same error.</p>
<p style="text-align:justify;">SQL Server 2008 when connected to Visual Studio 2008 gives the error that &#8220;<em>This server version is not supported.  Only servers up to Microsoft SQL Server 2005 are supported</em>&#8220;.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/SupportErr2008.gif" alt="" width="500" height="400" /></p>
<p style="text-align:justify;">This error can be easily resolved by just installing Service pack. <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&amp;displaylang=en" target="_blank">Download Visual Studio Service Pack 1 and install</a>. Once service pack installed it will connect just fine.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Database, Pinal Dave, Software Development, SQL, SQL Authority, SQL Download, SQL Error Messages, SQL Query, SQL Server, SQL Server Management Studio, SQL Tips and Tricks, SQLAuthority, T SQL, Technology Tagged: SQL Service Pack <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1153&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/09/21/sql-server-2008-fix-connection-error-with-visual-studio-2008-server-version-is-not-supported/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/blogfolder/SupportErr2008.gif" medium="image" />
	</item>
	</channel>
</rss>