<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;C0QARng8fCp7ImA9WhRaFEo.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695</id><updated>2012-02-17T14:35:47.674+05:00</updated><category term="SQL Server Errors" /><category term="SQL Scripts" /><category term="SQL Load Generator" /><category term="SQL SERVER Database Attach and Restore" /><category term="SQL Server Interview Questions" /><category term="SQL Server Data structures" /><category term="TSQL Debugging" /><category term="DB Constraints" /><category term="SQL Server 2011" /><category term="Scripts" /><category term="Performance Tuning" /><title>Database and Sql Server</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://sqltrends.blogspot.com/" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>24</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/sRFCf" /><feedburner:info uri="blogspot/srfcf" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CUICR3c8eSp7ImA9WhdUEU8.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-1309188739213816955</id><published>2011-09-27T16:39:00.000+05:00</published><updated>2011-09-27T16:39:26.971+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-27T16:39:26.971+05:00</app:edited><title>A table with FILESTREAM column(s) must have a non-NULL unique ROWGUID column</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LNmJl2HHbBHUDdH7-U1-tL8fwzI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LNmJl2HHbBHUDdH7-U1-tL8fwzI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LNmJl2HHbBHUDdH7-U1-tL8fwzI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LNmJl2HHbBHUDdH7-U1-tL8fwzI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:OfficeDocumentSettings&gt;
  &lt;o:AllowPNG/&gt;
 &lt;/o:OfficeDocumentSettings&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:TrackMoves/&gt;
  &lt;w:TrackFormatting/&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:DoNotPromoteQF/&gt;
  &lt;w:LidThemeOther&gt;EN-US&lt;/w:LidThemeOther&gt;
  &lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
  &lt;w:LidThemeComplexScript&gt;AR-SA&lt;/w:LidThemeComplexScript&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
   &lt;w:SplitPgBreakAndParaMark/&gt;
   &lt;w:EnableOpenTypeKerning/&gt;
   &lt;w:DontFlipMirrorIndents/&gt;
   &lt;w:OverrideTableStyleHps/&gt;
  &lt;/w:Compatibility&gt;
  &lt;m:mathPr&gt;
   &lt;m:mathFont m:val="Cambria Math"/&gt;
   &lt;m:brkBin m:val="before"/&gt;
   &lt;m:brkBinSub m:val="&amp;#45;-"/&gt;
   &lt;m:smallFrac m:val="off"/&gt;
   &lt;m:dispDef/&gt;
   &lt;m:lMargin m:val="0"/&gt;
   &lt;m:rMargin m:val="0"/&gt;
   &lt;m:defJc m:val="centerGroup"/&gt;
   &lt;m:wrapIndent m:val="1440"/&gt;
   &lt;m:intLim m:val="subSup"/&gt;
   &lt;m:naryLim m:val="undOvr"/&gt;
  &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
  DefSemiHidden="true" DefQFormat="false" DefPriority="99"
  LatentStyleCount="267"&gt;
  &lt;w:LsdException Locked="false" Priority="0" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Normal"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="heading 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 7"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 8"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 9"/&gt;
  &lt;w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/&gt;
  &lt;w:LsdException Locked="false" Priority="10" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Title"/&gt;
  &lt;w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/&gt;
  &lt;w:LsdException Locked="false" Priority="11" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/&gt;
  &lt;w:LsdException Locked="false" Priority="22" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Strong"/&gt;
  &lt;w:LsdException Locked="false" Priority="20" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/&gt;
  &lt;w:LsdException Locked="false" Priority="59" SemiHidden="false"
   UnhideWhenUsed="false" Name="Table Grid"/&gt;
  &lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/&gt;
  &lt;w:LsdException Locked="false" Priority="1" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/&gt;
  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading"/&gt;
  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List"/&gt;
  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid"/&gt;
  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List"/&gt;
  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading"/&gt;
  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List"/&gt;
  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid"/&gt;
  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/&gt;
  &lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/&gt;
  &lt;w:LsdException Locked="false" Priority="34" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/&gt;
  &lt;w:LsdException Locked="false" Priority="29" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Quote"/&gt;
  &lt;w:LsdException Locked="false" Priority="30" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/&gt;
  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="19" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/&gt;
  &lt;w:LsdException Locked="false" Priority="21" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/&gt;
  &lt;w:LsdException Locked="false" Priority="31" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/&gt;
  &lt;w:LsdException Locked="false" Priority="32" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/&gt;
  &lt;w:LsdException Locked="false" Priority="33" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Book Title"/&gt;
  &lt;w:LsdException Locked="false" Priority="37" Name="Bibliography"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin-top:0in;
	mso-para-margin-right:0in;
	mso-para-margin-bottom:10.0pt;
	mso-para-margin-left:0in;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:Arial;
	mso-bidi-theme-font:minor-bidi;}
&lt;/style&gt;
&lt;![endif]--&gt;

I was trying to add a filestream column in one of my existing tables,
initially i thought it would be very easy for me, but when i got the error
"&lt;span style="color: red;"&gt;A table with FILESTREAM column(s) must have a
non-NULL unique ROWGUID column&lt;/span&gt;."&amp;nbsp; i started to look here and
there. Surfed on the net but didn't find a solution.&lt;br /&gt;


Below is the solution which i tried.&lt;br /&gt;


&lt;br /&gt;


Workaround to produce the problem again&lt;br /&gt;


&lt;br /&gt;


&lt;i&gt;CREATE TABLE Employee (&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [emp_id] [int] IDENTITY(1,1) NOT NULL,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [emp_name] [nvarchar](150) NULL,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [emp_FHname] [nvarchar](150) NULL,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [emp_age] [int] NULL,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [emp_sex] [bit] NULL,&lt;br /&gt;
&amp;nbsp;CONSTRAINT [PK_Employee_1] PRIMARY KEY CLUSTERED &lt;br /&gt;
(&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [emp_id] ASC&lt;br /&gt;
)&lt;br /&gt;
) ON [PRIMARY]&lt;br /&gt;
&lt;br /&gt;
GO&lt;/i&gt;&lt;br /&gt;


emp_id is defined as IDENTITY and Primary key&lt;br /&gt;


&lt;br /&gt;


now i wants to add a filestream enabled column named "emp_pic" to
store employee pictures, and the table doesn't have any ROWGUIDCOL so i added a
empid&lt;br /&gt;


&lt;br /&gt;


&lt;i&gt;ALTER TABLE Employee ADD&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; empid UNIQUEIDENTIFIER DEFAULT (newid()) ROWGUIDCOL NOT NULL&lt;/i&gt;&lt;br /&gt;


&lt;br /&gt;


After this i executed this statement&lt;br /&gt;


&lt;br /&gt;


&lt;i&gt;ALTER TABLE Employee ADD&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; emp_pic [varbinary](max) FILESTREAM &lt;br /&gt;
&amp;nbsp;&lt;/i&gt;&lt;br /&gt;


it will give you the error &amp;nbsp;Msg 5505, Level 16, State 1, Line 1&lt;br /&gt;
&lt;span style="color: red;"&gt;A table with FILESTREAM column(s) must have a non-NULL
unique ROWGUID column&lt;/span&gt;.&lt;br /&gt;


&lt;br /&gt;


To solve this problem i just changed my primary key column to&amp;nbsp;empid
that i added later as ROWGUIDCOL&lt;br /&gt;


After changing the primary key, execute the statement&lt;br /&gt;


&lt;br /&gt;


&lt;i&gt;ALTER TABLE Employee ADD&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; emp_pic [varbinary](max) FILESTREAM &lt;/i&gt;&lt;br /&gt;


It will be executed successfully&lt;br /&gt;


&lt;br /&gt;


&lt;br /&gt;


&lt;br /&gt;


&lt;br /&gt;


&lt;br /&gt;


&lt;br /&gt;


&lt;br /&gt;


&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-1309188739213816955?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/3jc3-Zh87hs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/1309188739213816955/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2011/09/table-with-filestream-columns-must-have.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/1309188739213816955?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/1309188739213816955?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/3jc3-Zh87hs/table-with-filestream-columns-must-have.html" title="A table with FILESTREAM column(s) must have a non-NULL unique ROWGUID column" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2011/09/table-with-filestream-columns-must-have.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08GRXs6fCp7ImA9WhZRFU8.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-7759220464959528651</id><published>2011-04-11T16:34:00.001+05:00</published><updated>2011-04-11T16:37:04.514+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-11T16:37:04.514+05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL Scripts" /><title>An easy way to get the Definition of an Object</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PYJWyYjFH31zr-OWUGPBSSi73v8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PYJWyYjFH31zr-OWUGPBSSi73v8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PYJWyYjFH31zr-OWUGPBSSi73v8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PYJWyYjFH31zr-OWUGPBSSi73v8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;I was using the sp_helptext very frequently to get the definition of an object.&lt;br /&gt;
&lt;br /&gt;
Here is another easy way to get the definition of an object &lt;br /&gt;
&lt;br /&gt;
SELECT OBJECT_DEFINITION(object_id) FROM sys.objects WHERE type='V'&lt;br /&gt;
&lt;br /&gt;
You can use the, ALTER in the result set of the above query by using the REPLACE.  &lt;br /&gt;
&lt;br /&gt;
In the where condition you can specify the Procedure(P) or Functions(FN) as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-7759220464959528651?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/_dtXrVIflCo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/7759220464959528651/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2011/04/easy-way-to-get-definition-of-object.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/7759220464959528651?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/7759220464959528651?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/_dtXrVIflCo/easy-way-to-get-definition-of-object.html" title="An easy way to get the Definition of an Object" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2011/04/easy-way-to-get-definition-of-object.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcAQXY5eyp7ImA9WhZSGEQ.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-621473508126429201</id><published>2011-04-04T11:04:00.000+05:00</published><updated>2011-04-04T11:04:00.823+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-04T11:04:00.823+05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Performance Tuning" /><title>Difference between NEWSEQUENTIALID() and NEWID()</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7_0fzkTHjY2F9xIDV5SGq-6o3lA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7_0fzkTHjY2F9xIDV5SGq-6o3lA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7_0fzkTHjY2F9xIDV5SGq-6o3lA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7_0fzkTHjY2F9xIDV5SGq-6o3lA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;In this article, we will be looking at the Difference between NEWSEQUENTIALID() and NEWID() and How NEWSEQUENTIALID() is generated.&lt;br /&gt;
&lt;br /&gt;
NEWSEQUENTIALID() generates the unique identifier values sequentially.&lt;br /&gt;
Whereas NEWID() generates the unique identifier values randomly.&lt;br /&gt;
&lt;br /&gt;
NEWSEQUENTIALID() function creates the GUIDs greater than the previously generated GUIDs, since the last restart of the system, because after restarting the system the next NEWSEQUENTIALID can be started from the lower range.&lt;br /&gt;
Both NEWID() and NEWSEQUENTIALID() are globally unique. Starting of NEWSEQUENTIALID after the restart of the computer does not affect its globally uniqueness.&lt;br /&gt;
&lt;br /&gt;
NEWSEQUENTIALID() uses the default constraint, and it can't be used in SELECT or SET queries like NEWID().&lt;br /&gt;
The following query  SELECT NEWSEQUENTIALID() will generate error &lt;br /&gt;
&lt;br /&gt;
The newsequentialid() built-in function can only be used in a DEFAULT expression for a column of type 'uniqueidentifier' in a CREATE TABLE or ALTER TABLE statement. It cannot be combined with other operators to form a complex scalar expression.&lt;br /&gt;
&lt;br /&gt;
This will also generate the similar error&lt;br /&gt;
&lt;br /&gt;
declare @varunique UNIQUEIDENTIFIER&lt;br /&gt;
SET @varunique=NEWSEQUENTIALID()&lt;br /&gt;
SELECT @varunique&lt;br /&gt;
&lt;br /&gt;
Msg 302, Level 16, State 0, Line 3&lt;br /&gt;
The newsequentialid() built-in function can only be used in a DEFAULT expression for a column of type 'uniqueidentifier' in a CREATE TABLE or ALTER TABLE statement. It cannot be combined with other operators to form a complex scalar expression.&lt;br /&gt;
&lt;br /&gt;
while if you use &lt;br /&gt;
SELECT NEWID()&lt;br /&gt;
OR &lt;br /&gt;
declare @varunique UNIQUEIDENTIFIER&lt;br /&gt;
SET @varunique=NEWSEQUENTIALID()&lt;br /&gt;
SELECT @varunique&lt;br /&gt;
&lt;br /&gt;
No error will be produced and guid will be returned.&lt;br /&gt;
&lt;br /&gt;
NEWID() is not good for performance because it is generated randomly so that it increases the page splits in the indexes.&lt;br /&gt;
NEWSEQUENTIALID() can be used to generate GUIDs to reduce page contention at the leaf level of indexes.&lt;br /&gt;
&lt;br /&gt;
Each GUID generated by using NEWSEQUENTIALID() is unique on that computer. &lt;br /&gt;
GUIDs generated by using NEWSEQUENTIALID() are unique across multiple computers only if the source computer has a network card.&lt;br /&gt;
NEWSEQUENTIALID() returns the value that includes the MAC of the NIC of the system. If the system has the network card, then it is guaranteed that the GUID generated using NEWSEQUENTIALID() will globally unique across the servers.&lt;br /&gt;
If the NEWSEQUENTIALID() used on a computer that doesn't have NIC, the values generated using NEWSEQUENTIALID() are not guaranteed to be unique across the servers, it will be unique only for that  system.&lt;br /&gt;
Internally NEWSEQUENTIALID() usses a Windows API called UuidCreateSequential(), which generates the value based on the NIC's MAC address and an internal hardware timestamp.&lt;br /&gt;
&lt;br /&gt;
Here you can see the &lt;a href="http://blogs.msdn.com/b/sqlprogrammability/archive/2006/03/23/559061.aspx"&gt;Newsequentialid (Histrory/Benefits and Implementation)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-621473508126429201?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/ST9rafy09XE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/621473508126429201/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2011/04/difference-between-newsequentialid-and.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/621473508126429201?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/621473508126429201?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/ST9rafy09XE/difference-between-newsequentialid-and.html" title="Difference between NEWSEQUENTIALID() and NEWID()" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2011/04/difference-between-newsequentialid-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8CSXg-fCp7ImA9WhZTF0U.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-6400987775315852681</id><published>2011-03-22T13:30:00.001+05:00</published><updated>2011-03-22T13:34:28.654+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-22T13:34:28.654+05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL Scripts" /><title>Find Created date and Modified date of Database objects</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/bQ0jTvPaSHh36Mvdi53_ySh2CiY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bQ0jTvPaSHh36Mvdi53_ySh2CiY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/bQ0jTvPaSHh36Mvdi53_ySh2CiY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bQ0jTvPaSHh36Mvdi53_ySh2CiY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;This script will return the objects in sql server database with modified and created date.&lt;br /&gt;
However you can change the order by clause as well as the Where clause according to your requirements&lt;br /&gt;
&lt;br /&gt;
SELECT  sys.schemas.name + '.' + sys.objects.name,&lt;br /&gt;
create_date,&lt;br /&gt;
modify_date&lt;br /&gt;
FROM    sys.objects&lt;br /&gt;
INNER JOIN sys.schemas ON sys.objects.schema_id = sys.schemas.schema_id&lt;br /&gt;
WHERE   type = 'P'&lt;br /&gt;
OR type = 'U'&lt;br /&gt;
OR type = 'FN'&lt;br /&gt;
OR type = 'V'&lt;br /&gt;
ORDER BY modify_date DESC&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-6400987775315852681?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/zOzwbVz-xIw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/6400987775315852681/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2011/03/find-created-date-and-modified-date-of.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/6400987775315852681?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/6400987775315852681?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/zOzwbVz-xIw/find-created-date-and-modified-date-of.html" title="Find Created date and Modified date of Database objects" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2011/03/find-created-date-and-modified-date-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYCSXczfCp7ImA9WhZTFEk.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-1836647060873643654</id><published>2011-03-10T11:26:00.001+05:00</published><updated>2011-03-18T15:29:28.984+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-18T15:29:28.984+05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Errors" /><title>The newsequentialid() built-in function can only be used in a DEFAULT expression</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ErUQFggl1YG1mkMy8Prr9ZzBwdg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ErUQFggl1YG1mkMy8Prr9ZzBwdg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ErUQFggl1YG1mkMy8Prr9ZzBwdg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ErUQFggl1YG1mkMy8Prr9ZzBwdg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;font color="red"&gt;Msg 302, Level 16, State 0, Line 3&lt;br /&gt;
The newsequentialid() built-in function can only be used in a DEFAULT expression for a column of type 'uniqueidentifier' in a CREATE TABLE or ALTER TABLE statement. It cannot be combined with other operators to form a complex scalar expression.&lt;br /&gt;
&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
This error occurs when we try to use the NEWSEQUENTIALID() function in the SQL statements or in SET statements. e.g.&lt;br /&gt;
&lt;br /&gt;
SELECT NEWSEQUENTIALID()&lt;br /&gt;
OR&lt;br /&gt;
declare @varunique UNIQUEIDENTIFIER&lt;br /&gt;
SET @varunique=NEWSEQUENTIALID()&lt;br /&gt;
SELECT @varunique&lt;br /&gt;
OR&lt;br /&gt;
INSERT INTO AA(id, name) VALUES(NEWSEQUENTIALID(),'abc')&lt;br /&gt;
&lt;br /&gt;
The NEWSEQUENTIALID() built-in function can only be used in a DEFAULT expression for a column of type 'uniqueidentifier' in a CREATE TABLE or ALTER TABLE statement. It cannot be combined with other operators to form a complex scalar expression.&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "ca-pub-0121601616541261";
/* BTW POST */
google_ad_slot = "4067150745";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-1836647060873643654?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/8KGJ2Kh2GJ0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/1836647060873643654/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2011/03/newsequentialid-built-in-function-can.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/1836647060873643654?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/1836647060873643654?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/8KGJ2Kh2GJ0/newsequentialid-built-in-function-can.html" title="The newsequentialid() built-in function can only be used in a DEFAULT expression" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2011/03/newsequentialid-built-in-function-can.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MDRX8-eyp7ImA9Wx9aFEQ.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-2938323729700103129</id><published>2011-03-07T17:00:00.006+05:00</published><updated>2011-03-07T17:04:34.153+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-07T17:04:34.153+05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Interview Questions" /><title>SQL Server Interview Questions (Part 2)</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/U44MGjRuK7fPOn0E7xO1VtLNaO4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/U44MGjRuK7fPOn0E7xO1VtLNaO4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/U44MGjRuK7fPOn0E7xO1VtLNaO4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/U44MGjRuK7fPOn0E7xO1VtLNaO4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Few days back, i went for an interview , following questions were asked&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;How to Performance Tune a Stored Procedure?&lt;/li&gt;
&lt;li&gt;Type of Triggers?&lt;/li&gt;
&lt;li&gt;How to get the old value of a field from a trigger when updating a table?&lt;/li&gt;
&lt;li&gt;What is the difference between horizontal partition and vertical partition?&lt;/li&gt;
&lt;li&gt;if we have three parameters in the where condition (query has the joins with two or more tables table1.filed1=4 and table2.field2=5 and table3.field3=1)&lt;br /&gt;
what will be the Order of execution of the where condition&lt;br /&gt;
Which condition would be executed first i.e. field1 or field2 or field3?&lt;/li&gt;
&lt;li&gt;What are the disadvantages of the cursors?&lt;/li&gt;
&lt;li&gt;A stored procedure has cursors in it, how we can eliminate the cursors?&lt;/li&gt;
&lt;li&gt;What is the difference between temporary table and table variable?&lt;/li&gt;
&lt;li&gt;How to restore the Differential Backup?&lt;/li&gt;
&lt;li&gt;What are Backup Types and difference between them?&lt;/li&gt;
&lt;li&gt;What are Replication Types, What is snapshot replication?&lt;/li&gt;
&lt;li&gt;What is the difference between Replication and Mirroring?&lt;/li&gt;
&lt;li&gt;Can a sub report in Crystal Reports can have another sub report?&lt;/li&gt;
&lt;li&gt;What is log shipping?&lt;/li&gt;
&lt;li&gt;Should we normalize the Database on more than 3rd Normal form?&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-2938323729700103129?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/h3OyOvbAG3w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/2938323729700103129/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2011/03/sql-server-interview-questions.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/2938323729700103129?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/2938323729700103129?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/h3OyOvbAG3w/sql-server-interview-questions.html" title="SQL Server Interview Questions (Part 2)" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2011/03/sql-server-interview-questions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQNQX49fCp7ImA9Wx9UF0g.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-2225483679026082251</id><published>2011-02-15T12:03:00.000+05:00</published><updated>2011-02-15T12:03:10.064+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-15T12:03:10.064+05:00</app:edited><title>What is Parameter Sniffing, How it can affect the Performance, and What is the Solution</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TPENJCojI5DC2E00WfpdCEFXaT0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TPENJCojI5DC2E00WfpdCEFXaT0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TPENJCojI5DC2E00WfpdCEFXaT0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TPENJCojI5DC2E00WfpdCEFXaT0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;     &lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;What is parameter sniffing?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;How it can affect the performance.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;What is solution of parameter sniffing? &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;Let us try to answer these questions,&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;Whenever a stored procedure is executed for the first time, its execution plan is created. An execution plan for a stored procedure is created the first time a stored procedure is executed. When the SQL SERVER Database engine compiles a stored procedure it looks at the parameters being passed to the stored procedure and then creates an execution plan based on these parameters. The process of looking at parameter values when compiling a stored procedure is called "Parameter sniffing". Sometimes Parameter sniffing can lead to inefficient execution plans, especially when a stored procedure is called with parameter values that have different cardinality.&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Parameter sniffing can be considered a plus to the performance of the system, but in those cases where it's not, various mechanisms can be used to avoid it. One of the simplest is to use local variables. You can also use the OPTIMIZE FOR query hint or the WITH RECOMPILE query hint. In extreme cases you can force specific execution plans onto procedures.&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;We can also say that Parameter sniffing is a process that occurs when executing a stored procedure for the first time that allows SQL Server to build an effective query plan. Normally that is a good thing, but in some cases can actually hurt performance of the query.&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;br /&gt;
&lt;span style="font-size: 12pt; line-height: 115%;"&gt;According to the white paper &lt;/span&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc966425.aspx"&gt;&lt;br /&gt;
&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Batch Compilation, Recompilation, and Plan Caching Issues in SQL Server 2005&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style="font-size: 12pt; line-height: 115%;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Published in the Microsoft Site:&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;"&lt;i&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Parameter sniffing" refers to a process whereby SQL Server's execution environment "sniffs" the current parameter values during compilation or recompilation, and passes it along to the query optimizer so that they can be used to generate potentially faster query execution plans. The word "current" refers to the parameter values present in the statement call that caused a compilation or a recompilation&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;"&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;br /&gt;
&lt;span style="font-size: 12pt; line-height: 115%;"&gt;When a SP is not in the procedure cache, when it is executed the query optimizer needs to compile the SP to create an execution plan. In order to do this the query optimizer needs to look at the parameters that are passed and the body of the SP to determine the best method to go about processing the SP. When the query optimizer looks at the SP's parameters, to help determine how to optimize the execution of the SP, it is known as parameter sniffing.&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;Before I show you with an example about parameter sniffing, you need to know that the query execution plan generated by the SQL Server depends on lot of factors; parameter sniffing is just one of them. So the execution plan I show here might be different from the execution plan that you will generate.&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Let's look at the following code&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;br /&gt;
&lt;span style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;USE&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: 12pt; line-height: 115%;"&gt; AdventureWorks&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;GO&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;
&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;CREATE PROCEDURE&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: 12pt; line-height: 115%;"&gt; &lt;br /&gt;
GetCustOrders&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;(&lt;/span&gt;@FirstCust &lt;span style="color: blue;"&gt;int&lt;/span&gt;&lt;span style="color: blue;"&gt;,&lt;/span&gt; @LastCust &lt;span style="color: blue;"&gt;int&lt;/span&gt;&lt;span style="color: blue;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;AS&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;SELECT&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt; &lt;span style="color: blue;"&gt;*&lt;/span&gt; &lt;span style="color: blue;"&gt;FROM&lt;/span&gt; Sales&lt;span style="color: blue;"&gt;.&lt;/span&gt;SalesOrderHeader&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;WHERE&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt; CustomerID &lt;span style="color: blue;"&gt;between&lt;/span&gt; @FirstCust &lt;span style="color: blue;"&gt;and&lt;/span&gt; @LastCust&lt;span style="color: blue;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;br /&gt;
This procedure GetCustOrders accepts two parameters &lt;span style="font-size: 12pt; line-height: 115%;"&gt;@FirstCust &lt;span style="color: blue;"&gt;int&lt;/span&gt;&lt;span style="color: blue;"&gt;,&lt;/span&gt; @LastCust &lt;span style="color: blue;"&gt;int . &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;These parameters are passed in the where clause of the query to get the customer orders. Now look at the execution plan of the procedure by execution this procedure by passing different parameters.&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;br /&gt;
USE AdventureWorks&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;GO&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;DBCC FREEPROCCACHE&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;EXEC GetCustOrders 1, 1000&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;br /&gt;
I had used the statement &lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;DBCC FREEPROCCACHE &lt;/span&gt;&lt;span style="font-size: 12pt;"&gt;to clear the procedure cache so that query optimizer should make a new plan for this execution instead of using any existing one.&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;div align="center"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TS_HSq1nAWI/AAAAAAAAAFk/C1Zm9iz-wps/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" border="0" height="61" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TS_HSq1nAWI/AAAAAAAAAFk/C1Zm9iz-wps/s400/1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;div align="center"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TS_Hvo4DcUI/AAAAAAAAAFo/UQJCnccDWDw/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" border="0" height="320" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TS_Hvo4DcUI/AAAAAAAAAFo/UQJCnccDWDw/s320/2.png" width="302" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;Look at the &lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;Actual number of Rows 31465 &lt;span style="font-size: 12pt;"&gt;and&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt;"&gt;Estimated number of Rows 31465&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Here you can see that query optimizer performed a Clustered Index scan operation to get the records.&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Now execute &lt;/span&gt;EXEC GetCustOrders 600,610 &lt;span style="font-size: 12pt; line-height: 115%;"&gt;and see the execution plan&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;div align="center"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TS_IGq2TgqI/AAAAAAAAAFs/y7Lmi--Jyfw/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" border="0" height="67" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TS_IGq2TgqI/AAAAAAAAAFs/y7Lmi--Jyfw/s400/3.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;It uses the Clustered index scan for this operation as well, because this plan was present in the procedure cache.&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;div align="center"&gt;&lt;a href="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TTQO9T7eYOI/AAAAAAAAAF4/sOKPdTKcq4g/s1600/3.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" border="0" height="320" src="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TTQO9T7eYOI/AAAAAAAAAF4/sOKPdTKcq4g/s320/3.bmp" width="306" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Check the number of actual rows and estimated rows,&amp;nbsp;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Actual number of Rows 31465&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Estimated number of Rows 31465&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Note the in both cases the actual and estimated number of rows are same.&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Now clear the procedure cache and execute the procedure with smaller values&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;
&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;&lt;br /&gt;
DBCC&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt; FREEPROCCACHE&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;EXEC&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt; GetCustOrders600&lt;span style="color: blue;"&gt;,&lt;/span&gt;610&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;div align="center"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TTQPd7oFLmI/AAAAAAAAAF8/PD2vNjAcYgg/s1600/4.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" border="0" height="80" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TTQPd7oFLmI/AAAAAAAAAF8/PD2vNjAcYgg/s320/4.bmp" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;div align="center"&gt;&lt;a href="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TTQQNTCRslI/AAAAAAAAAGA/6aoWaU_ogPY/s1600/5.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" border="0" height="320" src="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TTQQNTCRslI/AAAAAAAAAGA/6aoWaU_ogPY/s320/5.bmp" width="199" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Exmaince the actual number of rows and estimated number of rows, they are different now, because optimizer created a new plane for this&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;div&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Query optimizer performed the seek operation. This means that by passing the smaller range of values , you can get the Index Seek operation, depending on your execution.&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;If you execute the procedure with smaller values first and then execute the procedure with larger values. Then you can get Index seek for both of the executions.&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;The first compile of the Procedure generates the execution plan depending on the the parameters passed to the procedure and that plan is kept in the procedure cache for use of future executions of that procedure.&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;How to eliminate parameter sniffing?&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt;"&gt;&lt;br /&gt;
There are three methods to avoid parameter sniffing,&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;By using local variables in the procedure&lt;/li&gt;
&lt;li&gt;By using RECOMPILE Query Hint&lt;/li&gt;
&lt;li&gt;Query hint OPTIMIZE FOR&lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt;    &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;b&gt;&lt;br /&gt;
By using Local variables&lt;/b&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt;"&gt;Parameter sniffing can be disabled by using the local variables in the stored procedure&lt;/span&gt;.&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;br /&gt;
&lt;br /&gt;
CREATE PROCEDURE GetCustOrders (@FirstCustint, @LastCustint) &lt;/td&gt;    &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;br /&gt;
&lt;span style="font-size: 12pt; line-height: 115%;"&gt;AS&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;br /&gt;
DECLARE @FC int/td&amp;gt;   &lt;/td&gt;&lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;DECLARE @LC int&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;SET @FC = @FirstCust&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;SET @LC = @LastCust&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;SELECT * FROM Sales.SalesOrderHeader&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;WHERE CustomerID BETWEEN @FC AND @LC&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;br /&gt;
You can create two local variables @FC AND @LC that takes the values from parameters of the stored procedure and then pass those values to the query. In this way the actual values of the parameters are no longer contained in the BETWEEN clause in the SELECT statement, instead only those local variables are present.&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;This method of removing the parameter sniffing problem doesn’t mean you will get a best plan for each execution of the SP&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;b&gt;&lt;br /&gt;
&lt;span style="font-size: 12pt; line-height: 115%;"&gt;By using Recompile&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;Creating a stored procedure that specifies the WITH RECOMPILE option in its definition indicates that SQL Server does not cache a plan for this stored procedure; the stored procedure is recompiled each time it is executed. Use the WITH RECOMPILE option when stored procedures take parameters whose values differ widely between executions of the stored procedure&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;USE&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;AdventureWorks&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;br /&gt;
&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;GO&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;br /&gt;
CREATE PROCEDURE GetCustOrders(@FirstCust int,@LastCust int)&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;WITH RECOMPILE &lt;o:p&gt;&lt;/o:p&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;AS&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;SELECT&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;*&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;FROM&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;Sales&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;.&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;SalesOrderHeader&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;WHERE&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;CustomerID&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;between&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;@FirstCust&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;and&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;@LastCust &lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;b&gt;&lt;br /&gt;
&lt;span style="font-size: 12pt;"&gt;By using Optimize For&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt;"&gt;Instructs the query optimizer to use statistical data instead of the initial values for all local variables when the query is compiled and optimized, including parameters created with forced parameterization&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;CREATE PROCEDURE&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;GetCustOrders&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;(&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;@FirstCust&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;int&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;,&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;@LastCust&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;int&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;)&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;WITH RECOMPILE&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;AS&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;SELECT&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;*&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;FROM&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;Sales&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;.&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;SalesOrderHeader&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;WHERE&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;CustomerID&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt; between &lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;@FirstCust&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;and &lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;@LastCust&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   
&lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;OPTION &lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;(&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;OPTIMIZE&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt; FOR &lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;(&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;@FirstCust UNKNOWN&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;,&lt;/span&gt;&lt;span style="color: teal; font-size: 12pt; line-height: 115%;"&gt;@LastCust UNKNOWN&lt;/span&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;));&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;   
&lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="color: blue; font-size: 12pt; line-height: 115%;"&gt;go&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;span style="font-size: 12pt;"&gt;You can read more about &lt;a href="http://msdn.microsoft.com/en-us/library/ms181714.aspx"&gt;Query Hints &lt;/a&gt;from msdn&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;tr&gt;     &lt;td&gt;&lt;/td&gt;   &lt;/tr&gt;


&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-2225483679026082251?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/8s6HGop1lRc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/2225483679026082251/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2011/02/what-is-parameter-sniffing-how-it-can.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/2225483679026082251?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/2225483679026082251?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/8s6HGop1lRc/what-is-parameter-sniffing-how-it-can.html" title="What is Parameter Sniffing, How it can affect the Performance, and What is the Solution" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TS_HSq1nAWI/AAAAAAAAAFk/C1Zm9iz-wps/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2011/02/what-is-parameter-sniffing-how-it-can.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUCR3Y8fCp7ImA9Wx9UEUg.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-3952583514717840453</id><published>2011-02-08T14:27:00.000+05:00</published><updated>2011-02-08T14:27:46.874+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-08T14:27:46.874+05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL Load Generator" /><title>SQL Load Generator</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tm7-aSGwpYbp7-CXJBUAhg2N8i4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tm7-aSGwpYbp7-CXJBUAhg2N8i4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tm7-aSGwpYbp7-CXJBUAhg2N8i4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tm7-aSGwpYbp7-CXJBUAhg2N8i4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;A really nice tool for Load testing on SQL Server. SQL Load Generator is used to generate a load simulating several different users. It is is used to run multiple concurrent queries against SQL Server. The user can choose the number of concurrent queries to run, provide different queries, choose SQL or domain accounts, and provide application name settings.&lt;br /&gt;
&lt;br /&gt;
read more or if you want to download SQL Load Generator you need to go on codeplex &lt;a href="http://sqlloadgenerator.codeplex.com/"&gt;SQL Load Generator&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-3952583514717840453?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/muqu8_CB6mk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/3952583514717840453/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2011/02/sql-load-generator.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/3952583514717840453?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/3952583514717840453?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/muqu8_CB6mk/sql-load-generator.html" title="SQL Load Generator" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2011/02/sql-load-generator.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08HQ3g7fyp7ImA9Wx9UEEs.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-4337540758898318644</id><published>2011-02-07T13:03:00.000+05:00</published><updated>2011-02-07T13:03:52.607+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-07T13:03:52.607+05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TSQL Debugging" /><title>Unable to start T-SQL Debugging. Could not attach to SQL Server Process</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/UqfkqyrMRV0y3lMq3b_yGiQJQfQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UqfkqyrMRV0y3lMq3b_yGiQJQfQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/UqfkqyrMRV0y3lMq3b_yGiQJQfQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UqfkqyrMRV0y3lMq3b_yGiQJQfQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;How to Enable TSQL Debugging in SQL SERVER ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the menu Debug &gt;&gt; Start Debugging&lt;br /&gt;
An error will be produced &lt;b&gt; &lt;font color="red"&gt; "Unable to start T-SQL Debugging. Could not attach to SQL Server Process" &lt;/font&gt; &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TUvb-T7w9MI/AAAAAAAAAGM/bDe1zKKUF5w/s1600/1.bmp" imageanchor="1" style=""&gt;&lt;img border="0" height="61" width="320" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TUvb-T7w9MI/AAAAAAAAAGM/bDe1zKKUF5w/s320/1.bmp" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Here is the solution to get rid of this error&lt;br /&gt;
&lt;br /&gt;
Expand the SQL Sever Management Studio&lt;br /&gt;
Expand the Security&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TUvdvb2SEJI/AAAAAAAAAGU/oeEc_fuQJ_8/s1600/2.bmp" imageanchor="1" style=""&gt;&lt;img border="0" height="195" width="271" src="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TUvdvb2SEJI/AAAAAAAAAGU/oeEc_fuQJ_8/s320/2.bmp" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Right Click on the Logins&lt;br /&gt;
Click on New Login&lt;br /&gt;
A new window will appear to define the Login&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TUveU70WB4I/AAAAAAAAAGc/cA6nfbneHX4/s1600/3.bmp" imageanchor="1" style=""&gt;&lt;img border="0" height="287" width="320" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TUveU70WB4I/AAAAAAAAAGc/cA6nfbneHX4/s320/3.bmp" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Specify the Login Name.&lt;br /&gt;
Specify the Server roles.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TUvfbZAa9eI/AAAAAAAAAGk/9uexrVJ8xZM/s1600/4.bmp" imageanchor="1" style=""&gt;&lt;img border="0" height="287" width="320" src="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TUvfbZAa9eI/AAAAAAAAAGk/9uexrVJ8xZM/s320/4.bmp" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Check the sysadmin Server role and then press OK.&lt;br /&gt;
Now Debug your Query /SP  Debug &gt;&gt; Start Debugging&lt;br /&gt;
&lt;br /&gt;
This can also be done using TSQL.&lt;br /&gt;
Here is the Way to do this using TSQL&lt;br /&gt;
&lt;br /&gt;
sp_addsrvrolemember 'Domain\Name', 'sysadmin'&lt;br /&gt;
GO&lt;br /&gt;
&lt;br /&gt;
EXEC master..sp_addsrvrolemember @loginame = N'Dmain-Name\Administrator', @rolename = N'sysadmin'&lt;br /&gt;
GO&lt;br /&gt;
&lt;br /&gt;
if you are not using any domain, then try your system name.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-4337540758898318644?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/bmvKUSLnPw8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/4337540758898318644/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2011/02/unable-to-start-t-sql-debugging-could.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/4337540758898318644?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/4337540758898318644?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/bmvKUSLnPw8/unable-to-start-t-sql-debugging-could.html" title="Unable to start T-SQL Debugging. Could not attach to SQL Server Process" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TUvb-T7w9MI/AAAAAAAAAGM/bDe1zKKUF5w/s72-c/1.bmp" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2011/02/unable-to-start-t-sql-debugging-could.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEERXY9fyp7ImA9Wx9XEk8.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-4087918688145399076</id><published>2011-01-05T15:47:00.001+05:00</published><updated>2011-01-05T15:50:04.867+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-05T15:50:04.867+05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Performance Tuning" /><title>SQL Server Performance Killers</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gbV2JQszVYdX3BSCYKoUHqVYUrk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gbV2JQszVYdX3BSCYKoUHqVYUrk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gbV2JQszVYdX3BSCYKoUHqVYUrk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gbV2JQszVYdX3BSCYKoUHqVYUrk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;There might be several individual factors that can kill the performance of your database. If you aware of the main performance killers in SQL Server in advance, you will be able to focus your tuning efforts on the likely causes.&lt;br /&gt;
You also need to look the hardware, operating and SQL Server settings&lt;br /&gt;
The main performance killers in SQL SERVER performance are as follows&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Poor Indexing&lt;/li&gt;
&lt;li&gt;Inaccurate statistics&lt;/li&gt;
&lt;li&gt;Excessive blocking and deadlocks&lt;/li&gt;
&lt;li&gt;No-set-based operations, usually T-SQL cursors&lt;/li&gt;
&lt;li&gt;Non set-based thinking leads to excessive use of cursors and loops rather than exploring more efficient joins and sub-queries. SQL has rich mechanism to get the data instead of trying to loop or row by row approach to be used in the code, this will kill the performance&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Poor query design&lt;/li&gt;
&lt;li&gt;Querying the data from a table that is not required, or using a table in joins that is not required.&lt;/li&gt;
&lt;li&gt;Poor database design&lt;/li&gt;
&lt;li&gt;No reusable execution plans&lt;/li&gt;
&lt;li&gt;Poor execution plans, usually caused by parameter sniffing&lt;/li&gt;
&lt;li&gt;Frequent recompilation of execution plans&lt;/li&gt;
&lt;li&gt;Improper use of cursors&lt;/li&gt;
&lt;li&gt;Always use set based tsql query. By using cursors, you add a large amount of overhead on SQL SERRVER.&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;But if you are forced to use cursors, try to use the efficient cursor types such as fast-forward only.&lt;/li&gt;
&lt;li&gt;Remember cursors are called the performance killers.&lt;/li&gt;
&lt;li&gt;Improper configuration of database log&lt;/li&gt;
&lt;li&gt;Excessive use or improper use configuration of tempdb&lt;/li&gt;
&lt;li&gt;Every SQL Server instance has only one tempdb, which is used to store the information such as operations involving temporary tables, table variables, also operations such as sorts and row versioning, tempdb can become a bottleneck.&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-4087918688145399076?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/Pr-_RUB6fPI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/4087918688145399076/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2011/01/sql-server-performance-killers.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/4087918688145399076?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/4087918688145399076?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/Pr-_RUB6fPI/sql-server-performance-killers.html" title="SQL Server Performance Killers" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2011/01/sql-server-performance-killers.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UEQXo8eyp7ImA9Wx9RF04.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-7965328926870238032</id><published>2010-12-19T10:06:00.000+05:00</published><updated>2010-12-19T10:06:40.473+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-19T10:06:40.473+05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Database Attach and Restore" /><title>How to Attach Database in SQL SERVER</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5SjIbl_SRtPWCEKKPn3fjQXf5C0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5SjIbl_SRtPWCEKKPn3fjQXf5C0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5SjIbl_SRtPWCEKKPn3fjQXf5C0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5SjIbl_SRtPWCEKKPn3fjQXf5C0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;This is a step by step walkthrough to attach the Database in SQL SERRVER, if you have data file (.mdf) only and you don’t have log file (.ldf)&lt;br /&gt;
I had tried to simplify the steps with the help of screen shots&lt;br /&gt;
&lt;br&gt;Connect to your SQL SERVER enterprise manager, in my case I have connected to SQL SERVER 2011 “Denali”&lt;br /&gt;
Right click on the Databases, a menu will appear, &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQ2RAZ7p1AI/AAAAAAAAAEw/XjriayvyYIk/s1600/1.png" imageanchor="1" style=""&gt;&lt;img border="0" height="295" width="320" src="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQ2RAZ7p1AI/AAAAAAAAAEw/XjriayvyYIk/s320/1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Click on Attach, a form Attach Databases will appear &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TQ2Rba0EJEI/AAAAAAAAAE4/1MkclQkszzw/s1600/2.png" imageanchor="1" style=""&gt;&lt;img border="0" height="287" width="320" src="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TQ2Rba0EJEI/AAAAAAAAAE4/1MkclQkszzw/s320/2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Click on the Add button, file open dialog will appear to select the required file.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQ2RpRghHdI/AAAAAAAAAFA/Uu-yZbBdV7I/s1600/3.png" imageanchor="1" style=""&gt;&lt;img border="0" height="320" width="229" src="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQ2RpRghHdI/AAAAAAAAAFA/Uu-yZbBdV7I/s320/3.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Locate your desired data file (.mdf) from your system, and then select that file and then click OK&lt;br /&gt;
You will be back again on the Attach Databases dialog, showing the file you have selected. I have selected the AdventureWorks data file.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TQ2R3T2MvEI/AAAAAAAAAFI/vlW-6dFtcAc/s1600/4.png" imageanchor="1" style=""&gt;&lt;img border="0" height="287" width="320" src="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TQ2R3T2MvEI/AAAAAAAAAFI/vlW-6dFtcAc/s320/4.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
You can see the row, I highlighted, this is because, I am going to attach the data file with the log file. If you have the log file, then you wouldn’t the message “Not Found”&lt;br /&gt;
You can see that currently Remove button is disabled, click on the Row showing the log file&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQ2SIiLdMbI/AAAAAAAAAFQ/3FQNQYljCGY/s1600/5.png" imageanchor="1" style=""&gt;&lt;img border="0" height="287" width="320" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQ2SIiLdMbI/AAAAAAAAAFQ/3FQNQYljCGY/s320/5.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
After clicking the Row, Remove button will be enabled, and then click on the Remove button&lt;br /&gt;
The Row containing the log file will be removed. If you don’t remove the row containing the log file, the Database wouldn’t be attached, and it will give the error “An error occurred while attaching the Database”.&lt;br /&gt;
Click on OK button, the database will be attached successfully.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-7965328926870238032?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/_3F3qJESrBQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/7965328926870238032/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2010/12/how-to-attach-database-in-sql-server.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/7965328926870238032?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/7965328926870238032?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/_3F3qJESrBQ/how-to-attach-database-in-sql-server.html" title="How to Attach Database in SQL SERVER" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQ2RAZ7p1AI/AAAAAAAAAEw/XjriayvyYIk/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2010/12/how-to-attach-database-in-sql-server.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8DQnc9eip7ImA9Wx9RFUg.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-4313793695677349333</id><published>2010-12-17T07:59:00.001+05:00</published><updated>2010-12-17T08:01:13.962+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-17T08:01:13.962+05:00</app:edited><title>Sample Database for SQL Server 2011 Denali CTP1</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/SwykhSchKKscGvzE0LIHUXdsAks/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SwykhSchKKscGvzE0LIHUXdsAks/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/SwykhSchKKscGvzE0LIHUXdsAks/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SwykhSchKKscGvzE0LIHUXdsAks/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Sample Database AdventureWorks for SQL Server Denali CTP1 can be downloaded from &lt;a href="http://msftdbprodsamples.codeplex.com/releases/view/55330"&gt;AdventureWorks Database&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
This database was used with SQL SERVER 2008R2 and now with 2011 as well&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-4313793695677349333?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/UytC1NyflXs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/4313793695677349333/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2010/12/sample-database-for-sql-server-2011.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/4313793695677349333?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/4313793695677349333?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/UytC1NyflXs/sample-database-for-sql-server-2011.html" title="Sample Database for SQL Server 2011 Denali CTP1" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2010/12/sample-database-for-sql-server-2011.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYHRXY4cCp7ImA9Wx9REks.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-9003480793804917639</id><published>2010-12-13T22:54:00.005+05:00</published><updated>2010-12-13T22:58:54.838+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-13T22:58:54.838+05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2011" /><title>How to Install SQL SERVER 2011</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/iKz6j2XYeGcnd7dVniKcuSNdhMY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iKz6j2XYeGcnd7dVniKcuSNdhMY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/iKz6j2XYeGcnd7dVniKcuSNdhMY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iKz6j2XYeGcnd7dVniKcuSNdhMY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;This is step by step Walkthrough installation guide with images for SQL SERVER 2011&lt;br /&gt;
The installation of SQL SERVER 2011 is very much similar to SQL SERVER 2008, If you have  already installed SQL SERVER 2008, You might not face any problem.&lt;br /&gt;
&lt;br /&gt;
Microsoft has launched &lt;b&gt;SQL SERVER 2011&lt;/b&gt; "Denali"; I have downloaded MICROSOFT SQL SERVER "Denali" from &lt;br /&gt;
&lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6a04f16f-f6be-4f92-9c92-f7e5677d91f9&amp;displaylang=en"&gt;&lt;br /&gt;
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6a04f16f-f6be-4f92-9c92-f7e5677d91f9&amp;displaylang=en&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I hope SQL Server database professionals like administrators and t-sql developers find my SQL SERVER 2011 setup notes useful.&lt;br /&gt;
The Operating System requirements for Microsoft SQL Server 2011 "Denali" are &lt;br /&gt;
Windows Vista with SP2,&lt;br /&gt;
Windows Server 2008 with SP2,&lt;br /&gt;
Windows 2008 R2, and&lt;br /&gt;
Windows 7 operating systems.&lt;br /&gt;
What is interesting related with the supported operating systems list is Windows XP is not supported any more.&lt;br /&gt;
Although I have successfully installed MS SQL Server 2008 R2 Developer Edition on my Windows XP PC, SQL Server 2011 Denali CTP1 cannot be installed.&lt;br /&gt;
Here is a short list which you can review: &lt;br /&gt;
Windows PowerShell 2.0&lt;br /&gt;
Microsoft .NET Framework 3.5 SP1&lt;br /&gt;
Microsoft .NET Framework 4.0&lt;br /&gt;
Please note that these requirements for SQL Server Denali CTP may change with the new releases of Microsoft SQL Server 2011 and SQL Server Setup Application wizard.&lt;br /&gt;
Hardware and software requirements can also be seen from &lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/ms143506%28SQL.110%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms143506%28SQL.110%29.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This is the step by step installation guide of the SQL SERVER 2011 “Denali” on windows 7&lt;br /&gt;
I have installed x86 version of the product, you can proceed according to your system.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQV-UaIq2zI/AAAAAAAAABY/xk9vsZiinE8/s1600/1.png" imageanchor="1" style=""&gt;&lt;img border="0" height="19" width="320" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQV-UaIq2zI/AAAAAAAAABY/xk9vsZiinE8/s320/1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TQV-zv53CcI/AAAAAAAAABg/EZJBp6xtN2o/s1600/2.png" imageanchor="1" style=""&gt;&lt;img border="0" height="139" width="306" src="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TQV-zv53CcI/AAAAAAAAABg/EZJBp6xtN2o/s320/2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Extract the file at your desired location.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQV_BvB2diI/AAAAAAAAABo/yfH0TC0r6Sw/s1600/3.png" imageanchor="1" style=""&gt;&lt;img border="0" height="158" width="320" src="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQV_BvB2diI/AAAAAAAAABo/yfH0TC0r6Sw/s320/3.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
On start of setup, the first screen will be &lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQV_QLvYfUI/AAAAAAAAABw/Fxbw0SakWAg/s1600/4.png" imageanchor="1" style=""&gt;&lt;img border="0" height="57" width="320" src="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQV_QLvYfUI/AAAAAAAAABw/Fxbw0SakWAg/s320/4.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
These screens are very much similar to the SQL Server 2008.&lt;br /&gt;
After a while, next screen will appear&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQV_tv6MxoI/AAAAAAAAAB4/3Ko_N10Gp6g/s1600/5.png" imageanchor="1" style=""&gt;&lt;img border="0" height="190" width="320" src="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQV_tv6MxoI/AAAAAAAAAB4/3Ko_N10Gp6g/s320/5.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
To view the hardware and software requirements for SQL Server 2011, visit the following Microsoft web site &lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/ms143506%28SQL.110%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms143506%28SQL.110%29.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TQWAK4ume8I/AAAAAAAAACA/5_ThDvLbRsU/s1600/6.png" imageanchor="1" style=""&gt;&lt;img border="0" height="190" width="320" src="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TQWAK4ume8I/AAAAAAAAACA/5_ThDvLbRsU/s320/6.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
On selection of New SQL Server stand-alone installation, the following screen will appear. On this screen Setup Support Rules will be executed to identify problems that might occur during installation SQL Server Setup support files. Before continuing to installation process, the failures listed must be corrected&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQWA2HjcrEI/AAAAAAAAACI/vH9UXlucbJc/s1600/7.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQWA2HjcrEI/AAAAAAAAACI/vH9UXlucbJc/s320/7.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
No Reboot package error is found.&lt;br /&gt;
&lt;b&gt;Reboot Package:&lt;/b&gt; : This rule determines whether the computer has the required update package that ensures that the computer will not have to be rebooted because of the Microsoft .NET Framework 4 installation.&lt;br /&gt;
&lt;br /&gt;
If you are installing Microsoft SQL Server 2011 (aka Denali) on Windows 7 or on Windows 2008 R2 OS computer or server, please download the .NET 4.0 update from KB &lt;a href="http://support.microsoft.com/?kbid=958488"&gt;Article 958488&lt;/a&gt;&lt;br /&gt;
If you are installing Microsoft SQL Server 2011 on Windows Vista SP2 or on Widows Server 2008 SP2 operating system, then please download Microsoft .NET Framework 4.0 update from KB &lt;a href="http://support.microsoft.com/?kbid=956250"&gt;Article 956250&lt;/a&gt;&lt;br /&gt;
After the installation of .Net Framework 4.0, system will start, and after resuming the setup again, the screen will be displayed&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQWErjUcR2I/AAAAAAAAACQ/YP8Mmvfe6Hw/s1600/8.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQWErjUcR2I/AAAAAAAAACQ/YP8Mmvfe6Hw/s320/8.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQWF7f2xhHI/AAAAAAAAACY/KZjeYvrpsqU/s1600/9.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQWF7f2xhHI/AAAAAAAAACY/KZjeYvrpsqU/s320/9.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
After clicking OK button, the next screen will be of Product key, I prefer to use Microsoft SQL Server 2011 Enterprise Edition so I select Enterprise Evaluation from dropdown list. &lt;br /&gt;
Select the Enterprise Evaluation.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQWGS4fw-rI/AAAAAAAAACg/gdAsIa2NjTQ/s1600/10.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQWGS4fw-rI/AAAAAAAAACg/gdAsIa2NjTQ/s320/10.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
You must accept the license terms in order to continue the installation of Microsoft SQL Server 2011 (SQL Server Denali CTP).Accept the license terms in order to continue to Microsoft SQL Server 2011 installation (SQL Server Denali CTP).and then click next.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQWG0LPDjdI/AAAAAAAAACo/E7OQt4sepVg/s1600/11.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQWG0LPDjdI/AAAAAAAAACo/E7OQt4sepVg/s320/11.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Click Install button to install SQL Server 2011 Setup Support files. SQL SERVER will install the setup support files that necessary during the installation.&lt;br /&gt;
Click Next button after selecting Microsoft SQL Server 2011 Denali CTP 1 features.&lt;br /&gt;
I just select the following Microsoft SQL Server 2011 features.&lt;br /&gt;
Click Next button for selecting among Microsoft SQL Server 2011 Denali CTP 1 features.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQWIXs2pw4I/AAAAAAAAACw/utUdYFD8ZtU/s1600/12.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQWIXs2pw4I/AAAAAAAAACw/utUdYFD8ZtU/s320/12.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Select the SQL SERVER 2011 “Denali” features according to your requirements. I have selected all the features except SQL Server Replication, Full-Text Search, Analysis Services and Reporting Services for faster installation of SQL Server Setup&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQWKYvy1SaI/AAAAAAAAAC4/JRSPtP4Ovsc/s1600/13.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQWKYvy1SaI/AAAAAAAAAC4/JRSPtP4Ovsc/s320/13.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
After SQL Server 2011 features selection for setup process, the installation rules are applied and give reasons for a possible failure.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQWKm01F-pI/AAAAAAAAADA/E4pODFjFy_4/s1600/14.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQWKm01F-pI/AAAAAAAAADA/E4pODFjFy_4/s320/14.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
On this screen (Instance Configuration), you can change the instance name of the system. This screen will also show the instances that already installed on the machine.&lt;br /&gt;
I have kept the default instance because I don’t have SQL Server installed on my machine.When you click on the Next button, the following screen will be displayed.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQWK935bMAI/AAAAAAAAADI/gb1BmilMnOs/s1600/15.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQWK935bMAI/AAAAAAAAADI/gb1BmilMnOs/s320/15.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Information about the disk space required and available is displayed on this screen. Click the Next button to proceed.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQWLPtMSh9I/AAAAAAAAADQ/6bCBdzd0oYs/s1600/16.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQWLPtMSh9I/AAAAAAAAADQ/6bCBdzd0oYs/s320/16.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
This is screen is used for configuration of SQL Server. This screen will be used to specify the accounts under which the SQL SERVER services will run.&lt;br /&gt;
I have used the Windows NT service account, if you want to the same, then click on the button “Use the Same account for all SQL Services”. After clicking following screen will be displayed.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQWLnTdLn-I/AAAAAAAAADY/DsEpKZkgjdM/s1600/17.png" imageanchor="1" style=""&gt;&lt;img border="0" height="102" width="320" src="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQWLnTdLn-I/AAAAAAAAADY/DsEpKZkgjdM/s320/17.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
You can see the selection of NT AUTHORITY/SYSTEM.  When you click OK, you will be back on SERVER CONFIGURATION screen.&lt;br /&gt;
&lt;br /&gt;
On server configuration, you can also specify the startup type.ie You wants to start the service automatically , when the windows starts or you wants to start the service later from control panel &gt; administrative tools &gt; services.&lt;br /&gt;
You can also go to your services panel by just entering services.msc on your windows Start &gt;Run&lt;br /&gt;
&lt;br /&gt;
You can also specify the collation (Collation refers to a set of rules that determine how data is sorted and compared) for this instance of SQL Server.&lt;br /&gt;
I have kept the default settings for collation.&lt;br /&gt;
Click the Next, after doing necessary configurations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TQWMe9pa_LI/AAAAAAAAADg/FWxPnMa3xZw/s1600/18.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TQWMe9pa_LI/AAAAAAAAADg/FWxPnMa3xZw/s320/18.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
This screen is used to give specify the Database Engine Configuration. From this screen we specify the authentication mode, Directories for SQL SERVER and Configuration for FILESTREAM. We will use the windows authentication. Click on “Add Current User”, the windows user will be added. Click on Data Directories tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQWMu-IVfnI/AAAAAAAAADo/3JelhzSTfVg/s1600/19.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQWMu-IVfnI/AAAAAAAAADo/3JelhzSTfVg/s320/19.png" /&gt;&lt;/a&gt;&lt;/div&gt;You can change the path of SQL SERVER data directories. I have kept all the default options for this page.&lt;br /&gt;
Click on FILESTREAM tab.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TQWNFZoMGmI/AAAAAAAAADw/lR054mXzHOw/s1600/20.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TQWNFZoMGmI/AAAAAAAAADw/lR054mXzHOw/s320/20.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
You can configure the FILESTREAM from this screen. Just enable all the options specified. I didn’t configure the FILESTREAM so I didn’t make any changes on this page.&lt;br /&gt;
Click the next button to proceed.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQWNUsWIstI/AAAAAAAAAD4/KWCV8JJhTPg/s1600/21.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQWNUsWIstI/AAAAAAAAAD4/KWCV8JJhTPg/s320/21.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
This screen is used to send the errors that might occur during the installation of SQL SERVER.&lt;br /&gt;
Click the Next button.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQWNzh1cbCI/AAAAAAAAAEA/MGamtoU0p_w/s1600/22.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TQWNzh1cbCI/AAAAAAAAAEA/MGamtoU0p_w/s320/22.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
On this screen SQL SERVER checks few rules, there is nothing to do on this screen.&lt;br /&gt;
Click Next &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQWOBJzwiVI/AAAAAAAAAEI/bbZU4_xRM8I/s1600/23.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQWOBJzwiVI/AAAAAAAAAEI/bbZU4_xRM8I/s320/23.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
This is the last screen to start the installation. On this screen, SQL SERVER shows the features/components that are going to be installed.&lt;br /&gt;
Click the install button to start the installation.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQWOc1QQd3I/AAAAAAAAAEQ/pswpQ-xW0uA/s1600/24.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQWOc1QQd3I/AAAAAAAAAEQ/pswpQ-xW0uA/s320/24.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQWOt724UoI/AAAAAAAAAEY/tuKs6XI5lpQ/s1600/25.png" imageanchor="1" style=""&gt;&lt;img border="0" height="240" width="320" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQWOt724UoI/AAAAAAAAAEY/tuKs6XI5lpQ/s320/25.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
This screen will be displayed at the END of installation process. It means that your installation of SQL SERVER is completed.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQWO891ZTTI/AAAAAAAAAEg/K0EwKPJuitg/s1600/26.png" imageanchor="1" style=""&gt;&lt;img border="0" height="306" width="242" src="http://4.bp.blogspot.com/_7Yu8JBHb4QM/TQWO891ZTTI/AAAAAAAAAEg/K0EwKPJuitg/s320/26.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Select SQL Server Management Studio, this will be come under &lt;br /&gt;
Start &gt;&gt; Microsoft SQL Server Denali CTP1&gt;&gt;SQL Server Management Studio&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQWPRJav81I/AAAAAAAAAEo/zJ-w_rkvxvA/s1600/27.png" imageanchor="1" style=""&gt;&lt;img border="0" height="158" width="320" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQWPRJav81I/AAAAAAAAAEo/zJ-w_rkvxvA/s320/27.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-9003480793804917639?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/HQ_vWIGR7Fk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/9003480793804917639/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2010/12/how-to-install-sql-server-2011.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/9003480793804917639?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/9003480793804917639?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/HQ_vWIGR7Fk/how-to-install-sql-server-2011.html" title="How to Install SQL SERVER 2011" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_7Yu8JBHb4QM/TQV-UaIq2zI/AAAAAAAAABY/xk9vsZiinE8/s72-c/1.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2010/12/how-to-install-sql-server-2011.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8NRng5fCp7ImA9Wx9REk0.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-8925983905801190519</id><published>2010-12-08T10:43:00.003+05:00</published><updated>2010-12-13T07:21:37.624+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-13T07:21:37.624+05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2011" /><title>The Operating System on this computer does not meet the minimum requirements for SQL SERVER "Denali"</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/UkPMiBNsG4GpDjLk1gw-koaS8HE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UkPMiBNsG4GpDjLk1gw-koaS8HE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/UkPMiBNsG4GpDjLk1gw-koaS8HE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UkPMiBNsG4GpDjLk1gw-koaS8HE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;a href="file:///C:%5CDOCUME%7E1%5Cziqbal%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/a&gt;&lt;a href="file:///C:%5CDOCUME%7E1%5Cziqbal%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_editdata.mso" rel="Edit-Time-Data"&gt;&lt;/a&gt;&lt;a href="file:///C:%5CDOCUME%7E1%5Cziqbal%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/a&gt;&lt;a href="file:///C:%5CDOCUME%7E1%5Cziqbal%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/a&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
 {font-family:"Cambria Math";
 panose-1:2 4 5 3 5 4 6 3 2 4;
 mso-font-charset:0;
 mso-generic-font-family:roman;
 mso-font-pitch:variable;
 mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;
 mso-font-charset:0;
 mso-generic-font-family:swiss;
 mso-font-pitch:variable;
 mso-font-signature:-1610611985 1073750139 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
 {mso-style-unhide:no;
 mso-style-qformat:yes;
 mso-style-parent:"";
 margin-top:0in;
 margin-right:0in;
 margin-bottom:10.0pt;
 margin-left:0in;
 line-height:115%;
 mso-pagination:widow-orphan;
 font-size:11.0pt;
 font-family:"Calibri","sans-serif";
 mso-ascii-font-family:Calibri;
 mso-ascii-theme-font:minor-latin;
 mso-fareast-font-family:Calibri;
 mso-fareast-theme-font:minor-latin;
 mso-hansi-font-family:Calibri;
 mso-hansi-theme-font:minor-latin;
 mso-bidi-font-family:Arial;
 mso-bidi-theme-font:minor-bidi;}
a:link, span.MsoHyperlink
 {mso-style-priority:99;
 color:blue;
 mso-themecolor:hyperlink;
 text-decoration:underline;
 text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
 {mso-style-noshow:yes;
 mso-style-priority:99;
 color:purple;
 mso-themecolor:followedhyperlink;
 text-decoration:underline;
 text-underline:single;}
.MsoChpDefault
 {mso-style-type:export-only;
 mso-default-props:yes;
 mso-ascii-font-family:Calibri;
 mso-ascii-theme-font:minor-latin;
 mso-fareast-font-family:Calibri;
 mso-fareast-theme-font:minor-latin;
 mso-hansi-font-family:Calibri;
 mso-hansi-theme-font:minor-latin;
 mso-bidi-font-family:Arial;
 mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
 {mso-style-type:export-only;
 margin-bottom:10.0pt;
 line-height:115%;}
@page Section1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;
 mso-header-margin:.5in;
 mso-footer-margin:.5in;
 mso-paper-source:0;}
div.Section1
 {page:Section1;}
--&gt;
&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;div style="color: black;"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;When installing SQL Server 2011 Denal , you might get the following error, if you are installing on Windows XP operating System , because &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 13pt; line-height: 115%;"&gt;Windows XP is not supported&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;for SQL Server 2011.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style="color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;The operating System on this computer does not meet the minimum requirements for SQL SERVER "Denali".For more information, see Hardware and Software Requirements for installing SQL SERVER at &lt;/span&gt;&lt;span style="color: red;"&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=195092"&gt;&lt;span style="color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;http://go.microsoft.com/fwlink/?LinkID=195092&lt;/span&gt;&lt;/a&gt;&lt;span style="color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TP8YgeEY3FI/AAAAAAAAABQ/MWlllUnph_Q/s1600/SQL+Server+Denali.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TP8aYjiW2aI/AAAAAAAAABU/HQs_C3HzcTE/s1600/SQL+Server+Denali.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="90" src="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TP8aYjiW2aI/AAAAAAAAABU/HQs_C3HzcTE/s320/SQL+Server+Denali.bmp" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;br /&gt;
&lt;br&gt;Microsoft SQL Server 2011 Requirements&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;During Microsoft SQL Server 2011 installation, in order to install SQL Server 2011 without a problem and an interruption please take care to the Microsoft SQL Server 2011 Requirements list. It is better to install the Microsoft SQL Server 2011 requirements before starting &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;a href="http://download.microsoft.com/download/A/6/B/A6BA76B8-BA7D-4408-A93A-F5EF8A1E1DD5/SQLFULL_x86_ENU.exe"&gt;http://download.microsoft.com/download/A/6/B/A6BA76B8-BA7D-4408-A93A-F5EF8A1E1DD5/SQLFULL_x86_ENU.exe&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;a href="http://download.microsoft.com/download/A/6/B/A6BA76B8-BA7D-4408-A93A-F5EF8A1E1DD5/SQLFULL_ENU.iso"&gt;http://download.microsoft.com/download/A/6/B/A6BA76B8-BA7D-4408-A93A-F5EF8A1E1DD5/SQLFULL_ENU.iso&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;a href="http://download.microsoft.com/download/A/6/B/A6BA76B8-BA7D-4408-A93A-F5EF8A1E1DD5/SQLFULL_x64_ENU.exe"&gt;http://download.microsoft.com/download/A/6/B/A6BA76B8-BA7D-4408-A93A-F5EF8A1E1DD5/SQLFULL_x64_ENU.exe&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;The operating system requirements for Microsoft SQL Server 2011 are as follows.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;Microsoft SQL Server 2011 aka SQL Server Denali CTP 1 Evaluation version supports:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;Windows Vista with SP2,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;Windows Server 2008 with SP2,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;Windows 2008 R2, and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;Windows 7 operating systems.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;What is interesting related with the supported operating systems list is &lt;/span&gt;&lt;b&gt;&lt;span style="color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 13pt; line-height: 115%;"&gt;Windows XP is not supported&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;any more.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;I have successfully installed MS SQL Server 2008 R2 on my Windows XP machine; SQL Server 2011 Denali CTP 1 cannot be installed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-8925983905801190519?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/6UG3tv5PbHw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/8925983905801190519/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2010/12/operating-system-on-this-computer-does.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/8925983905801190519?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/8925983905801190519?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/6UG3tv5PbHw/operating-system-on-this-computer-does.html" title="The Operating System on this computer does not meet the minimum requirements for SQL SERVER &quot;Denali&quot;" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_7Yu8JBHb4QM/TP8aYjiW2aI/AAAAAAAAABU/HQs_C3HzcTE/s72-c/SQL+Server+Denali.bmp" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2010/12/operating-system-on-this-computer-does.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQAQ3o4cCp7ImA9Wx9SE0Q.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-4213288801282210219</id><published>2010-12-03T12:35:00.002+05:00</published><updated>2010-12-03T21:39:02.438+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-03T21:39:02.438+05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Errors" /><title>Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created.</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dzOngQ60eDu9Qlw75yyVsAuvdhk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dzOngQ60eDu9Qlw75yyVsAuvdhk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/dzOngQ60eDu9Qlw75yyVsAuvdhk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dzOngQ60eDu9Qlw75yyVsAuvdhk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;style&gt;
@font-face {
  font-family: "Cambria Math";
}@font-face {
  font-family: "Calibri";
}p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0in 0in 10pt; line-height: 115%; font-size: 11pt; font-family: "Calibri","sans-serif"; }.MsoChpDefault {  }.MsoPapDefault { margin-bottom: 10pt; line-height: 115%; }div.Section1 { page: Section1; }
&lt;/style&gt;  &lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;When making changes in a table, an error might occur&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;Saving  changes is not permitted. The changes you have made require the  following tables to be dropped and re-created. You have either made  changes to a table can't be re-created or enabled the option Prevent  saving changes that require the table to be re-created.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;The  reason behind this error is that, whenever we add or delete a field of a  table, that table requires to be dropped and recreate again. SQL Server  prevents this change to happen ie it does not allow for drop and  recreate of the table.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;Here is solution to this problem&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;Open the SQL Server Management Studio &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;Go to the Tools Menu and select Options &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;Select the Designers from the Options and uncheck &lt;b&gt;"Prevent saving changes that require table re-creation"&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TPkc_xcnVYI/AAAAAAAAABM/ShzhZipVbS0/s1600/PreventSavingChanges.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="189" src="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TPkc_xcnVYI/AAAAAAAAABM/ShzhZipVbS0/s320/PreventSavingChanges.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-4213288801282210219?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/10TQe6KWQNg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/4213288801282210219/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2010/12/saving-changes-is-not-permitted-changes.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/4213288801282210219?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/4213288801282210219?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/10TQe6KWQNg/saving-changes-is-not-permitted-changes.html" title="Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created." /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_7Yu8JBHb4QM/TPkc_xcnVYI/AAAAAAAAABM/ShzhZipVbS0/s72-c/PreventSavingChanges.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2010/12/saving-changes-is-not-permitted-changes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QMRH88fSp7ImA9Wx9TGEg.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-7725892427660435318</id><published>2010-11-27T14:43:00.003+05:00</published><updated>2010-11-27T14:49:45.175+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-27T14:49:45.175+05:00</app:edited><title>Sparse columns do not take any space</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/buJOiE35NLWvTt77-HdHaOH6HRg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/buJOiE35NLWvTt77-HdHaOH6HRg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/buJOiE35NLWvTt77-HdHaOH6HRg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/buJOiE35NLWvTt77-HdHaOH6HRg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&lt;b&gt;Sparse columns&lt;/b&gt; are the new feature in SQL SERVER 2008. Sparse columns are better, when dealing with NULL in SQL SERVER. Sparse columns do not take any space. Defining the column as &lt;i&gt;sparse&lt;/i&gt; can save a significant amount of disk space but at the cost of more overhead to retrieve non null values. Sparse columns can be defined by using the CREATE TABLE or ALTER TABLE statements.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="color: black; text-align: justify;"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;CREATE TABLE DocumentStore&lt;br /&gt;
(&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black; text-align: justify;"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;DocID int PRIMARY KEY,&lt;br /&gt;
Title varchar(200) NOT NULL,&lt;br /&gt;
ProductionSpecification varchar(20) SPARSE NULL,&lt;br /&gt;
ProductionLocation smallint SPARSE NULL,&lt;br /&gt;
MarketingSurveyGroup varchar(20) SPARSE NULL&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&lt;span style="color: black;"&gt;) ;&lt;/span&gt;&lt;/span&gt;&lt;br style="color: black;" /&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&lt;span style="color: black;"&gt;GO&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;Advantages of Sparse Columns&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;Storing a null in a sparse column takes up no space at all.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Symbol; font-size: 10pt; line-height: 115%;"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;Sparse Columns will behave as the ordinary columns; SPARSE column can work as one XML column as well.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Symbol; font-size: 10pt; line-height: 115%;"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;Sparse columns work really well with filtered indexes, where data are filled in the row. A filtered index on a sparse column can index only the rows that have populated values. This creates a smaller and more efficient index&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;SPARSE column saves database space when there are null values in database. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;Disadvantages of Parse Columns&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: Symbol; font-size: 10pt; line-height: 115%;"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;SPARSE column does not have IDENTITY or ROWGUIDCOL property.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;Sparse Column must be null able&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;SPARSE column cannot be applied on text, ntext, image, timestamp, geometry, geography or user defined data types.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;SPARSE column cannot have default value or rule or computed column.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;"&gt;Clustered index or a unique primary key index cannot be applied on SPARSE columns. SPARSE column cannot be part of clustered index key. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;"&gt;Table containing SPARSE column can have maximum size of 8018 bytes instead of regular 8060 bytes. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;A table operation which involves SPARSE column takes performance hit over regular column.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;Sparse columns are incompatible with data compression (Data compression doesn't work).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;Merge replication does not support sparse columns&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="MsoListParagraphCxSpLast" style="text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 10pt; line-height: 115%;"&gt;·&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-7725892427660435318?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/Wnkdf_OWrbE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/7725892427660435318/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2010/11/sparse-columns-do-not-take-any-space.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/7725892427660435318?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/7725892427660435318?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/Wnkdf_OWrbE/sparse-columns-do-not-take-any-space.html" title="Sparse columns do not take any space" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2010/11/sparse-columns-do-not-take-any-space.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMNRX48cSp7ImA9Wx5aGEU.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-9143771482933450505</id><published>2010-11-16T10:48:00.000+05:00</published><updated>2010-11-16T10:48:14.079+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-16T10:48:14.079+05:00</app:edited><title>SQL Server  2011 , Code Named “Denali” is released</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/O_iYwTuOtPaaZvzwKS-FMbotOBc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/O_iYwTuOtPaaZvzwKS-FMbotOBc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/O_iYwTuOtPaaZvzwKS-FMbotOBc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/O_iYwTuOtPaaZvzwKS-FMbotOBc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;SQL Server 2011 – Code Named “Denali” is released on November 11, 2010 at SQLPASS&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;You can &lt;a href="http://www.microsoft.com/sqlserver/en/us/product-info/future-editions.aspx"&gt;&lt;strong&gt;download CTP1&lt;/strong&gt;&lt;/a&gt;&amp;nbsp; right now and install on your machine.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;SQL Server code-named 'Denali' helps empowers organizations to be more  agile in today’s competitive market. Customers will more efficiently  deliver mission-critical solutions through a highly scalable and  available platform. Industry-leading tools help developers quickly build  innovative applications while data integration and management tools  help deliver credible data reliably to the right users and extended  managed self-service BI capabilities enable meaningful insights. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;The major features of the new products are as following:&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&amp;nbsp;Enhanced Mission&lt;/b&gt;-Critical Platform: an enhanced highly available and scalable platform.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Developer and IT Productivity&lt;/b&gt;: new innovative productivity tools and features.&lt;/li&gt;
&lt;li&gt; &lt;b&gt;Pervasive Insight&lt;/b&gt;: expanding the reach of BI to business users and end-to-end data integration and management.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;Book Online of SQL Server 2011 “Denali” is available &lt;a href="http://msdn.microsoft.com/en-us/library/ms130214%28SQL.110%29.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Installation guide for SQL Server 2011 “Denali” available &lt;a href="http://msdn.microsoft.com/en-us/library/bb500469%28v=SQL.110%29.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-9143771482933450505?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/voyEk1mVvb0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/9143771482933450505/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2010/11/sql-server-2011-code-named-denali-is.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/9143771482933450505?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/9143771482933450505?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/voyEk1mVvb0/sql-server-2011-code-named-denali-is.html" title="SQL Server  2011 , Code Named “Denali” is released" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2010/11/sql-server-2011-code-named-denali-is.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YBQXs5fyp7ImA9WxBRFEw.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-8365384810625659689</id><published>2010-01-02T12:59:00.000+05:00</published><updated>2010-01-02T12:59:10.527+05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-02T12:59:10.527+05:00</app:edited><title>New Features in Sql Server 2008</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/50uJ_U6lfhe4Y84MG2c-52laSfI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/50uJ_U6lfhe4Y84MG2c-52laSfI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/50uJ_U6lfhe4Y84MG2c-52laSfI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/50uJ_U6lfhe4Y84MG2c-52laSfI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt; &lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;Compressed Backup&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;AUDITING =&amp;gt; Change Data Capture (CDC)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;FileStream&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;Sparse Column Support&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;&lt;span class="yshortcuts" id="lw_1262407583_1" style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: transparent none repeat scroll 0% 0%; cursor: pointer;"&gt;Performance Data Management&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;Encryption =&amp;gt; Transparent data encryption (TDE)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;&lt;span class="yshortcuts" id="lw_1262407583_1" style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: transparent none repeat scroll 0% 0%; cursor: pointer;"&gt; &lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;Resource Governor&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;Freeze Plan&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;LINQ Support&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;Deprecated Features in future realases (but still available in Sql 2008)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;&amp;nbsp;BACKUP {DATABASE | LOG} WITH PASSWORD&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;&amp;nbsp;BACKUP {DATABASE | LOG} WITH MEDIAPASSWORD&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;&amp;nbsp;RESTORE {DATABASE | LOG} … WITH DBO_ONLY&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;&amp;nbsp;RESTORE {DATABASE | LOG} WITH PASSWORD&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;&amp;nbsp;RESTORE {DATABASE | LOG} WITH MEDIAPASSWORD&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;input id="gwProxy" type="hidden" /&gt;&lt;!--Session data--&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden" /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-8365384810625659689?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/8M7J-MSFymU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/8365384810625659689/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2010/01/new-features-in-sql-server-2008.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/8365384810625659689?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/8365384810625659689?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/8M7J-MSFymU/new-features-in-sql-server-2008.html" title="New Features in Sql Server 2008" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2010/01/new-features-in-sql-server-2008.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIFQX4-fCp7ImA9WxNWF0s.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-6822642729922568044</id><published>2009-10-17T12:55:00.000+06:00</published><updated>2009-10-17T12:55:10.054+06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-17T12:55:10.054+06:00</app:edited><title>CBT Nugget s 70-432</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/WwTcl95WoxM3gjV0jgAEynCGdi4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WwTcl95WoxM3gjV0jgAEynCGdi4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/WwTcl95WoxM3gjV0jgAEynCGdi4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WwTcl95WoxM3gjV0jgAEynCGdi4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Download CBT Nuggets&amp;nbsp; cbt-nuggets-exam-pack-70-432 sql-server-2008&lt;br /&gt;
&lt;br /&gt;
http://hotfilms.org/ebooks/tutorials-cbt-nuggets-exam-pack-70-432-oft-sql-server-2008-imple-874433.html&lt;br /&gt;
&lt;input id="gwProxy" type="hidden" /&gt;&lt;!--Session data--&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden" /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-6822642729922568044?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/aVB_HFHQMHk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/6822642729922568044/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2009/10/cbt-nugget-s-70-432.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/6822642729922568044?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/6822642729922568044?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/aVB_HFHQMHk/cbt-nugget-s-70-432.html" title="CBT Nugget s 70-432" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2009/10/cbt-nugget-s-70-432.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UNQ30zfCp7ImA9WxNRFUs.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-5513845385513685182</id><published>2009-09-10T12:40:00.005+06:00</published><updated>2009-09-10T12:48:12.384+06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-10T12:48:12.384+06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Scripts" /><title>How to Get SQL Server Table Size</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Aw468YtHleQE_Q0TT3jo85oe6Xw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Aw468YtHleQE_Q0TT3jo85oe6Xw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Aw468YtHleQE_Q0TT3jo85oe6Xw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Aw468YtHleQE_Q0TT3jo85oe6Xw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="MsoNormal"&gt;This is a very common problem to get space used by the Database objects.&lt;br /&gt;This stored procedure uses the sp_spaceused.&lt;br /&gt;This stored procedure has been tested and used on a SQL Server 2005 and it will work fine on SQL Server 2008 as well.&lt;br /&gt;It’s a very much simple stored procedure.&lt;br /&gt;This SP declare a cursor that will get the names of all user defined tables and Schemas  (concatenating the schema and table names as two part name that is schema.tablename) in the current database.&lt;br /&gt;Then Stored Procedure creates a temporary table to store the individual data elements for each table. Then loop through the created cursor and save the results of the sp_spaceused command to temporary table.&lt;br /&gt;The last step includes closing and deallocating the cursor, selecting all rows from  temp table and dropps that table.&lt;/div&gt;&lt;br /&gt;&lt;sqltrends.blogspot.com&gt;&lt;create date=""&gt;&lt;this database="" get="" is="" of="" procedure="" sizes="" tables="" the="" to="" used=""&gt;&lt;br /&gt;-- =============================================&lt;br /&gt;CREATE PROCEDURE utility.Proc_GetDBTableSizes&lt;br /&gt;&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt; -- SET NOCOUNT ON added to prevent extra result sets from&lt;br /&gt; -- interfering with SELECT statements.&lt;br /&gt; SET NOCOUNT ON;&lt;br /&gt;&lt;br /&gt; DECLARE @TableName VARCHAR(200)&lt;br /&gt;&lt;br /&gt; -- Insert statements for procedure here&lt;br /&gt; DECLARE tableCursor CURSOR FOR&lt;br /&gt;     SELECT sys.schemas.[name]+'.'+sys.objects.[name]&lt;br /&gt;     FROM sys.schemas INNER JOIN sys.objects ON sys.schemas.schema_id=sys.objects.schema_id&lt;br /&gt;     WHERE type='U' AND is_ms_shipped=0 ORDER BY sys.schemas.[name]  -- WHERE is_ms_shipped is Microsoft generated objects&lt;br /&gt; FOR READ ONLY&lt;br /&gt; --A procedure level temp table to store the results&lt;br /&gt; CREATE TABLE #TempTable&lt;br /&gt; (&lt;br /&gt;     tableName varchar(200),&lt;br /&gt;     numberofRows varchar(100),&lt;br /&gt;     reservedSize varchar(50),&lt;br /&gt;     dataSize varchar(50),&lt;br /&gt;     indexSize varchar(50),&lt;br /&gt;     unusedSize varchar(50)&lt;br /&gt; )&lt;br /&gt;&lt;br /&gt;--Open the cursor&lt;br /&gt; OPEN tableCursor&lt;br /&gt;&lt;br /&gt; --Get the first Record from the cursor&lt;br /&gt; FETCH NEXT FROM tableCursor INTO @TableName&lt;br /&gt;&lt;br /&gt; --Loop until the cursor was not able to fetch&lt;br /&gt; WHILE (@@Fetch_Status &amp;gt;= 0)&lt;br /&gt; BEGIN&lt;br /&gt;     --Insert the results of the sp_spaceused query to the temp table&lt;br /&gt;     INSERT  #TempTable&lt;br /&gt;         EXEC sp_spaceused @TableName&lt;br /&gt;&lt;br /&gt;     --Get the next Record&lt;br /&gt;     FETCH NEXT FROM tableCursor INTO @TableName&lt;br /&gt; END&lt;br /&gt;&lt;br /&gt; --Close/Deallocate the cursor&lt;br /&gt; CLOSE tableCursor&lt;br /&gt; DEALLOCATE tableCursor&lt;br /&gt;&lt;br /&gt; --Select all records so we can use the reults&lt;br /&gt; SELECT *&lt;br /&gt; FROM #TempTable&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; DROP TABLE #TempTable&lt;br /&gt;&lt;br /&gt;END&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;/this&gt;&lt;/create&gt;&lt;/sqltrends.blogspot.com&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-5513845385513685182?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/aPuccrdz3do" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/5513845385513685182/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2009/09/how-to-get-sql-server-table-size.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/5513845385513685182?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/5513845385513685182?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/aPuccrdz3do/how-to-get-sql-server-table-size.html" title="How to Get SQL Server Table Size" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2009/09/how-to-get-sql-server-table-size.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUHSH8_eyp7ImA9WxJaFEU.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-308239079144894655</id><published>2009-08-05T20:22:00.000+06:00</published><updated>2009-08-05T20:23:59.143+06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-05T20:23:59.143+06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Interview Questions" /><title>SQL Server Interview Questions</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/aF-YeooyQPtoLZSANZnbpRt2m9Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aF-YeooyQPtoLZSANZnbpRt2m9Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/aF-YeooyQPtoLZSANZnbpRt2m9Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aF-YeooyQPtoLZSANZnbpRt2m9Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 11" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 11" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Czafar%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;o:smarttagtype name="place" namespaceuri="urn:schemas-microsoft-com:office:smarttags"&gt;&lt;/o:smarttagtype&gt;&lt;style&gt;
&lt;!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;
&lt;/style&gt;  &lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;How to implement many-to-many relationships?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What's the difference between a primary key and a unique key?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is user defined datatypes and when to use them?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;Define candidate key, alternate key, and composite key?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;Is there a column to which a default value can't be bound?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What are ACID properties?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;Explain different isolation levels?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is MOLAP, ROLAP and HOLAP?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;Types of constraints?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What are the types of indexes ? What are the type of the NonClustered Indexes ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;In which situation NonClustered is more fast then clustered index?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is the difference between deadlock , live lock and blocking ? And How to resolve them?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What are the Query Hints?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What are the different types of DBCC commands?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What are instead of triggers and what’s the difference between Insert and Instead of trigger , which trigger will be fired first ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors? Why DBAs don’t like Cursors ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is a self join? Is self join physically exists in Sql Server ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is the difference between OSQL and Query Analyzer ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is BCP and when to use it ? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is collation ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;span style="font-family: Arial; font-size: 10pt; line-height: 150%;"&gt;What’s the difference between a primary key and a unique key?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;When is the use of UPDATE_STATISTICS command?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What types of Joins are possible in Sql Server?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial; font-size: 10pt; line-height: 150%;"&gt;&lt;br /&gt;
Where are SQL server users names and passwords are stored in sql server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;span style="font-family: Arial; font-size: 10pt; line-height: 150%;"&gt;What is log shipping?&lt;/span&gt;&lt;span style="font-family: Arial; font-size: 10pt; line-height: 150%;"&gt;&lt;br /&gt;
What is the difference between a local and a global variable?&lt;br /&gt;
What are the OS services that the SQL Server installation adds?&lt;br /&gt;
Specify &amp;nbsp;3 ways to get an accurate count of the number of records in a table?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;span style="font-family: Arial; font-size: 10pt; line-height: 150%;"&gt;What is the basic functions for master, msdb, model, tempdb databases?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;span style="font-family: Arial; font-size: 10pt; line-height: 150%;"&gt;What is a table called, if it does not have neither Cluster nor Non-cluster Index? What is it used for?&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-family: Arial; font-size: 10pt; line-height: 150%;"&gt;How do you load large data to the SQL server database?&lt;br /&gt;
What is Cross Join?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;span style="font-family: Arial; font-size: 10pt; line-height: 150%;"&gt;What is OLTP(OnLine Transaction Processing)? How to define that a Database is OLTP ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is the Diffrence between Extents and Page&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is the Diffrence between temp table and table variable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is SQL injection&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;Specify the Tips when Optimizing Sql Server 2005 Query&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is the difference between UNION ALL Statement and &lt;st1:place w:st="on"&gt;UNION&lt;/st1:place&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What are the different types of Locks &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is Write ahead log?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;How to get which Process is Blocked in SQL SERVER&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is SQL Server English Query?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is XPath?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 10pt; font-weight: normal; line-height: 150%;"&gt;What is the STUFF and how does it differ from the REPLACE function?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 150%;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-308239079144894655?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/YVFDNRsYmd4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/308239079144894655/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2009/08/sql-server-interview-questions.html#comment-form" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/308239079144894655?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/308239079144894655?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/YVFDNRsYmd4/sql-server-interview-questions.html" title="SQL Server Interview Questions" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>9</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2009/08/sql-server-interview-questions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0ENQXc_fyp7ImA9WxNRE0w.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-5182950632254775011</id><published>2009-07-28T20:39:00.002+06:00</published><updated>2009-09-07T15:28:10.947+06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-07T15:28:10.947+06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Data structures" /><title>Physical Data structures of SQL Server</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/WYlwy2ZOc1at_GP-VdGNeTIpvKc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WYlwy2ZOc1at_GP-VdGNeTIpvKc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/WYlwy2ZOc1at_GP-VdGNeTIpvKc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WYlwy2ZOc1at_GP-VdGNeTIpvKc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;SQL Server data is organized into files. When we create a database,&lt;br /&gt;we will identify the names and locations of these files. Creating a database requires the&lt;br /&gt;use of two types of files: data files and transaction log files. A database can have multiple data&lt;br /&gt;files and transaction log files, and it is required to have at least one of each.&lt;br /&gt;Data Files Data files store all of the information in the database including data values,&lt;br /&gt;indexes, and even configuration data and programmatic objects such as stored procedures&lt;br /&gt;and functions. The data files are, therefore, the main repository in the database.&lt;br /&gt;Transaction Log Files Log files provide a durable record of all modifications to the database.&lt;br /&gt;SQL Server uses a write-ahead modification process that requires all changes to be&lt;br /&gt;written to transaction logs before they are written to the database. These logs enable a variety&lt;br /&gt;of data recovery and integrity features.&lt;br /&gt;&lt;br /&gt;To allow SQL Server to locate any data value quickly and efficiently, these data files must be&lt;br /&gt;organized in a way that gives the SQL Server data engine full control of the specific placement&lt;br /&gt;of any data value. SQL Server accomplishes this by organizing data file structures into 8KB&lt;br /&gt;blocks called pages. It means that SQL Server databases have 128 pages per megabyte. Each page begins with a 96-byte header that is used to store system information about the page. This information includes the page number, page type, the amount of free space on the page, and the allocation unit ID of the object that owns the page.&lt;br /&gt;Data rows are put on the page serially, starting immediately after the header. A row offset table starts at the end of the page, and each row offset table contains one entry for each row on the page. Each entry records how far the first byte of the row is from the start of the page. The entries in the row offset table are in reverse sequence from the sequence of the rows on the page.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Large Row Support&lt;/b&gt;&lt;br /&gt;Rows cannot span pages, however portions of the row may be moved off the row's page so that the row can actually be very large. The maximum amount of data and overhead that is contained in a single row on a page is 8,060 bytes (8 KB). However, this does not include the data stored in the Text/Image page type. This restriction is relaxed for tables that contain &lt;strong style="font-weight: normal;"&gt;varchar&lt;/strong&gt;&lt;span style="font-weight: bold;"&gt;, &lt;/span&gt;&lt;strong style="font-weight: normal;"&gt;nvarchar&lt;/strong&gt;&lt;span style="font-weight: bold;"&gt;,&lt;/span&gt; &lt;strong style="font-weight: normal;"&gt;varbinary&lt;/strong&gt;&lt;span style="font-weight: bold;"&gt;,&lt;/span&gt; or &lt;strong style="font-weight: normal;"&gt;sql_variant&lt;/strong&gt; columns.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Data Pages&lt;/b&gt; Data pages store all data values except those typed as large value types such&lt;br /&gt;as text, ntext, xml, varchar(max), etc. The majority of pages in a typical database will be&lt;br /&gt;data pages.&lt;br /&gt;&lt;b&gt;Index Pages&lt;/b&gt; Index pages store index entries for both clustered and nonclustered indexes.&lt;br /&gt;These entries typically consist of the index key values themselves plus additional information&lt;br /&gt;used by SQL Server to locate data entries and manage the index process.&lt;br /&gt;&lt;b&gt;Large Object Pages&lt;/b&gt; Because SQL Server data rows cannot span multiple data pages, large data&lt;br /&gt;values must be stored in alternative locations in cases where the data value is too large for the&lt;br /&gt;data page. Datatypes such as text, ntext, xml, varchar(max), etc. will typically store a small&lt;br /&gt;pointer on the data page that references the large object page where the data entry begins.&lt;br /&gt;Some datatypes such as text and varchar(max) will always be stored in large object pages.&lt;br /&gt;Others, such as varchar and varbinary, will be moved to these pages dynamically by SQL&lt;br /&gt;Server when the data row size exceeds 8KB. If, in the future, the variable length columns are&lt;br /&gt;edited and the size of the data row falls within the 8KB limit again, the data will be moved&lt;br /&gt;back to the data page.&lt;br /&gt;Other Pages Additionally, SQL Server stores other configuration information in special&lt;br /&gt;pages designed specifically for those configurations. These special page types include the&lt;br /&gt;Global Application Map, Index Application Map, Bulk Changed Map, and others.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Extents&lt;/b&gt;&lt;br /&gt;Pages are further organized into 64KB blocks called extents.  An extent is eight physically contiguous pages. This means SQL Server databases have 16 extents per megabyte. Typically, pages&lt;br /&gt;in a data file are allocated specifically for only one purpose. For example, you will not see data&lt;br /&gt;values and index entries in the same data page. SQL Server has many kinds of pages.&lt;br /&gt;&lt;br /&gt;To make its space allocation efficient, SQL Server does not allocate whole extents to tables with small amounts of data. SQL Server has two types of extents:&lt;br /&gt;&lt;b&gt;Uniform extents&lt;/b&gt; are owned by a single object; all eight pages in the extent can only be used by the owning object.&lt;br /&gt;&lt;b&gt;Mixed extents&lt;/b&gt; are shared by up to eight objects. Each of the eight pages in the extent can be owned by a different object.&lt;br /&gt;&lt;br /&gt;A new table or index is generally allocated pages from mixed extents. When the table or index grows to the point that it has eight pages, it then switches to use uniform extents for subsequent allocations. If you create an index on an existing table that has enough rows to generate eight pages in the index, all allocations to the index are in uniform extents.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-5182950632254775011?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/eWMbh1-wosM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/5182950632254775011/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2009/07/physical-data-structures-of-sql-server.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/5182950632254775011?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/5182950632254775011?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/eWMbh1-wosM/physical-data-structures-of-sql-server.html" title="Physical Data structures of SQL Server" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2009/07/physical-data-structures-of-sql-server.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcBR3w-eyp7ImA9WxJbEkk.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-2937877771887841861</id><published>2009-07-22T11:03:00.000+06:00</published><updated>2009-07-22T13:00:56.253+06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-22T13:00:56.253+06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="DB Constraints" /><title>Difference between Primary Key and Unique Index</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8NDyT6bK4MisYcV-3ousGDp3aX0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8NDyT6bK4MisYcV-3ousGDp3aX0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8NDyT6bK4MisYcV-3ousGDp3aX0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8NDyT6bK4MisYcV-3ousGDp3aX0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:verdana;"&gt;What is the difference between a Primary Key and a Unique Index? Both can be declared on one or more columns, both can be used to enforce foreign keys (if the unique index is on not null column(s)), both can be declared as clustered/non clustered indexes (SQL Server lingo), both can be used on computed columns as well (SQL Server). &lt;/span&gt;&lt;/span&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;The differences between the two are:&lt;/span&gt;&lt;/p&gt; &lt;ol  style="font-family:verdana;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt; Column(s) that make the Primary Key of a table cannot be NULL since by definition, the Primary Key cannot be NULL since it helps uniquely identify the record in the table. The column(s) that make up the unique index can be nullable. A note worth mentioning over here is that different RDBMS treat this differently –&gt; while SQL Server and DB2 do not allow more than one NULL value in a unique index column, Oracle allows multiple NULL values. That is one of the things to look out for when designing/developing/porting applications across RDBMS.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;There can be only one Primary Key defined on the table where as you can have many unique indexes defined on the table (if needed).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Also, in the case of SQL Server, if you go with the default options then a Primary Key is created as a clustered index while the unique index (constraint) is created as a non-clustered index.  This is just the default behavior though and can be changed at creation time, if needed.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;So, if the unique index is defined on not null column(s), then it is essentially the same as the Primary Key and can be treated as an alternate key meaning it can also serve the purpose of identifying a record uniquely in the table.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-2937877771887841861?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/JnMd_X9awEo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/2937877771887841861/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2009/07/difference-between-primary-key-and.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/2937877771887841861?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/2937877771887841861?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/JnMd_X9awEo/difference-between-primary-key-and.html" title="Difference between Primary Key and Unique Index" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2009/07/difference-between-primary-key-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEERH46fCp7ImA9WxJbEUU.&quot;"><id>tag:blogger.com,1999:blog-7894924256765805695.post-1456107410690282374</id><published>2009-07-21T19:39:00.000+06:00</published><updated>2009-07-21T19:40:05.014+06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-21T19:40:05.014+06:00</app:edited><title>Sql Server and Database Posts</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_hX2oUj2Ww4GVcC9G5IwckVB0Xw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_hX2oUj2Ww4GVcC9G5IwckVB0Xw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_hX2oUj2Ww4GVcC9G5IwckVB0Xw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_hX2oUj2Ww4GVcC9G5IwckVB0Xw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Post Sql Server and Database related posts here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894924256765805695-1456107410690282374?l=sqltrends.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/sRFCf/~4/gOCj1vNaM_4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sqltrends.blogspot.com/feeds/1456107410690282374/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sqltrends.blogspot.com/2009/07/sql-server-and-database-posts.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/1456107410690282374?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7894924256765805695/posts/default/1456107410690282374?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/sRFCf/~3/gOCj1vNaM_4/sql-server-and-database-posts.html" title="Sql Server and Database Posts" /><author><name>Zafar Iqbal</name><uri>http://www.blogger.com/profile/07898303940410405474</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="23" height="32" src="http://3.bp.blogspot.com/_7Yu8JBHb4QM/SrHm1XJKj5I/AAAAAAAAAAY/z53--lm1mNk/S220/zafar.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://sqltrends.blogspot.com/2009/07/sql-server-and-database-posts.html</feedburner:origLink></entry></feed>

