<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-4349279927384911792</atom:id><lastBuildDate>Mon, 27 Dec 2010 10:16:26 +0000</lastBuildDate><title>Tech Tips</title><description>SQL Server tips and tricks.Discover your code online.Share with us.All things about .net.Your search ends here....</description><link>http://sourcecodeforum.blogspot.com/</link><managingEditor>noreply@blogger.com (Chauthi Drishti)</managingEditor><generator>Blogger</generator><openSearch:totalResults>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-8529025388165926158</guid><pubDate>Mon, 27 Dec 2010 09:00:00 +0000</pubDate><atom:updated>2010-12-27T01:01:56.147-08:00</atom:updated><title>Free calling in Gmail extended through 2011</title><description>&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 15px; "&gt;When we launched &lt;a href="http://gmailblog.blogspot.com/2010/08/call-phones-from-gmail.html"&gt;calling in Gmail&lt;/a&gt; back in August, we wanted it to be easy and affordable, so we made calls to the U.S. and Canada free for the rest of 2010. In the spirit of holiday giving and to help people keep in touch in the new year, we're extending free calling for all of 2011.&lt;br&gt;  &lt;br&gt;In case you haven't tried it yet, dialing a phone number works just like a regular phone. Look for "Call phone" at the top of your Gmail chat list and dial a number or enter a contact's name.&lt;br&gt;&lt;br&gt;&lt;a href="http://www.google.com/chat/voice/images/gmail_voice_screenshot.png"&gt;&lt;img src="http://www.google.com/chat/voice/images/gmail_voice_screenshot.png" border="0" alt="" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "&gt;&lt;/a&gt;&lt;br&gt;  To learn more, visit &lt;a href="http://www.google.com/chat/voice/"&gt;gmail.com/call&lt;/a&gt;. Calling in Gmail is currently only available to U.S. based Gmail users.&lt;br&gt;&lt;br&gt;Happy New Year and happy calling!&lt;/span&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-8529025388165926158?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/12/free-calling-in-gmail-extended-through.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-2847752061863110833</guid><pubDate>Thu, 18 Nov 2010 19:54:00 +0000</pubDate><atom:updated>2010-11-18T11:54:14.125-08:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>General SQL Server Performance Tuning Tip</category><title>General SQL Server Performance Tuning Tips</title><description>&lt;h1 style="color: black; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: bold; font: normal normal bold 5.5em/normal Verdana, sans-serif; letter-spacing: 0px; line-height: 19px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 9px; padding-left: 9px; padding-right: 9px; padding-top: 9px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana, Arial, sans-serif; font-size: 12px; font-weight: normal;"&gt;When your transaction log grows large and you want a quick way to shrink it, try this option. Change the database recovery mode of the database you want to shrink from “full” to "simple," then truncate the log file by performing a full backup of the database, then switch back to the “full” recovery mode. By temporally changing from the Full recovery model to the Simple recovery mode, and then back, SQL Server will only keep the "active" portion of the log, which is very small. [7.0, 2000, 2005] Contributed by Tom Kitta. Updated 5-7-2007&lt;/span&gt;&lt;/h1&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;*****&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;If you need to delete all the rows in a table, don't use DELETE to delete them, as the DELETE statement is a logged operation and can take a significant amount of time, especially if the table is large. To perform the same task much faster, use the TRUNCATE TABLE instead, which is not a logged operation. Besides deleting all of the records in a table, this command will also reset the seed of any IDENTITY column back to its original value.&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;After you have run the TRUNCATE TABLE statement, it is important then to manually update the statistics on this table using UPDATE STATISTICS. This is because running TRUNCATE TABLE will not reset the statistics for the table, which means that as you add data to the table, the statistics for that table will be incorrect for a time period. Of course, if you wait long enough, and if you have Auto Update Statistics turned on for the database, then the statistics will eventually catch up with themselves. But this may not happen quickly, resulting in slowly performing queries because the Query Optimizer is using out-of-date statistics. [6.5, 7.0, 2000, 2005] Updated 5-7-2007&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;*****&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;If you use TRUNCATE TABLE instead of DELETE to remove all of the rows of a table, TRUNCATE TABLE will not work when there are Foreign Key references present for that table. A workaround is to DROP the constraints before firing the TRUNCATE. Here's a generic script that will drop all existing Foreign Key constraints on a specific table:&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;CREATE TABLE dropping_constraints&lt;br /&gt;(&lt;br /&gt;cmd VARCHAR(8000)&lt;br /&gt;)&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;INSERT INTO dropping_constraints&lt;br /&gt;SELECT&lt;br /&gt;'ALTER TABLE [' +&lt;br /&gt;t2.Table_Name +&lt;br /&gt;'] DROP CONSTRAINT ' +&lt;br /&gt;t1.Constraint_Name&lt;br /&gt;FROM&lt;br /&gt;INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS t1&lt;br /&gt;INNER JOIN&lt;br /&gt;INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE t2&lt;br /&gt;ON&lt;br /&gt;t1.CONSTRAINT_NAME = t2.CONSTRAINT_NAME&lt;br /&gt;WHERE t2.TABLE_NAME='your_tablename_goes_here'&lt;br /&gt;DECLARE @stmt VARCHAR(8000)&lt;br /&gt;DECLARE @rowcnt INT&lt;br /&gt;SELECT TOP 1 @stmt=cmd FROM dropping_constraints&lt;br /&gt;SET @rowcnt=@@ROWCOUNT&lt;br /&gt;WHILE @rowcnt&amp;lt;&amp;gt;0&lt;br /&gt;BEGIN&lt;br /&gt;EXEC (@stmt)&lt;br /&gt;SET @stmt = 'DELETE FROM dropping_constraints WHERE cmd ='+ QUOTENAME(@stmt,'''')&lt;br /&gt;EXEC (@stmt)&lt;br /&gt;SELECT TOP 1 @stmt=cmd FROM dropping_constraints&lt;br /&gt;SET @rowcnt=@@ROWCOUNT&lt;br /&gt;END&lt;br /&gt;DROP TABLE dropping_constraints&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;The above code can also be extended to drop all FK constraints in the current database. To achieve this, just comment the WHERE clause. [7.0, 2000] Updated 5-7-2007&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;*****&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;Don't run a screensaver on your production SQL Servers, it can unnecessarily use CPU cycles that should be going to your application. The only exception to this is the "blank screen" screensaver, which is OK to use. [6.5, 7.0, 2000, 2005] Updated 5-7-2007&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;*****&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;Don't run SQL Server on the same physical server that you are running Terminal Services, or Citrix software. Both Terminal Services and Citrix are huge resource hogs, and will significantly affect the performance of SQL Server. Running the administrative version of Terminal Services on a SQL Server physical server, on the other hand, is OK, and a good idea from a convenience point of view. As is mentioned in other parts of this website, ideally, SQL Server should run on a dedicated physical server. But if you have to share a SQL Server with another application, make sure it is not Terminal Services or Citrix. [7.0, 2000, 2005] Updated 5-7-2007&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;*****&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;Use sp_who or sp_who2 (sp_who2 is not documented in the SQL Server Books Online, but offers more details than sp_who) to provide locking and performance-related information about current connections to SQL Server. Sometimes, when SQL Server is very busy, you can't use Enterprise Manager or Management Studio to view current connection activity via the GUI, but you can always use these two commands from Query Analyzer or Management Studio, even when SQL Server is very busy. [6.5, 7.0, 2000, 2005] Updated 5-7-2007&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;*****&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;SQL Server 7.0 and 2000 use its own internal thread scheduler (called the UMS) when running in either native thread mode or in fiber mode. By examining the UMS's Scheduler Queue Length, you can help determine whether or not that the CPU or CPUs on the server are presenting a bottleneck.&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;This is similar to checking the System Object: Processor Queue Length in Performance Monitor. If you are not familiar with this counter, what this counter tells you is how many threads are waiting to be executed on the server. Generally, if there are more than two threads waiting to be executed on a server, then that server can be assumed to have a CPU bottleneck.&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;The advantage of using the UMS's Schedule Queue Length over the System Object: Processor Queue Length is that it focuses strictly on SQL Server threads, not all of the threads running on a server.&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;To view what is going on inside the UMS, you can run the following undocumented command:&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;DBCC SQLPERF(UMSSTATS)&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;For every CPU in your server, you will get Scheduler. Each Scheduler will be identified with a number, starting with 0. So if you have four CPUs in your server, there will be four Schedulers listed after running the above command, Schedulers ID 0 through 3.&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;The "num users" tells you the number of SQL threads there are for a specific scheduler.&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;The "num runnable," or better known as the "Scheduler Queue Length," is the key indicator to watch. Generally, this number will be 0, which indicates that there are no SQL Server threads waiting to run. If this number is 2 or more, this indicates a possible CPU bottleneck on the server. Keep in mind that the values presented by this command are point data, which means that the values are only accurate for the split second when they were captured, and will be always changing. But if you run this command when the server is very busy, the results should be indicative of what is going on at that time. You may want to run this command multiple time to see what is going on over time.&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;The "num workers" refers to the actual number of worker threads there are in the thread pool.&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;The "idle workers" refers to the number of idle worker threads.&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;The "cntxt switches" refers to the number of context switches between runnable threads.&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;The "cntxt switches(idle)" refers to the number of context switches to "idle" threads.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-2847752061863110833?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/11/general-sql-server-performance-tuning.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-3925417321450432104</guid><pubDate>Thu, 18 Nov 2010 19:52:00 +0000</pubDate><atom:updated>2010-11-18T11:52:30.009-08:00</atom:updated><title>Denormalization in SQL Server for Fun and Profit</title><description>&lt;h1 style="color: black; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: bold; font: normal normal bold 5.5em/normal Verdana, sans-serif; letter-spacing: 0px; line-height: 19px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 9px; padding-left: 9px; padding-right: 9px; padding-top: 9px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana, Arial, sans-serif; font-size: 12px; font-weight: normal;"&gt;Almost from birth, database developers are taught that their databases must be normalized. &amp;nbsp;In many shops, failing to fully normalize can result in anything from public ridicule to exile to the company’s Siberian office. &amp;nbsp;Rarely discussed are the significant benefits that can accrue from intentionally denormalizing portions of a database schema.&amp;nbsp; Myths about denormalization abound, such as:&lt;/span&gt;&lt;/h1&gt;&lt;ul style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;&lt;li&gt;A normalized schema is always more stable and maintainable than a denormalized one.&lt;/li&gt;&lt;li&gt;The only benefit of denormalization is increased performance.&lt;/li&gt;&lt;li&gt;The performance increases from denormalization aren’t worth the drawbacks.&lt;/li&gt;&lt;/ul&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;This article will address the first two points (I’ll tackle the final point in the second part of this series).&amp;nbsp; Other than for increased performance, when might you want to intentionally denormalize your structure?&amp;nbsp; A primary reason is to “future-proof” your application from changes in business logic that would force significant schema modifications.&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;Let’s look at a simple example.&amp;nbsp; You’re designing a database for a pizza store.&amp;nbsp; Each customer’s order contains one or more pizzas, and each order is assigned to a delivery driver. &amp;nbsp;In normal form, your schema looks like:&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-bottom-width: medium; border-collapse: collapse; border-color: initial; border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px; margin-left: 9.9pt;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="background-attachment: scroll; background-clip: initial; background-color: #e5e5e5; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 135pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;strong&gt;Table: Orders&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 135pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Customer&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 135pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Driver&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 135pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Amount&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-bottom-width: medium; border-collapse: collapse; border-color: initial; border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px; margin-left: 9.9pt;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="background-attachment: scroll; background-clip: initial; background-color: #e5e5e5; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 135pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;strong&gt;Table: OrderItems&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 135pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Order&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 135pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Pizza Type&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;&lt;em&gt;Planning Ahead.&lt;/em&gt;&amp;nbsp; Let’s say you’ve heard the owner is considering a new delivery model.&amp;nbsp; To increase customer satisfaction, every pizza will be boxed and sent for delivery the moment it comes out of the oven- even if other pizzas in the order are still baking.&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;Since you’re a savvy developer, you plan for this and denormalize your data structure.&amp;nbsp; Though&lt;em&gt;today&lt;/em&gt;, the driver column is functionally dependent only on the order itself, you cross your fingers, take a deep breath, and violate Second Normal Form by placing it in the&amp;nbsp;&lt;em&gt;OrderItems&lt;/em&gt;&amp;nbsp;table.&amp;nbsp; There—you’ve just future-proofed your application.&amp;nbsp;&amp;nbsp; Orders can now have multiple drivers.&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;Your denormalization has introduced a small update anomaly (if an order’s driver changes, you have to update multiple rows, rather than just one) but if the probability of the delivery model change is large, this is well worth the cost.&amp;nbsp; &amp;nbsp;This is typical when denormalizing, but usually it’s a small problem, and one that can be handled automatically via triggers, constraints, or other means..&amp;nbsp;&amp;nbsp; For instance, in this case, you can create (or modify the existing) update SP for&amp;nbsp;&lt;em&gt;Orders&lt;/em&gt;&amp;nbsp;to cascade the change into&amp;nbsp;&lt;em&gt;OrderItems&lt;/em&gt;.&amp;nbsp; Alternatively, you can create an UPDATE trigger on OrderItems that ensures all rows within one order have the same driver.&amp;nbsp; When the rule changes in the future, just remove the trigger—no need to update your tables or any queries that reference them.&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;Now let’s consider a slightly more complex (and somewhat more realistic) case.&amp;nbsp;&amp;nbsp; Imagine an application to manage student and teacher assignments for an elementary school.&amp;nbsp;&amp;nbsp;&amp;nbsp; A sample schema might be:&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-bottom-width: medium; border-collapse: collapse; border-color: initial; border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px; margin-left: 5.4pt;"&gt;&lt;tbody&gt;&lt;tr style="page-break-inside: avoid;"&gt;&lt;td style="background-attachment: scroll; background-clip: initial; background-color: #e5e5e5; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;strong&gt;Table: Teachers&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid;"&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Teacher (PK)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid;"&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Classroom&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-bottom-width: medium; border-collapse: collapse; border-color: initial; border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px; margin-left: 5.4pt;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="background-attachment: scroll; background-clip: initial; background-color: #e5e5e5; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;strong&gt;Table: Students&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Student (PK)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Teacher (FK)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;&lt;em&gt;Planning Ahead.&lt;/em&gt;&amp;nbsp; You happen to know that other elementary schools in the region are assigning secondary teachers to some classrooms.&amp;nbsp; You decide to support this in advance within your schema.&amp;nbsp; How would you do it via denormalization?&amp;nbsp; The ugly “repeating groups” solution of adding a “Teacher2” column is one solution, but not one that should appeal to you.&amp;nbsp;&amp;nbsp;&amp;nbsp; Far better to make the classroom itself the primary key, and move teachers to a child table:&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-bottom-width: medium; border-collapse: collapse; border-color: initial; border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px; margin-left: 5.4pt;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="background-attachment: scroll; background-clip: initial; background-color: #e5e5e5; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;strong&gt;Table: Classrooms&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Classroom&amp;nbsp; (PK)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Teacher&amp;nbsp; (FK)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-bottom-width: medium; border-collapse: collapse; border-color: initial; border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px; margin-left: 5.4pt;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="background-attachment: scroll; background-clip: initial; background-color: #e5e5e5; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;strong&gt;Table: Teachers&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Teacher&amp;nbsp; (PK)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Classroom&amp;nbsp; (FK)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-bottom-width: medium; border-collapse: collapse; border-color: initial; border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px; margin-left: 5.4pt;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="background-attachment: scroll; background-clip: initial; background-color: #e5e5e5; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;strong&gt;Table: Students&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Student&amp;nbsp; (PK)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-style: solid; border-bottom-width: 1pt; border-left-style: solid; border-left-width: 1pt; border-right-style: solid; border-right-width: 1pt; border-top-style: none; border-top-width: medium; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 139.5pt;" valign="top"&gt;&lt;div style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Classroom&amp;nbsp; (FK)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;As before, this denormalization creates a problem we need to address.&amp;nbsp; In the future, the school may support multiple teachers in one classroom, but&amp;nbsp;&lt;strong&gt;&lt;em&gt;today&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;that’s an error.&amp;nbsp;&amp;nbsp; You solve that by the simple expedient of adding a unique constraint on the classroom FK in the teacher’s table.&amp;nbsp;&amp;nbsp;&amp;nbsp; When the business rule changes in the future, you simply remove the constraint.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;Voila&lt;/em&gt;!&amp;nbsp; A far better solution than having to significantly alter your views, queries, and stored procs to conform to a new schema.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: verdana, Arial, sans-serif; font-size: 12px; line-height: 19px;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-3925417321450432104?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/11/denormalization-in-sql-server-for-fun.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-6969248228057637643</guid><pubDate>Tue, 24 Aug 2010 04:49:00 +0000</pubDate><atom:updated>2010-08-23T21:52:49.761-07:00</atom:updated><title>Understanding Common Type System in .NET Framework</title><description>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As .Net Framework         is language independent and support over 20 different programming languages,         many programmers will write data types in their own programming language.         &lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana; font-size: x-small;"&gt;&lt;/span&gt;         &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;"&gt; For example,         an integer variable in C# is written as int, whereas in Visual Basic it         is written as integer. Therefore in .Net Framework you have single class         called System.Int32 to interpret these variables. Similarly, for the ArrayList         data type .Net Framework has a common type called System.Collections.ArrayList.         In .Net Framework, System.Object is the common base type from where all         the other types are derived.&lt;/span&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;span style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This system         is called Common Type System. The types in .NET Framework are the base         on which .NET applications, components, and controls are built. Common         Type System in .Net Framework defines how data types are going to be declared         and managed in runtime. The Common Type System performs the following         functions:&amp;nbsp;&lt;/span&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;b&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;"&gt;• Automatically         adapts itself in a framework that enables integration of multiple languages,         type safety, and high performance code execution.&lt;br /&gt;• Provides an object-oriented model. &lt;br /&gt;• Standardizes the conventions that all the languages must follow.&lt;br /&gt;• Invokes security checks.&lt;br /&gt;• Encapsulates data structures.&lt;/span&gt;&lt;/b&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 style="text-align: justify;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;"&gt;There are         two general types of categories in .Net Framework that Common Type System         support. They are value types and reference types. Value types contain         data and are user-defined or built-in. they are placed in a stack or in         order in a structure. Reference types store a reference of the value’s         memory address. They are allocated in a heap structure. You can determine         the type of a reference by the values of self-describing types. Reference         types can be categorized into self-describing types, pointer types, or         interface types. &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;"&gt;There are         many other types that can be defined under Value types and Reference types.         In .Net Framework, the System namespace is the root for all the data types.         This namespace consists of classes such as Object, Byte, String, and Int32         that represents base data types. These base data types are used by all         applications. During runtime a type name can be classified into two: the         assembly name and the type’s name within the assembly. The runtime         in .Net Framework uses assemblies to find and load types....&lt;/span&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;span style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;"&gt;Refernece: &amp;nbsp; ht&lt;a href="tp://www.dotnet-guide.com/commontype.html%20"&gt;tp://www.dotnet-guide.com/commontype.html &lt;/a&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/4349279927384911792-6969248228057637643?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/08/understanding-common-type-system-in-net.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-2128320112385170250</guid><pubDate>Fri, 30 Jul 2010 09:34:00 +0000</pubDate><atom:updated>2010-07-30T02:34:08.438-07:00</atom:updated><title>How to configure dbmail in sql server 2005 and 2008</title><description>&lt;div style="text-align: justify;"&gt;&lt;b&gt;Step 1) Create Profile and Account:&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You need to create a profile and account  using the Configure Database Mail Wizard which can be accessed from the &lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Configure Database Mail context menu of the Database Mail node in  Management Node. &lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This wizard is used to manage accounts, profiles, and  Database Mail global settings which are shown below:&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_TvY772-b-r0/TFKbUijJbcI/AAAAAAAAA9g/KFVgIBpsCn8/s1600/1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://4.bp.blogspot.com/_TvY772-b-r0/TFKbUijJbcI/AAAAAAAAA9g/KFVgIBpsCn8/s640/1.png" width="582" /&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/_TvY772-b-r0/TFKb6fxBGqI/AAAAAAAAA-Q/6DaXMawmTQA/s1600/7.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/_TvY772-b-r0/TFKb6fxBGqI/AAAAAAAAA-Q/6DaXMawmTQA/s640/7.png" width="640" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_TvY772-b-r0/TFKbcESUD7I/AAAAAAAAA9o/w60EVgKwPJ4/s1600/2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_TvY772-b-r0/TFKbcESUD7I/AAAAAAAAA9o/w60EVgKwPJ4/s1600/2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="502" src="http://1.bp.blogspot.com/_TvY772-b-r0/TFKbcESUD7I/AAAAAAAAA9o/w60EVgKwPJ4/s640/2.png" width="640" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_TvY772-b-r0/TFKbiwth2BI/AAAAAAAAA9w/mCFgLzDRHBA/s1600/3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_TvY772-b-r0/TFKbtXZHugI/AAAAAAAAA-A/N7uUBD7qXo0/s1600/5.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="532" src="http://1.bp.blogspot.com/_TvY772-b-r0/TFKbtXZHugI/AAAAAAAAA-A/N7uUBD7qXo0/s640/5.png" width="640" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_TvY772-b-r0/TFKboe2Vg8I/AAAAAAAAA94/E_Qrz71EVwk/s1600/4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/_TvY772-b-r0/TFKboe2Vg8I/AAAAAAAAA94/E_Qrz71EVwk/s640/4.png" width="640" /&gt;&lt;/a&gt;&lt;img border="0" height="640" src="http://1.bp.blogspot.com/_TvY772-b-r0/TFKbiwth2BI/AAAAAAAAA9w/mCFgLzDRHBA/s640/3.png" width="640" /&gt;&lt;a href="http://2.bp.blogspot.com/_TvY772-b-r0/TFKbzf3UjlI/AAAAAAAAA-I/iH7h6Izhf9A/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/_TvY772-b-r0/TFKbzf3UjlI/AAAAAAAAA-I/iH7h6Izhf9A/s640/6.png" width="640" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_TvY772-b-r0/TFKcBdr_AxI/AAAAAAAAA-Y/aBShbSN_r9o/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://1.bp.blogspot.com/_TvY772-b-r0/TFKcBdr_AxI/AAAAAAAAA-Y/aBShbSN_r9o/s640/8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Step 3) Send Email:&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;After all configurations are done, we  are now ready to send an email. To send mail, &lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;we need to execute a  stored procedure sp_send_dbmail and provide the required parameters as  shown below:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;code style="font-size: 12px;"&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;code style="font-size: 12px;"&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="http://1.bp.blogspot.com/_TvY772-b-r0/TFKcHA1IB-I/AAAAAAAAA-g/MFe0o4Y4LZM/s1600/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="222" src="http://1.bp.blogspot.com/_TvY772-b-r0/TFKcHA1IB-I/AAAAAAAAA-g/MFe0o4Y4LZM/s640/10.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-2128320112385170250?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/07/how-to-configure-dbmail-in-sql-server.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_TvY772-b-r0/TFKbUijJbcI/AAAAAAAAA9g/KFVgIBpsCn8/s72-c/1.png' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-5365400343091025336</guid><pubDate>Fri, 30 Jul 2010 09:00:00 +0000</pubDate><atom:updated>2010-07-30T02:00:01.311-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>.net decoder</category><category domain='http://www.blogger.com/atom/ns#'>Exe Decompiler</category><category domain='http://www.blogger.com/atom/ns#'>.net Decompiler</category><title>How to decompile .net DLL or EXE</title><description>&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;DIS#&lt;/b&gt; is better &lt;b&gt;decompiler &lt;/b&gt;for .net.You can get back your code within few minutes by using dis#.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;Before purchase dis# take a trial for this.If you need full version of with lifetime membership dis# then please send me a mail to at mangeshgangwar@gmail.com.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;Features of dis# &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;    &lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;a href="http://netdecompiler.com/download/DisSharp.zip"&gt;&lt;b&gt;Download DIS# from Here&lt;/b&gt;&lt;/a&gt; &amp;nbsp; &amp;nbsp;    &lt;/div&gt;&lt;ul style="font-family: Verdana,sans-serif;"&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;Internal editor for quick editing&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;img src="http://netdecompiler.com/images/code1.gif" /&gt;&lt;/span&gt;  &lt;span style="font-size: x-small;"&gt;&lt;br /&gt;Type new name and press Enter: &lt;br /&gt;&lt;img src="http://netdecompiler.com/images/code2.gif" /&gt;&lt;/span&gt;  &lt;span style="font-size: x-small;"&gt;&lt;br /&gt;The typical problem with decompilation is the absence of full source information in the executable file. For instance, .NET assembly does not contains names of local variables. Program can automatically assign local names in accordance with their types (what Dis# is really do), but it still too differentiates with the original source. &lt;br /&gt;&lt;br /&gt;Dis# makes next logical step in this direction. You can edit the names and keep the changes in a project file. ( see &lt;a href="http://netdecompiler.com/screen.html"&gt;&lt;b&gt;screenshot&lt;/b&gt;&lt;/a&gt; ) &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://netdecompiler.com/download/DisSharp.zip"&gt;&lt;b&gt;Download DIS# from Here&lt;/b&gt;&lt;/a&gt; &amp;nbsp; &amp;nbsp;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;Dis# project file&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Dis# have it's own metadata structure, which expands PE metadata structure with all necessary for decompilation information, such as local variable names. You can save Dis# metadata in the project file (extension .dis) and keep all changes. &lt;/span&gt; &lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;Decompilation Speed&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Custom metadata provides outstanding decompilation speed, which 25-700 times faster then have other .NET decompilers. Dis# decompiles more then 2000 methods per second. &lt;/span&gt; &lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;Multiple Languages decompilation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Support for C#, Visual Basic.NET, Delphi.NET and Chrome. &lt;/span&gt; &lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;Well formed code&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Dis# generates code, which is look like the human edited. Dis# .net decompiler have many options to adjust code view for your preferences. &lt;/span&gt; &lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;Optimization&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Dis# optimize code. &lt;/span&gt; &lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;.NET 2.0 support&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Dis# support .NET 2.0 assembly format, generics etc. &lt;/span&gt; &lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;Raw Code&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In some cases you have to view raw code (before high level decompilation algorithms processing). &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;img height="480" src="http://netdecompiler.com/images/screen.gif" width="640" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://netdecompiler.com/download/DisSharp.zip"&gt;&lt;b&gt;Download DIS# from Here&lt;/b&gt;&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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/4349279927384911792-5365400343091025336?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/07/how-to-decompile-net-dll-or-exe.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-6161268325138161264</guid><pubDate>Fri, 30 Jul 2010 08:41:00 +0000</pubDate><atom:updated>2010-07-30T01:41:00.491-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>.net 4.0</category><category domain='http://www.blogger.com/atom/ns#'>Windows Communication foundation</category><category domain='http://www.blogger.com/atom/ns#'>WCF</category><title>Windows Communication Foundation</title><description>&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;table border="0" cellpadding="0" class="FeaturedHeadlinesTable" style="font-family: Verdana,sans-serif;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="ImageHeadlineTabelCell" id="ctl00_mainContentContainer_ctl06_ctl47"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="FeaturedRssItemTableCell"&gt;&lt;div class="FVB_ImageHeadlinesDiv" id="ctl00_mainContentContainer_ctl06_ctl05"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="color: #666666; font-style: italic; line-height: 18pt;"&gt;Windows communication Foundation a  part of the .NET Framework that provides a unified programming model  for building service-oriented applications that communicate  across the web and the enterprise.&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;&lt;a href="http://msdn.microsoft.com/library/ee958158.aspx" id="ctl00_mainContentContainer_ctl01" onclick="javascript:Track('ctl00_mainContentContainer_ctl00|ctl00_mainContentContainer_ctl01',this);window.open(this.href);return false;"&gt;Read the WCF whitepaper&lt;/a&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" class="FeaturedHeadlinesTable" style="font-family: Verdana,sans-serif;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="FeaturedRssItemTableCell"&gt;&lt;div class="FVB_ImageHeadlinesDiv" id="ctl00_mainContentContainer_ctl06_ctl41"&gt;          &lt;a href="http://i.msdn.microsoft.com/ee402630.Download_lg%28en-us,MSDN.10%29.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img alt="Visual Studio 2010 and .NET Framework 4 are Here!" border="0" src="http://i.msdn.microsoft.com/ee402630.Download_lg%28en-us,MSDN.10%29.png" /&gt;&lt;/a&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;&lt;a class="FeatureHeadlinesTitle" href="http://go.microsoft.com/fwlink/?LinkID=186913" id="ctl00_mainContentContainer_ctl06_ctl42" onclick="javascript:Track('ctl00_mainContentContainer_ctl06_ctl41|ctl00_mainContentContainer_ctl06_ctl42',this);" title="Visual Studio 2010 and .NET Framework 4 are Here!"&gt;Visual Studio 2010 and .NET Framework 4 are Here!&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="BasicHeadlinesDescLabelCssClass"&gt;Visual Studio 2010 and .NET Framework 4 mark the next generation of developer tools from Microsoft. Check it out!&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="FVB_ImageHeadlinesDiv" id="ctl00_mainContentContainer_ctl06_ctl41"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="BasicHeadlinesDescLabelCssClass"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="FVB_ImageHeadlinesDiv" id="ctl00_mainContentContainer_ctl06_ctl41"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="BasicHeadlinesDescLabelCssClass"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;&lt;a href="http://wm.microsoft.com/ms/msdn/netframework/introwcf.wmv" id="ctl00_mainContentContainer_ctl02" onclick="javascript:Track('ctl00_mainContentContainer_ctl00|ctl00_mainContentContainer_ctl02',this);window.open(this.href);return false;"&gt;Watch a short video&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;table align="center" border="0" cellpadding="0" cellspacing="5" style="text-align: center;"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td width="150"&gt;&lt;span style="font-size: x-small;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/netframework/dd936009.aspx" id="ctl00_mainContentContainer_ctl03" onclick="javascript:Track('ctl00_mainContentContainer_ctl00|ctl00_mainContentContainer_ctl03',this);"&gt;&lt;img alt="Download from here" height="128" src="http://i.msdn.microsoft.com/aa663324.Software%20box%20retail%20DVD%20package%28en-us,MSDN.10%29.png" width="128" /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;G&lt;span id="goog_199470012"&gt;&lt;/span&gt;&lt;span id="goog_199470013"&gt;&lt;/span&gt;e&lt;span id="goog_199470016"&gt;&lt;/span&gt;&lt;span id="goog_199470017"&gt;&lt;/span&gt;t it&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;td width="150"&gt;&lt;span style="font-size: x-small;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/netframework/dd939784.aspx" id="ctl00_mainContentContainer_ctl04" onclick="javascript:Track('ctl00_mainContentContainer_ctl00|ctl00_mainContentContainer_ctl04',this);"&gt;&lt;img alt="Get Started " height="128" src="http://i.msdn.microsoft.com/aa663324.subject%20book%28en-us,MSDN.10%29.png" width="128" /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Beginner's Guide&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;td width="150"&gt;&lt;span style="font-size: x-small;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/netframework/dd939788.aspx" id="ctl00_mainContentContainer_ctl05" onclick="javascript:Track('ctl00_mainContentContainer_ctl00|ctl00_mainContentContainer_ctl05',this);"&gt;&lt;img alt="Learn more" height="128" src="http://i.msdn.microsoft.com/aa663324.multi%20tool%20pocket%20knife%20tool%28en-us,MSDN.10%29.png" width="128" /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Learn more&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="FVB_ImageHeadlinesDiv" id="ctl00_mainContentContainer_ctl06_ctl05"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;&lt;a class="FeatureHeadlinesTitle" href="http://msdn.microsoft.com/en-us/library/ff842400.aspx" id="ctl00_mainContentContainer_ctl06_ctl06" onclick="javascript:Track('ctl00_mainContentContainer_ctl06_ctl05|ctl00_mainContentContainer_ctl06_ctl06',this);" title="WS-* Interoperability between WCF and Metro"&gt;WS&amp;nbsp; Interoperability between WCF and Metro&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="BasicHeadlinesDescLabelCssClass"&gt;Information  for .NET Framework and Java Metro developers on creating  standards-based Web Services that enable communication between the two  platforms. Demonstrates interoperability across a range of WS-I and  other scenarios.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="FVB_ImageHeadlinesDiv" id="ctl00_mainContentContainer_ctl06_ctl05"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="BasicHeadlinesDescLabelCssClass"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;         &lt;/div&gt;&lt;/td&gt;        &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="ColumnDiv" style="font-family: Verdana,sans-serif;"&gt;      &lt;div class="ItemDiv" style="width: 99%;"&gt;       &lt;table border="0" cellpadding="0" class="FeaturedHeadlinesTable"&gt;&lt;tbody&gt;&lt;tr&gt;         &lt;td class="ImageHeadlineTabelCell" id="ctl00_mainContentContainer_ctl06_ctl50"&gt;&lt;span style="font-size: x-small;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/netframework/webservicesinterop.aspx" id="ctl00_mainContentContainer_ctl06_ctl13" onclick="javascript:Track('ctl00_mainContentContainer_ctl06_ctl50|ctl00_mainContentContainer_ctl06_ctl13',this);" title="New Web Service Interoperability with WCF page on MSDN"&gt;  &lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class="FeaturedRssItemTableCell"&gt;&lt;div class="FVB_ImageHeadlinesDiv" id="ctl00_mainContentContainer_ctl06_ctl14"&gt;          &lt;span style="font-size: x-small;"&gt;&lt;b&gt;&lt;a class="FeatureHeadlinesTitle" href="http://msdn.microsoft.com/en-us/netframework/webservicesinterop.aspx" id="ctl00_mainContentContainer_ctl06_ctl15" onclick="javascript:Track('ctl00_mainContentContainer_ctl06_ctl14|ctl00_mainContentContainer_ctl06_ctl15',this);" title="New Web Service Interoperability with WCF page on MSDN"&gt;New Web Service Interoperability with WCF page on MSDN&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="BasicHeadlinesDescLabelCssClass"&gt;         We've just released a new page on MSDN where you can get all  kinds of information about WS-* interoperability with WCF - How-To White  Papers, case studies, and news about Microsoft’s web service  interoperability efforts.       &lt;/span&gt;&lt;/span&gt;         &lt;/div&gt;&lt;/td&gt;        &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="ColumnDiv" style="font-family: Verdana,sans-serif;"&gt;      &lt;div class="ItemDiv" style="width: 99%;"&gt;       &lt;table border="0" cellpadding="0" class="FeaturedHeadlinesTable"&gt;&lt;tbody&gt;&lt;tr&gt;         &lt;td class="ImageHeadlineTabelCell" id="ctl00_mainContentContainer_ctl06_ctl53"&gt;&lt;span style="font-size: x-small;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff709807.aspx" id="ctl00_mainContentContainer_ctl06_ctl22" onclick="javascript:Track('ctl00_mainContentContainer_ctl06_ctl53|ctl00_mainContentContainer_ctl06_ctl22',this);" title="Standards-Based Interoperability between SAP NetWeaver and Microsoft .NET Framework"&gt;  &lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class="FeaturedRssItemTableCell"&gt;&lt;div class="FVB_ImageHeadlinesDiv" id="ctl00_mainContentContainer_ctl06_ctl23"&gt;          &lt;span style="font-size: x-small;"&gt;&lt;b&gt;&lt;a class="FeatureHeadlinesTitle" href="http://msdn.microsoft.com/en-us/library/ff709807.aspx" id="ctl00_mainContentContainer_ctl06_ctl24" onclick="javascript:Track('ctl00_mainContentContainer_ctl06_ctl23|ctl00_mainContentContainer_ctl06_ctl24',this);" title="Standards-Based Interoperability between SAP NetWeaver and Microsoft .NET Framework"&gt;Standards-Based Interoperability between SAP NetWeaver and Microsoft .NET Framework&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="BasicHeadlinesDescLabelCssClass"&gt;         Information for .NET Framework and SAP NetWeaver developers on creating         standards-based Web Services that enable communication between the two platforms.         Demonstrates simple ping/echo scenarios, as well as a complete end-to-end ERP Purchase order application.       &lt;/span&gt;&lt;/span&gt;         &lt;/div&gt;&lt;/td&gt;        &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="ColumnDiv" style="font-family: Verdana,sans-serif;"&gt;      &lt;div class="ItemDiv" style="width: 99%;"&gt;       &lt;table border="0" cellpadding="0" class="FeaturedHeadlinesTable"&gt;&lt;tbody&gt;&lt;tr&gt;         &lt;td class="ImageHeadlineTabelCell" id="ctl00_mainContentContainer_ctl06_ctl56"&gt;&lt;span style="font-size: x-small;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee354381.aspx" id="ctl00_mainContentContainer_ctl06_ctl31" onclick="javascript:Track('ctl00_mainContentContainer_ctl06_ctl56|ctl00_mainContentContainer_ctl06_ctl31',this);" title="A Developer's Introduction to Windows Communication Foundation (WCF) .NET 4"&gt;  &lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class="FeaturedRssItemTableCell"&gt;&lt;div class="FVB_ImageHeadlinesDiv" id="ctl00_mainContentContainer_ctl06_ctl32"&gt;          &lt;span style="font-size: x-small;"&gt;&lt;b&gt;&lt;a class="FeatureHeadlinesTitle" href="http://msdn.microsoft.com/en-us/library/ee354381.aspx" id="ctl00_mainContentContainer_ctl06_ctl33" onclick="javascript:Track('ctl00_mainContentContainer_ctl06_ctl32|ctl00_mainContentContainer_ctl06_ctl33',this);" title="A Developer's Introduction to Windows Communication Foundation (WCF) .NET 4"&gt;A Developer's Introduction to Windows Communication Foundation (WCF) .NET 4&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="BasicHeadlinesDescLabelCssClass"&gt;         An overview of the most important new features and improvements in WCF,         with enough technical detail and code to help you as a developer understand how to use them.         Now updated for the release of .NET 4 and Visual Studio 2010.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="FVB_ImageHeadlinesDiv" id="ctl00_mainContentContainer_ctl06_ctl32"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="BasicHeadlinesDescLabelCssClass"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;         &lt;/div&gt;&lt;/td&gt;        &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" class="FeaturedHeadlinesTable" style="font-family: Verdana,sans-serif;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="ImageHeadlineTabelCell" id="ctl00_mainContentContainer_ctl06_ctl59"&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class="FeaturedRssItemTableCell"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-6161268325138161264?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/07/windows-communication-foundation.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-7976478051420516730</guid><pubDate>Fri, 30 Jul 2010 08:29:00 +0000</pubDate><atom:updated>2010-07-30T01:29:14.703-07:00</atom:updated><title>New Social API Web Application Toolkit for .NET Web Developers</title><description>&lt;h5&gt;Latest in this API&lt;br /&gt;&lt;/h5&gt;&lt;p&gt;We've just published an update to our &lt;a href="http://www.microsoft.com/web/webapptoolkits"&gt;Web Application Toolkits!&lt;/a&gt; Here is a summary of web application toolkits:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Its totally free for .net developers.It help &lt;a href="http://ASP.NET"&gt;ASP.NET&lt;/a&gt; web developers complete common web  development tasks and quickly add new features to your apps. Whether  it's Bing Maps integration or adding social capabilities to your site,  there's a toolkit for you. For the full list of Web Application Toolkits  &lt;a href="http://www.microsoft.com/web/webapptoolkits"&gt;check out this website.&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Summary:-&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;Added a new Social API Web Application Toolkit &lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Updated all the WATs to be compatible with Visual Studio 2010 &lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h5&gt;Introducing the Social API Web Application Toolkit&lt;/h5&gt;&lt;p&gt;&lt;a href="http://www.jamessenior.com/image.axd?picture=image_26.png"&gt;&lt;img style="border: 0px none; display: inline;" class="wlDisabledImage" title="image" alt="image" src="http://www.jamessenior.com/image.axd?picture=image_thumb_25.png" border="0" height="305" width="446"&gt;&lt;/a&gt;&lt;/p&gt;&lt;h5&gt;&lt;br /&gt;&lt;/h5&gt;&lt;h6&gt;&lt;br /&gt;&lt;/h6&gt;&lt;p&gt;As  social networking Web sites are becoming more and more popular, users  often want to access simultaneously the different networks they belong  to from one only entry point. For example, one user might want to post  the same message they are posting on your site also on Facebook,  Twitter, MySpace and so on. &lt;/p&gt;&lt;p&gt;Although many of these social  networks provide APIs for accessing their information, you might want to  integrate your Web application with several social sites at the same  time and be able to do this in a consistent manner, without having to go  into numerous modifications in your code with each new social network  that you want to incorporate. &lt;/p&gt;&lt;p&gt;This Web Application Toolkit  provides a generic "Social Networks" API that allows connecting your Web  application with different social networks and managing them through  one entry point with a consistent set of methods. In the Toolkit you'll  find examples of how to use the Social Networks API provided to connect a  Web application with Facebook and Twitter, allowing you to manage the  data provided by these networks in a generic way. &lt;/p&gt;&lt;p&gt;Please notice  that this Toolkit includes examples only for reduced set of operations  (mainly posting status updates) within the two social networks named  before. Through this documentation you'll find instructions on how to  extend this set into more operations and more social networks.&lt;/p&gt;More Details:-&lt;br /&gt;&lt;p&gt;This  toolkit comes with Facebook and Twitter Providers that allow you to  perform tasks against different Social Network APIs in a common way.   For example, Facebook and Twitter do authentication in different ways  which is a pain because you have to write different code for each  network.  The Providers mean that you can call common methods and pass  in which social networks you want to perform the action against – behind  the scenes the providers call the appropriate methods against Facebook  or Twitter to get the job done.  The provider model also makes it easy  to extend the API to other Social Networks in the future – we've  provided detailed instructions on how to do this in the documentation  that comes with the toolkit download – it's in the "next steps" section.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div style="padding: 0px; margin: 0px; display: inline; float: none;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9ad1eb23-b28e-424b-aa8a-f4fdf68d0aba" class="wlWriterEditableSmartContent"&gt;&lt;div class="le-pavsc-container"&gt;&lt;div style="background: none repeat scroll 0% 0% rgb(255, 255, 255); max-height: 400px; overflow: auto;"&gt;&lt;ol style="background: none repeat scroll 0% 0% rgb(255, 255, 255); margin: 0pt; padding: 0pt 0pt 0pt 5px;"&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;ActionResult&lt;/span&gt; NetworkLogin(&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; providerName)&lt;/li&gt;&lt;li class="even"&gt;        {&lt;/li&gt;&lt;li&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; social = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;SocialProxy&lt;/span&gt;();&lt;/li&gt;&lt;li class="even"&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.Redirect(social.GetProvider(providerName).LoginUrl);&lt;/li&gt;&lt;li&gt;        }&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;The  code above shows how you use the SocialProxy class, included in the  toolkit to get the login URL for the given social network.  In this  example we then redirect the user to that URL instead of an MVC view in  our application.&lt;/p&gt;&lt;p&gt;The Social Networks API checks if the user is  already authenticated in the application and if not it authenticates him  by using the &lt;b&gt;FormsAuthentication.SetAuthCookie&lt;/b&gt; method. The API maintains a user repository with the account information for each user's social networks.&lt;/p&gt;&lt;div style="padding: 0px; margin: 0px; display: inline; float: none;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:647ba329-8782-47d1-8c62-b5cb2832d7f0" class="wlWriterEditableSmartContent"&gt;&lt;div class="le-pavsc-container"&gt;&lt;div style="background: none repeat scroll 0% 0% rgb(255, 255, 255); max-height: 500px; overflow: auto;"&gt;&lt;ol style="background: none repeat scroll 0% 0% rgb(255, 255, 255); margin: 0pt; padding: 0pt 0pt 0pt 5px; white-space: nowrap;"&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;bool&lt;/span&gt; Login(&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; providerName, &lt;span style="color: rgb(43, 145, 175);"&gt;HttpContextBase&lt;/span&gt; httpContext)&lt;/li&gt;&lt;li class="even"&gt;        {                        &lt;/li&gt;&lt;li&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; provider = &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.GetProvider(providerName);&lt;/li&gt;&lt;li class="even"&gt;              &lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; identity = provider.GetLoginIdentity(httpContext);&lt;/li&gt;&lt;li&gt;            &lt;/li&gt;&lt;li class="even"&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (identity == &lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;            {&lt;/li&gt;&lt;li class="even"&gt;                &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;false&lt;/span&gt;;&lt;/li&gt;&lt;li&gt;            }&lt;/li&gt;&lt;li class="even"&gt; &lt;/li&gt;&lt;li&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (!httpContext.User.Identity.IsAuthenticated)&lt;/li&gt;&lt;li class="even"&gt;            {&lt;/li&gt;&lt;li&gt;                 &lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; userId = &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.usersRepository.FindIdentity(identity) ?? &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.usersRepository.CreateUser(identity);&lt;/li&gt;&lt;li class="even"&gt;                 &lt;span style="color: rgb(43, 145, 175);"&gt;FormsAuthentication&lt;/span&gt;.SetAuthCookie(userId, &lt;span style="color: rgb(0, 0, 255);"&gt;false&lt;/span&gt;);&lt;/li&gt;&lt;li&gt;            }&lt;/li&gt;&lt;li class="even"&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;/li&gt;&lt;li&gt;            {&lt;/li&gt;&lt;li class="even"&gt;                 &lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; userId = &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.usersRepository.FindIdentity(identity);&lt;/li&gt;&lt;li&gt;                 &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (userId != &lt;a href="http://httpContext.User.Identity.Name"&gt;httpContext.User.Identity.Name&lt;/a&gt;)&lt;/li&gt;&lt;li class="even"&gt;                 {&lt;/li&gt;&lt;li&gt;                     &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.usersRepository.AssociateIdentity(&lt;a href="http://httpContext.User.Identity.Name"&gt;httpContext.User.Identity.Name&lt;/a&gt;, identity);&lt;/li&gt;&lt;li class="even"&gt;                 }&lt;/li&gt;&lt;li&gt;            }&lt;/li&gt;&lt;li class="even"&gt; &lt;/li&gt;&lt;li&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;true&lt;/span&gt;;&lt;/li&gt;&lt;li class="even"&gt;          }&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Notice  that new users do not need to create a separate account when  registering on the Web application. The API stores the user&amp;#39;s Facebook  and Twitter account information, and creates a unique identifier on the  user repository for that user to keep them associated.&lt;/p&gt;&lt;p&gt;The API  stores the user internal identifier together with the login information  for each of its associated social networks, by using the &lt;b&gt;UsersRepository.AssociateIdentity&lt;/b&gt; method.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-7976478051420516730?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/07/new-social-api-web-application-toolkit.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-5203471914536184615</guid><pubDate>Fri, 09 Jul 2010 08:10:00 +0000</pubDate><atom:updated>2010-07-09T01:10:10.333-07:00</atom:updated><title>How to decompile any .net DLL</title><description>&lt;b&gt;How to decompile any .net DLL&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Part -1&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="640" height="385"&gt;&lt;param name="movie" value="http://www.indyarocks.com/videos/embed-480343"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.indyarocks.com/videos/embed-480343" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Part -2&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="640" height="385"&gt;&lt;param name="movie" value="http://www.indyarocks.com/videos/embed-480344"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.indyarocks.com/videos/embed-480344" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Part -3&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="640" height="385"&gt;&lt;param name="movie" value="http://www.indyarocks.com/videos/embed-480345"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.indyarocks.com/videos/embed-480345" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Part -4&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="640" height="385"&gt;&lt;param name="movie" value="http://www.indyarocks.com/videos/embed-480348"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.indyarocks.com/videos/embed-480348" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-5203471914536184615?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/07/how-to-decompile-any-net-dll.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-6392467733256906395</guid><pubDate>Wed, 07 Jul 2010 06:29:00 +0000</pubDate><atom:updated>2010-07-30T01:30:08.133-07:00</atom:updated><title>Find nth Wor from a table in SQL Server or any row from table</title><description>&lt;div style="color: #38761d; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;/***************************&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #38761d; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;FIND NTH ROW FROM A TABLE IN SQL SERVER OR ANY ROW FROM TABLE &lt;/span&gt;&lt;/div&gt;&lt;div style="color: #38761d; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;BY: MANGESH SINGH&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #38761d; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;**********************************/&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #38761d; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;DECLARE &lt;span style="color: black;"&gt;@N&lt;/span&gt; INT&lt;/span&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;DECLARE &lt;span style="color: black;"&gt;@COUNT&lt;/span&gt; INT&lt;/span&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;SET &lt;span style="color: black;"&gt;@N=1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;SELECT &lt;span style="color: black;"&gt;@COUNT=&lt;/span&gt;&lt;span style="color: magenta;"&gt;COUNT(*)&lt;/span&gt; FROM &lt;span style="color: black;"&gt;TBLAGENTEMPLOYEE&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;SELECT *  FROM(SELECT ROW_NUMBER() OVER (ORDER BY AGENTEMPLOYEEID DESC) AS EID,* FROM TBLAGENTEMPLOYEE) AS AGENTEMPLOYEE&lt;/span&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;WHERE EID=@COUNT-@N&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #38761d; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #38761d; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;/***   WHERE NTH=@N   */&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/4349279927384911792-6392467733256906395?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/07/find-nth-wor-from-table-in-sql-server.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-2990692607207322157</guid><pubDate>Sat, 19 Jun 2010 13:35:00 +0000</pubDate><atom:updated>2010-06-19T06:36:08.566-07:00</atom:updated><title>Cursors in SQL Server 2005</title><description>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CMangesh%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C06%5Cclip_filelist.xml"&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;}  /* 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";} h2 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	mso-outline-level:2; 	font-size:18.0pt; 	font-family:"Times New Roman";} h3 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	mso-outline-level:3; 	font-size:13.5pt; 	font-family:"Times New Roman";} pre 	{margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Courier New"; 	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;h2&gt;&lt;u&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Cursors&lt;/span&gt;&lt;/u&gt;&lt;/h2&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;In this article, I want to tell you how to create and use server side cursors and how you can optimize a cursor performance.&lt;br&gt; &lt;br&gt; Cursor is a database object used by applications to manipulate data in a set on a row-by-row basis, instead of the typical SQL commands that operate on all the rows in the set at one time. For example, you can use cursor to include a list of all user databases and make multiple operations against each database by passing each database name as a variable.&lt;br&gt; &lt;br&gt; The server side cursors were first added in SQL Server 6.0 release and now supported in all editions of SQL Server 7.0 and SQL Server 2000.&lt;br&gt; &lt;br&gt; Before using cursor, you first must declare the cursor. Once a cursor has been declared, you can open it and fetch from it. You can fetch row by row and make multiple operations on the currently active row in the cursor. When you have finished working with a cursor, you should close cursor and deallocate it to release SQL Server resources.&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;a name="part_1_1"&gt;&lt;/a&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Declaring a Cursor&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Before using cursor, you first must declare the cursor, i.e. define its scrolling behavior and the query used to build the result set on which the cursor operates. To declare cursor, you can use a syntax based on the SQL-92 standard and a syntax using a set of Transact-SQL extensions.&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;a name="#part_1_1_1"&gt;&lt;/a&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/h2&gt;  &lt;h2&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/h2&gt;  &lt;h2&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;SQL-92 Syntax&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;This is SQL-92 Syntax:&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 100%;" width="100%" border="0" cellpadding="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: gainsboro none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;DECLARE cursor_name [INSENSITIVE] [SCROLL] CURSOR&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;FOR select_statement&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;[FOR {READ ONLY | UPDATE [OF column_name [,...n]]}]&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;where&lt;br&gt; &lt;br&gt; &lt;b&gt;cursor_name&lt;/b&gt; - the name of the server side cursor, must contain from 1 to 128 characters.&lt;br&gt; &lt;br&gt; &lt;b&gt;INSENSITIVE&lt;/b&gt; - specifies that cursor will use a temporary copy of the data instead of base tables. This cursor does not allow modifications and modifications made to base tables are not reflected in the data returned by fetches made to this cursor.&lt;br&gt; &lt;br&gt; &lt;b&gt;SCROLL&lt;/b&gt; - specifies that cursor can fetch data in all directions, not only sequentially until the end of the result set. If this argument is not specified, FETCH NEXT is the only fetch option supported.&lt;br&gt; &lt;br&gt; &lt;b&gt;select_statement&lt;/b&gt; - the standard select statement, cannot contain COMPUTE, COMPUTE BY, FOR BROWSE, and INTO keywords.&lt;br&gt; &lt;br&gt; &lt;b&gt;READ ONLY&lt;/b&gt; - specifies that cursor cannot be updated.&lt;br&gt; &lt;br&gt; &lt;b&gt;UPDATE [OF column_name [,...n]]&lt;/b&gt; - specifies that all cursor&amp;#39;s columns can be updated (if &lt;b&gt;OF column_name [,...n]&lt;/b&gt; is not specified), or only the columns listed in the &lt;b&gt;OF column_name [,...n]&lt;/b&gt; list allow modifications.&lt;/span&gt;&lt;/p&gt;  &lt;h3&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Cursor Options Compatibility&lt;/span&gt;&lt;/h3&gt;  &lt;table class="MsoNormalTable" style="" border="1" cellpadding="0" cellspacing="1"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;INSENSITIVE&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;SCROLL&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;READ ONLY&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;UPDATE&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;INSENSITIVE&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;SCROLL&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;READ ONLY&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;UPDATE&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;h2&gt;&lt;a name="#part_1_1_2"&gt;&lt;/a&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Transact-SQL Extended Syntax&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;This is Transact-SQL Extended Syntax:&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 100%;" width="100%" border="0" cellpadding="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: gainsboro none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;DECLARE cursor_name CURSOR&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;[LOCAL | GLOBAL]&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;[FORWARD_ONLY | SCROLL]&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;[STATIC | KEYSET | DYNAMIC | FAST_FORWARD]&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;[READ_ONLY | SCROLL_LOCKS | OPTIMISTIC]&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;[TYPE_WARNING]&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;FOR select_statement&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;[FOR UPDATE [OF column_name [,...n]]]&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;where&lt;br&gt; &lt;br&gt; &lt;b&gt;cursor_name&lt;/b&gt; - the name of the server side cursor, must contain from 1 to 128 characters.&lt;br&gt; &lt;br&gt; &lt;b&gt;LOCAL&lt;/b&gt; - specifies that cursor can be available only in the batch, stored procedure, or trigger in which the cursor was created. The LOCAL cursor will be implicitly deallocated when the batch, stored procedure, or trigger terminates.&lt;br&gt; &lt;br&gt; &lt;b&gt;GLOBAL&lt;/b&gt; - specifies that cursor is global to the connection. The GLOBAL cursor will be implicitly deallocated at disconnect.&lt;br&gt; &lt;br&gt; &lt;b&gt;FORWARD_ONLY&lt;/b&gt; - specifies that cursor can only fetch data sequentially from the first to the last row. FETCH NEXT is the only fetch option supported.&lt;br&gt; &lt;br&gt; &lt;b&gt;STATIC&lt;/b&gt; - specifies that cursor will use a temporary copy of the data instead of base tables. This cursor does not allow modifications and modifications made to base tables are not reflected in the data returned by fetches made to this cursor.&lt;br&gt; &lt;br&gt; &lt;b&gt;KEYSET&lt;/b&gt; - specifies that cursor uses the set of keys that uniquely identify the cursor&amp;#39;s rows (keyset), so that the membership and order of rows in the cursor are fixed when the cursor is opened. SQL Server uses a table in tempdb to store keyset. The KEYSET cursor allows updates nonkey values from being made through this cursor, but inserts made by other users are not visible. Updates nonkey values made by other users are visible as the owner scrolls around the cursor, but updates key values made by other users are not visible. If a row is deleted, an attempt to fetch the row returns an @@FETCH_STATUS of -2.&lt;br&gt; &lt;br&gt; &lt;b&gt;DYNAMIC&lt;/b&gt; - specifies that cursor reflects all data changes made to the base tables as you scroll around the cursor. FETCH ABSOLUTE option is not supported with DYNAMIC cursor.&lt;br&gt; &lt;br&gt; &lt;b&gt;FAST_FORWARD&lt;/b&gt; - specifies that cursor will be FORWARD_ONLY and READ_ONLY cursor. The FAST_FORWARD cursors produce the least amount of overhead on SQL Server.&lt;br&gt; &lt;br&gt; &lt;b&gt;READ ONLY&lt;/b&gt; - specifies that cursor cannot be updated.&lt;br&gt; &lt;br&gt; &lt;b&gt;SCROLL_LOCKS&lt;/b&gt; - specifies that cursor will lock the rows as they are read into the cursor to ensure that positioned updates or deletes made through the cursor will be succeed.&lt;br&gt; &lt;br&gt; &lt;b&gt;OPTIMISTIC&lt;/b&gt; - specifies that cursor does not lock rows as they are read into the cursor. So, the positioned updates or deletes made through the cursor will not succeed if the row has been updated outside the cursor since this row was read into the cursor.&lt;br&gt; &lt;br&gt; &lt;b&gt;TYPE_WARNING&lt;/b&gt; - specifies that if the cursor will be implicitly converted from the requested type to another, a warning message will be sent to the client.&lt;br&gt; &lt;br&gt; &lt;b&gt;select_statement&lt;/b&gt; - the standard select statement, cannot contain COMPUTE, COMPUTE BY, FOR BROWSE, and INTO keywords.&lt;br&gt; &lt;br&gt; &lt;b&gt;UPDATE [OF column_name [,...n]]&lt;/b&gt; - specifies that all cursor&amp;#39;s columns can be updated (if &lt;b&gt;OF column_name [,...n]&lt;/b&gt; is not specified), or only the columns listed in the &lt;b&gt;OF column_name [,...n]&lt;/b&gt; list allow modifications.&lt;/span&gt;&lt;/p&gt;  &lt;h3&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Cursor Options Compatibility&lt;/span&gt;&lt;/h3&gt;  &lt;table class="MsoNormalTable" style="width: 100%;" width="100%" border="1" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;(L)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;(G)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;(FO)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;(S)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;(K)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;(D)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;(FF)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;(RO)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;(SL)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;(O)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;(TW)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;(U)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;LOCAL (L)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;GLOBAL (G)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;FORWARD_ONLY (FO)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;STATIC (S)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;KEYSET (K)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;DYNAMIC (D)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;FAST_FORWARD (FF)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;READ_ONLY (RO)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;SCROLL_LOCKS (SL)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;OPTIMISTIC (O)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;TYPE_WARNING (TW)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt;UPDATE (U)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Yes&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; background: rgb(0, 170, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: white;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;a name="part_1_2"&gt;&lt;/a&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Opening a Cursor&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Once a cursor has been declared, you must open it to fetch data from it. To open a cursor, you can use the following syntax:&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 100%;" width="100%" border="0" cellpadding="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: gainsboro none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;OPEN { { [GLOBAL] cursor_name } | cursor_variable_name}&lt;/span&gt;&lt;/pre&gt; &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;where&lt;br&gt; &lt;br&gt; &lt;b&gt;GLOBAL&lt;/b&gt; - if this argument was not specified and both a global and a local cursor exist with the same name, the local cursor will be opened; otherwise, the global cursor will be opened.&lt;br&gt; &lt;br&gt; &lt;b&gt;cursor_name&lt;/b&gt; - the name of the server side cursor, must contain from 1 to 128 characters.&lt;br&gt; &lt;br&gt; &lt;b&gt;cursor_variable_name&lt;/b&gt; - the name of a cursor variable that references a cursor.&lt;br&gt; &lt;br&gt; After a cursor is opening, you can determine the number of rows that were found by the cursor. To get this number, you can use @@CURSOR_ROWS scalar function.&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;a name="part_1_3"&gt;&lt;/a&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Fetching a Cursor&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Once a cursor has been opened, you can fetch from it row by row and make multiple operations on the currently active row in the cursor. To fetch from a cursor, you can use the following syntax:&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 100%;" width="100%" border="0" cellpadding="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: gainsboro none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;FETCH&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style=""&gt;        &lt;/span&gt;[&lt;span style=""&gt;    &lt;/span&gt;[&lt;span style=""&gt;    &lt;/span&gt;NEXT | PRIOR | FIRST | LAST&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style=""&gt;                &lt;/span&gt;| ABSOLUTE {n | @nvar}&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style=""&gt;                &lt;/span&gt;| RELATIVE {n | @nvar}&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style=""&gt;            &lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style=""&gt;            &lt;/span&gt;FROM&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style=""&gt;        &lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;{ { [GLOBAL] cursor_name } | @cursor_variable_name}&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;[INTO @variable_name[,...n] ]&lt;/span&gt;&lt;/pre&gt; &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;where&lt;br&gt; &lt;br&gt; &lt;b&gt;NEXT&lt;/b&gt; - the default cursor fetch option. FETCH NEXT returns the next row after the current row.&lt;br&gt; &lt;br&gt; &lt;b&gt;PRIOR&lt;/b&gt; - returns the prior row before the current row.&lt;br&gt; &lt;br&gt; &lt;b&gt;FIRST&lt;/b&gt; - returns the first row in the cursor.&lt;br&gt; &lt;br&gt; &lt;b&gt;LAST&lt;/b&gt; - returns the last row in the cursor.&lt;br&gt; &lt;br&gt; &lt;b&gt;ABSOLUTE {n | @nvar}&lt;/b&gt; - returns the nth row in the cursor. If a positive number was specified, the rows are counted from the top of the data set; if 0 was specified, no rows are returned; if a negative number was specified, the number of rows will be counted from the bottom of the data set.&lt;br&gt; &lt;br&gt; &lt;b&gt;RELATIVE {n | @nvar}&lt;/b&gt; - returns the nth row in the cursor relative to the current row. If a positive number was specified, returns the nth row beyond the current row; if a negative number was specified, returns the nth row prior the current row; if 0 was specified, returns the current row.&lt;br&gt; &lt;br&gt; &lt;b&gt;GLOBAL&lt;/b&gt; - if this argument was not specified and both a global and a local cursor exist with the same name, the local cursor will be fetched; otherwise, the global cursor will be fetched.&lt;br&gt; &lt;br&gt; &lt;b&gt;cursor_name&lt;/b&gt; - the name of the server side cursor, must contain from 1 to 128 characters.&lt;br&gt; &lt;br&gt; &lt;b&gt;cursor_variable_name&lt;/b&gt; - the name of a cursor variable that references a cursor.&lt;br&gt; &lt;br&gt; &lt;b&gt;INTO @variable_name[,...n]&lt;/b&gt; - allows data returned from the cursor to be held in temporary variables. The type of variables must match the type of columns in the cursor select list or support implicit conversion. The number of variables must match the number of columns in the cursor select list.&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;a name="part_1_4"&gt;&lt;/a&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Closing a Cursor&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;When you have finished working with a cursor, you can close it to release any resources and locks that SQL Server may have used while the cursor was open.&lt;br&gt; To close a cursor, you can use the following syntax:&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 100%;" width="100%" border="0" cellpadding="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: gainsboro none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;CLOSE { { [GLOBAL] cursor_name } | cursor_variable_name }&lt;/span&gt;&lt;/pre&gt; &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;where&lt;br&gt; &lt;br&gt; &lt;b&gt;GLOBAL&lt;/b&gt; - if this argument was not specified and both a global and a local cursor exist with the same name, the local cursor will be closed; otherwise, the global cursor will be closed.&lt;br&gt; &lt;br&gt; &lt;b&gt;cursor_name&lt;/b&gt; - the name of the server side cursor, must contain from 1 to 128 characters.&lt;br&gt; &lt;br&gt; &lt;b&gt;cursor_variable_name&lt;/b&gt; - the name of a cursor variable that references a cursor.&lt;br&gt; &lt;br&gt; &lt;b&gt;Note.&lt;/b&gt; If you have closed a cursor, but have not deallocated it, you can open it again when needed.&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;a name="part_1_5"&gt;&lt;/a&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Deallocating a Cursor&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;When you have finished working with a cursor and want to completely release SQL Server resources that were used by a cursor, you can deallocate a cursor.&lt;br&gt; To deallocate a cursor, you can use the following syntax:&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 100%;" width="100%" border="0" cellpadding="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0.75pt; background: gainsboro none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;pre&gt;&lt;span style="font-family: Verdana;"&gt;DEALLOCATE { { [GLOBAL] cursor_name } | @cursor_variable_name}&lt;/span&gt;&lt;/pre&gt; &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;where&lt;br&gt; &lt;br&gt; &lt;b&gt;GLOBAL&lt;/b&gt; - if this argument was not specified and both a global and a local cursor exist with the same name, the local cursor will be deallocated; otherwise, the global cursor will be deallocated.&lt;br&gt; &lt;br&gt; &lt;b&gt;cursor_name&lt;/b&gt; - the name of the server side cursor, must contain from 1 to 128 characters.&lt;br&gt; &lt;br&gt; &lt;b&gt;cursor_variable_name&lt;/b&gt; - the name of a cursor variable that references a cursor.&lt;br&gt; &lt;br&gt; &lt;b&gt;Note.&lt;/b&gt; Deallocating a cursor completely removes all cursor references. So, after a cursor is deallocated, it no longer can be opened.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;br&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style="color: black;"&gt;&lt;div dir="ltr"&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;span style="font-weight: bold; font-family: verdana,sans-serif;"&gt;&lt;/span&gt;&lt;img style="width: 25px; height: 25px; font-family: verdana,sans-serif;" src="http://www.techreaders.com/wp-content/uploads/2009/09/Mobile-Phone-Icon-300x300.jpg" border="0"&gt;&lt;span style="font-family: verdana,sans-serif; font-weight: bold;"&gt;    &lt;span style="color: rgb(204, 0, 0);"&gt;+91-9457874019&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif; font-weight: bold;"&gt; &lt;img style="width: 28px; height: 24px; font-family: verdana,sans-serif; font-weight: bold;" src="http://www.bestfreeicons.com/smimages/Phone%20icon.png" border="0"&gt;&lt;span style="font-family: verdana,sans-serif; font-weight: bold;"&gt;   &lt;span style="color: rgb(204, 0, 0);"&gt; +91-522-4102340&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif;"&gt; &lt;img style="width: 30px; height: 31px; font-family: verdana,sans-serif;" src="http://www.vpmthane.org/Arts-Comm/seminar2010/First%20page/email_icon.jpg" border="0"&gt;&lt;span style="font-family: verdana,sans-serif;"&gt;   &lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;a style="font-weight: bold;" href="mailto:mangeshgangwar@gmail.com"&gt;mangeshgangwar@gmail.com&lt;/a&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif; font-weight: bold;"&gt; &lt;img style="width: 25px; height: 25px; font-family: verdana,sans-serif; font-weight: bold;" src="http://www.icon-king.com/images/portfolio-konqueror.jpg" border="0"&gt;&lt;span style="font-family: verdana,sans-serif; font-weight: bold;"&gt;      &lt;a href="http://www.onlineindiamusic.info/"&gt;www.onlineindiamusic.info&lt;/a&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif;"&gt; &lt;/font&gt;&lt;/div&gt;&lt;div style="padding: 5px 0pt; font-family: arial,sans-serif; font-size: 13.3px;"&gt;&lt;span style="color: gray;"&gt;Contact Me&lt;/span&gt;  &lt;a href="mangeshgangwar.blogspot.com" style="padding: 0pt 2px; color: blue; font-size: 10pt;"&gt;&lt;img src="http://www.images.wisestamp.com/blogger.png" alt="Blogger" style="vertical-align: middle; padding-bottom: 5px;" width="16" border="0" height="16"&gt;&lt;/a&gt;&lt;a href="http://twitter.com/mangeshsingh" style="padding: 0pt 2px; color: blue; font-size: 10pt;"&gt;&lt;img src="http://www.images.wisestamp.com/twitter.png" alt="Twitter" style="vertical-align: middle; padding-bottom: 5px;" width="16" border="0" height="16"&gt;&lt;/a&gt;&lt;/div&gt; &lt;br&gt;&lt;div dir="ltr" style="font-size: 10px;"&gt;&lt;span style="color: gray;"&gt;&lt;/span&gt;&lt;a href="http://my.wisestamp.com/link?u=kjcpx33k4q29h3pk&amp;amp;site=www.wisestamp.com/email-install"&gt;&lt;br&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-2990692607207322157?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/cursors-in-sql-server-2005.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-2215242092982076452</guid><pubDate>Sat, 19 Jun 2010 13:34:00 +0000</pubDate><atom:updated>2010-06-19T06:34:19.653-07:00</atom:updated><title>Joins in SQL Server 2005</title><description>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CMangesh%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C04%5Cclip_filelist.xml"&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Wingdings; 	panose-1:5 0 0 0 0 0 0 0 0 0; 	mso-font-charset:2; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;}  /* 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;}  /* List Definitions */  @list l0 	{mso-list-id:331953539; 	mso-list-template-ids:1613948784;} @list l0:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:1.0in; 	mso-level-number-position:left; 	margin-left:1.0in; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l0:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:1.5in; 	mso-level-number-position:left; 	margin-left:1.5in; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:"Courier New"; 	mso-bidi-font-family:"Times New Roman";} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Inner Join:&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Inner Join is a default type join of SQL Server. It uses logical operators such as =, &amp;lt;, &amp;gt; to match the records in two tables. Inner Join includes equi join and natural joins.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt; text-indent: 0.5in;"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Outer Join:&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin: 0in 0in 12pt 0.5in; text-indent: 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Outer Join has further 3 sub categories as left, right and full. Outer Join uses these category names as keywords that can be specified in the FROM clause.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 12pt 0.5in; text-indent: 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Types: &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt; margin-left: 1.5in; text-indent: -0.25in;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Left Outer Join&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; returns all the rows from the table specified first in the Left Outer Join Clause. If in the left table any row has no matching record in the right side table then that row returns null column values for that particular tuple. &lt;br style=""&gt; &lt;br style=""&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt; margin-left: 1.5in; text-indent: -0.25in;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Right Outer&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; Join is exactly the reverse method of Left Outer Join. It returns all the rows from right table and returns null values for the rows having no match in the left joined table. &lt;br style=""&gt; &lt;br style=""&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt; margin-left: 1.5in; text-indent: -0.25in;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Full Outer Join:&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; Full outer join returns all the rows from both left and right joined tables. If there is any match missing from the left table then it returns null column values for left side table and if there is any match missing from right table then it returns null value columns for the right side table. &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt; margin-left: 0.75in;"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt; margin-left: 0.75in;"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Cross Join:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt; margin-left: 0.75in; text-indent: 0.25in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style=""&gt; &lt;/span&gt;Cross join works as a Cartesian product of rows for both left and right table. It combined each row of left table with all the rows of right table.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 12pt; margin-left: 0.75in; text-indent: 0.25in;"&gt;&lt;br&gt;&lt;/p&gt;&lt;span style="color: black;"&gt;&lt;div dir="ltr"&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;span style="font-weight: bold; font-family: verdana,sans-serif;"&gt;&lt;/span&gt;&lt;img style="width: 25px; height: 25px; font-family: verdana,sans-serif;" src="http://www.techreaders.com/wp-content/uploads/2009/09/Mobile-Phone-Icon-300x300.jpg" border="0"&gt;&lt;span style="font-family: verdana,sans-serif; font-weight: bold;"&gt;    &lt;span style="color: rgb(204, 0, 0);"&gt;+91-9457874019&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif; font-weight: bold;"&gt; &lt;img style="width: 28px; height: 24px; font-family: verdana,sans-serif; font-weight: bold;" src="http://www.bestfreeicons.com/smimages/Phone%20icon.png" border="0"&gt;&lt;span style="font-family: verdana,sans-serif; font-weight: bold;"&gt;   &lt;span style="color: rgb(204, 0, 0);"&gt; +91-522-4102340&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif;"&gt; &lt;img style="width: 30px; height: 31px; font-family: verdana,sans-serif;" src="http://www.vpmthane.org/Arts-Comm/seminar2010/First%20page/email_icon.jpg" border="0"&gt;&lt;span style="font-family: verdana,sans-serif;"&gt;   &lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;a style="font-weight: bold;" href="mailto:mangeshgangwar@gmail.com"&gt;mangeshgangwar@gmail.com&lt;/a&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif; font-weight: bold;"&gt; &lt;img style="width: 25px; height: 25px; font-family: verdana,sans-serif; font-weight: bold;" src="http://www.icon-king.com/images/portfolio-konqueror.jpg" border="0"&gt;&lt;span style="font-family: verdana,sans-serif; font-weight: bold;"&gt;      &lt;a href="http://www.onlineindiamusic.info/"&gt;www.onlineindiamusic.info&lt;/a&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif;"&gt; &lt;/font&gt;&lt;/div&gt;&lt;div style="padding: 5px 0pt; font-family: arial,sans-serif; font-size: 13.3px;"&gt;&lt;span style="color: gray;"&gt;Contact Me&lt;/span&gt;  &lt;a href="mangeshgangwar.blogspot.com" style="padding: 0pt 2px; color: blue; font-size: 10pt;"&gt;&lt;img src="http://www.images.wisestamp.com/blogger.png" alt="Blogger" style="vertical-align: middle; padding-bottom: 5px;" width="16" border="0" height="16"&gt;&lt;/a&gt;&lt;a href="http://twitter.com/mangeshsingh" style="padding: 0pt 2px; color: blue; font-size: 10pt;"&gt;&lt;img src="http://www.images.wisestamp.com/twitter.png" alt="Twitter" style="vertical-align: middle; padding-bottom: 5px;" width="16" border="0" height="16"&gt;&lt;/a&gt;&lt;/div&gt; &lt;br&gt;&lt;div dir="ltr" style="font-size: 10px;"&gt;&lt;span style="color: gray;"&gt;&lt;/span&gt;&lt;a href="http://my.wisestamp.com/link?u=kjcpx33k4q29h3pk&amp;amp;site=www.wisestamp.com/email-install"&gt;&lt;br&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-2215242092982076452?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/joins-in-sql-server-2005.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-3853412708259629630</guid><pubDate>Sat, 19 Jun 2010 13:32:00 +0000</pubDate><atom:updated>2010-06-19T06:33:12.565-07:00</atom:updated><title>Concept of OOPS</title><description>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CMangesh%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Wingdings; 	panose-1:5 0 0 0 0 0 0 0 0 0; 	mso-font-charset:2; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;}  /* 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";} a:link, span.MsoHyperlink 	{color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{color:purple; 	text-decoration:underline; 	text-underline:single;} @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;}  /* List Definitions */  @list l0 	{mso-list-id:2127500518; 	mso-list-type:hybrid; 	mso-list-template-ids:-1170016378 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l0:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Symbol;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Concept of OOPS&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Encapsulation&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Abstraction&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Inheritance&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Polymorphism&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;u&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Encapsulation&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;:&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style=""&gt;          &lt;/span&gt;The wrapping of data and function together in a single unit is called encapsulation. It tell how to bind data.this is useful to hide the data which is the new feature added to oops for providing security. Encapsulation is used for data hiding.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;u&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Abstraction&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;:&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style=""&gt;          &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style=""&gt;          &lt;/span&gt;An abstract class is a parent class that allows inheritance but can never be instantiated. Abstract classes contain one or more abstract methods that do not have implementation. Abstract classes allow specialization of inherited classes. Abstract classes and Interfaces both are used either for &lt;a href="javascript:void(0);"&gt;&lt;span style="color: navy;"&gt;design&lt;/span&gt;&lt;/a&gt; reasons or Security reasons.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;u&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Inheritance&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; :&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Inheritance is the process of creating new classes, called derived classes, from existing classes.The derived class inherits all the capabilities of the base class, but can add enhancements&lt;span style=""&gt;  &lt;/span&gt;and refinements of its own.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;u&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Polymorphism&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;:&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Polymorphism is the ability of an object (or&amp;lt;br&amp;gt;reference) to assume (be replaced by) or become many different forms of object.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Example: function overloading, function overriding, virtual functions. Another example can be a plus ?+? sign, used for adding two integers or for using it to concatenate two strings.&lt;/span&gt;&lt;/p&gt;&lt;span style="color: black;"&gt;&lt;div dir="ltr"&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;span style="font-weight: bold; font-family: verdana,sans-serif;"&gt;           &lt;br&gt;&lt;br style="font-family: verdana,sans-serif;"&gt; &lt;/span&gt;&lt;img style="width: 25px; height: 25px; font-family: verdana,sans-serif;" src="http://www.techreaders.com/wp-content/uploads/2009/09/Mobile-Phone-Icon-300x300.jpg" border="0"&gt;&lt;span style="font-family: verdana,sans-serif; font-weight: bold;"&gt;    &lt;span style="color: rgb(204, 0, 0);"&gt;+91-9457874019&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif; font-weight: bold;"&gt; &lt;img style="width: 28px; height: 24px; font-family: verdana,sans-serif; font-weight: bold;" src="http://www.bestfreeicons.com/smimages/Phone%20icon.png" border="0"&gt;&lt;span style="font-family: verdana,sans-serif; font-weight: bold;"&gt;   &lt;span style="color: rgb(204, 0, 0);"&gt; +91-522-4102340&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif;"&gt; &lt;img style="width: 30px; height: 31px; font-family: verdana,sans-serif;" src="http://www.vpmthane.org/Arts-Comm/seminar2010/First%20page/email_icon.jpg" border="0"&gt;&lt;span style="font-family: verdana,sans-serif;"&gt;   &lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;a style="font-weight: bold;" href="mailto:mangeshgangwar@gmail.com"&gt;mangeshgangwar@gmail.com&lt;/a&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif; font-weight: bold;"&gt; &lt;img style="width: 25px; height: 25px; font-family: verdana,sans-serif; font-weight: bold;" src="http://www.icon-king.com/images/portfolio-konqueror.jpg" border="0"&gt;&lt;span style="font-family: verdana,sans-serif; font-weight: bold;"&gt;      &lt;a href="http://www.onlineindiamusic.info/"&gt;www.onlineindiamusic.info&lt;/a&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif;"&gt; &lt;/font&gt;&lt;/div&gt;&lt;div style="padding: 5px 0pt; font-family: arial,sans-serif; font-size: 13.3px;"&gt;&lt;span style="color: gray;"&gt;Contact Me&lt;/span&gt;  &lt;a href="mangeshgangwar.blogspot.com" style="padding: 0pt 2px; color: blue; font-size: 10pt;"&gt;&lt;img src="http://www.images.wisestamp.com/blogger.png" alt="Blogger" style="vertical-align: middle; padding-bottom: 5px;" width="16" border="0" height="16"&gt;&lt;/a&gt;&lt;a href="http://twitter.com/mangeshsingh" style="padding: 0pt 2px; color: blue; font-size: 10pt;"&gt;&lt;img src="http://www.images.wisestamp.com/twitter.png" alt="Twitter" style="vertical-align: middle; padding-bottom: 5px;" width="16" border="0" height="16"&gt;&lt;/a&gt;&lt;/div&gt; &lt;br&gt;&lt;/div&gt;&lt;/span&gt;&lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;br&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&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/4349279927384911792-3853412708259629630?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/concept-of-oops.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-6086070210814541477</guid><pubDate>Sat, 19 Jun 2010 13:30:00 +0000</pubDate><atom:updated>2010-06-19T06:30:46.117-07:00</atom:updated><title>Visual Studio 2010 Released</title><description>&lt;span class="gmail_quote"&gt;&lt;/span&gt;&lt;span class="gmail_quote"&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;/span&gt;  &lt;div&gt;&lt;span class="q" id="q_12950666246c4f73_0"&gt;&lt;h3&gt;&lt;a href="http://msdn.microsoft.com/en-us/default.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;img style="border-width: 0px; margin: 0px; display: inline;" title="Visual Studio 2010 and .NET 4" alt="Visual Studio 2010 and .NET 4" src="http://www.hanselman.com/blog/content/binary/WindowsLiveWriter/VisualStudio2010Released_1353E/clip_image002_3.gif" width="600" border="0" height="72"&gt;&lt;/a&gt;&lt;/h3&gt;     &lt;h3&gt;Download Visual Studio 2010&lt;/h3&gt;  &lt;p&gt;First, if you want it, go &lt;a href="http://go.microsoft.com/?LinkId=9725695" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;download Visual Studio 2010&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; &lt;/strong&gt;now. If you&amp;#39;re an &lt;a href="http://msdn.microsoft.com/subscriptions/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;MSDN Subscriber&lt;/a&gt; or &lt;a href="http://www.microsoft.com/web/websitespark/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;WebSiteSpark&lt;/a&gt;/&lt;a href="http://www.microsoft.com/bizspark/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;BizSpark&lt;/a&gt; member, you can download the final release now. If not, you can &lt;a href="http://go.microsoft.com/?LinkId=9725695" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;download a free trial&lt;/a&gt; or one of the &lt;a href="http://www.microsoft.com/express/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;free Express editions&lt;/a&gt;.&lt;/p&gt;     &lt;ul&gt;&lt;li&gt;&lt;strong&gt;Microsoft Visual Studio 2010 Professional &lt;/strong&gt;      &lt;ul&gt;&lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=186892" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;Web Install&lt;/a&gt; &lt;/li&gt;  &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=186893" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;ISO (DVD-9)&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;   &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Microsoft Visual Studio 2010 Ultimate&lt;/strong&gt;       &lt;ul&gt;&lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=186896" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;Web Install&lt;/a&gt; &lt;/li&gt;  &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=186897" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;ISO (DVD-9)&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;   &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Microsoft Visual Studio Team Foundation Server&lt;/strong&gt;       &lt;ul&gt;&lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=186901" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;ISO (DVD-9)&lt;/a&gt; &lt;/li&gt;  &lt;/ul&gt;   &lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;I&amp;#39;m running the free Visual Web Developer 2010 Express on my netbook. You can install &lt;a href="http://go.microsoft.com/?linkid=9726493" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;ASP.NET 4, ASP.NET MVC 2, and Visual Web Developer 2010 Express&lt;/a&gt; really quickly with the &lt;a href="http://go.microsoft.com/?linkid=9726493" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;Web Platform Installer&lt;/a&gt;. &lt;/p&gt;     &lt;p&gt;There&amp;#39;s an &lt;a href="http://msdn.microsoft.com/en-us/vstudio/ff625297.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;excellent page on MSDN that&amp;#39;s cherry-picked and categorized the best VS2010 content&lt;/a&gt;, but I&amp;#39;ve included my own list below.&lt;/p&gt;     &lt;h3&gt;What&amp;#39;s new in Visual Studio 2010 and .NET 4?&lt;/h3&gt;  &lt;p&gt;Buttloads. Here&amp;#39;s the things I&amp;#39;m digging most. &lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb386063%28v=VS.100%29.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;What&amp;#39;s new in Visual Studio 2010&lt;/strong&gt;&lt;/a&gt; - The IDE and Editor has really shaped up nicely. I&amp;#39;ve got it installed side-by-side with by existing VS2008 with no problems. There&amp;#39;s &lt;a href="http://msdn.microsoft.com/en-us/library/bb386063%28v=VS.100%29.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;hundreds of new things that I can&amp;#39;t fit here&lt;/a&gt;, although some favorite IDE features of mine are:       &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Multimonitor support - &lt;/strong&gt;You can drag documents or toolboxes out of the IDE and onto other monitors. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Zoom &lt;/strong&gt;- You can &amp;quot;ctrl+scroll&amp;quot; (press the Ctrl key while scrolling your mouse wheel) to zoom in editors or diagrams. The editor has been totally rewritten using WPF. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Navigate To &lt;/strong&gt;- Hit &amp;quot;ctrl+comma&amp;quot; to navigate around your files, code, variables or methods much faster than Ctrl-F. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Code-First Intellisense &lt;/strong&gt;- You can hit Ctrl+Alt+Spacebar to tell toggle intellisense between regular Intellisense and a more TDD-friendly style that lets you create new classes and methods without getting hassled by the editor. &lt;/li&gt;&lt;/ul&gt;   &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hanselman.com/blog/content/binary/WindowsLiveWriter/VisualStudio2010Released_1353E/image_10.png" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;img style="border-width: 0px; margin: 5px 0px 5px 10px; display: inline;" title="Multi targetting dropdown" alt="Multi targetting dropdown" src="http://www.hanselman.com/blog/content/binary/WindowsLiveWriter/VisualStudio2010Released_1353E/image_thumb_3.png" width="302" align="right" border="0" height="124"&gt;&lt;/a&gt; &lt;a href="http://weblogs.asp.net/scottgu/archive/2009/08/27/multi-targeting-support-vs-2010-and-net-4-series.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;Multi-Targeting Support&lt;/strong&gt;&lt;/a&gt; - You can use VS2010 to create (target) .NET 2.0, 3.0, 3.5 or 4 applications. That means you can work on existing applications and get all the new IDE features while also working on new .NET 4 apps, all with the same IDE. &lt;/li&gt;&lt;li&gt;&lt;a href="http://go.microsoft.com/?linkid=9726493" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;ASP.NET 4 and ASP.NET MVC 2&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; &lt;/strong&gt;are included in the box. &lt;a href="http://www.asp.net/web-forms/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;WebForms&lt;/a&gt; now lets you create clean markup (no more tables) that&amp;#39;s semantically correct and CSS-friendly, even for &amp;quot;legacy&amp;quot; controls and clientids that you control. ViewState is way smaller and can be turned on and off with greater granularity. Chart controls are included as well. On the &lt;a href="http://www.asp.net/mvc/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;MVC 2&lt;/a&gt; side, we&amp;#39;ve got Areas, Strongly-typed helpers, Templated Helpers, field validation in models, and more. Both MVC and WebForms get all the core &lt;a href="http://ASP.NET" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;ASP.NET&lt;/a&gt; 4 improvements like a smaller web.config, the new &amp;lt;%: %&amp;gt; encoding syntax, extensible output caching, preloading of web apps, session state compression and routing for SEO-friendly URLs. &lt;/li&gt;&lt;li&gt;&lt;a href="http://go.microsoft.com/?linkid=9726123" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;Windows Communication Foundation (WCF)&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; &lt;/strong&gt;gets easier with a better configuration experience for services (bothSOAP and REST) as well as new functionality around routing and discovery. &lt;/li&gt;&lt;li&gt;&lt;a href="http://go.microsoft.com/?linkid=9726124" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;Windows Workflow (WF)&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; &lt;/strong&gt;gets a massive speed increase, the flowchart services, and it&amp;#39;s way easier to make custom services than before. It&amp;#39;s all in System.Activities. &lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/data/default.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;Entity Framework 4 and WCF Data Services 4 (OData)&lt;/strong&gt;&lt;/a&gt; - &lt;a href="http://go.microsoft.com/?linkid=9726167" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;Lots of improvements&lt;/a&gt; in the &lt;a href="http://www.msdn.com/data" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;Data&lt;/a&gt; space, particularly in the Entity Framework 4. There&amp;#39;s POCO support for Self-Tracking Entities, a DDL Generation Provider for creating databases based on a model, as well as lots of improvements to the designer. Don&amp;#39;t forget WCF Data Services, I &lt;a href="http://www.hanselman.com/blog/CreatingAnODataAPIForStackOverflowIncludingXMLAndJSONIn30Minutes.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;blogged about how easy it is to implement OData recently when I made an API for StackOverflow&lt;/a&gt;. &lt;/li&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vcsharp/default.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;What&amp;#39;s new in C# 4&lt;/strong&gt;&lt;/a&gt; - C# &lt;a href="http://msdn.microsoft.com/en-us/library/bb383815%28VS.100%29.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;gets a lot of new features&lt;/a&gt; in version 4 (or Visual C# 2010 if you like) like Dynamic Support (that&amp;#39;s the DLR, built right in), Type Equivalence, and Covariance and Contravariance which makes generics much more flexible. &lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vbasic/default.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;What&amp;#39;s new in Visual Basic 2010&lt;/strong&gt;&lt;/a&gt;  - &lt;a href="http://go.microsoft.com/?linkid=9726165" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;Jonathan Aneja discusses the coevolution strategy&lt;/a&gt;, and new features like Implicit Line Continuation, Statement Lambdas, Auto-Implemented Properties, Collection Initializers and how VB uses the DLR (Dynamic Language Runtime). &lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/visualc/default.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;New C++ and MFC Features&lt;/strong&gt;&lt;/a&gt; - What? C++? Oh, yes. &lt;a href="http://10rem.net/blog/2010/03/25/your-first-mfc-cplusplus-ribbon-application-with-visual-studio-2010" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;Pete Brown&lt;/a&gt; recently dipped his feet back into C++ with VS2010 and was shocked to find &lt;a href="http://10rem.net/blog/2010/03/25/your-first-mfc-cplusplus-ribbon-application-with-visual-studio-2010" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;how easy it was to make a Ribbon Application&lt;/a&gt; with MFC. In &lt;a href="http://go.microsoft.com/?linkid=9726168" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;this article&lt;/a&gt;, Samit Kumar talks about some of the new &lt;a href="http://en.wikipedia.org/wiki/C%2B%2B0x" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;C++0x&lt;/a&gt; (that&amp;#39;s &lt;em&gt;see plus plus oh ex&lt;/em&gt;) core language features as well as major improvements in the standard library. VS 2010 enables lambda expressions, the auto keyword, rvalue references, static_assert, nullptr and decltype. It&amp;#39;s not your father&amp;#39;s C++. Well, maybe it &lt;em&gt;is&lt;/em&gt;, if your dad is a ninja. &lt;/li&gt;&lt;li&gt;&lt;a href="http://10rem.net/blog/2010/04/12/wpf-4-release-a-guide-to-the-new-features" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;What&amp;#39;s new in WPF&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; &lt;/strong&gt;- Pete Brown &lt;a href="http://10rem.net/blog/2010/04/12/wpf-4-release-a-guide-to-the-new-features" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;has a fantastic and deep blog post on all the new WPF4 features&lt;/a&gt;. There&amp;#39;s speed updates, a better designer, Windows 7 and touch support, &lt;a href="http://www.hanselman.com/blog/WPFAndTextBlurrinessNowWithCompleteClarity.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;text is crystal clear (not blurry!)&lt;/a&gt;, a new datagrid, pixel shaders, the Visual State Manager, WPF Tracing support in VS2010 and more. &lt;/li&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd460648%28VS.100%29.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;MEF, the Managed Extensibility Framework&lt;/strong&gt;&lt;/a&gt; comes with .NET 4. You use MEF to create extensible, compose-able applications. You don&amp;#39;t need to download anything, it&amp;#39;s integral to the framework and it works anywhere you like, including WinForms, WPF, &lt;a href="http://ASP.NET" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;ASP.NET&lt;/a&gt; or Silverlight. &lt;/li&gt;&lt;li&gt;&lt;a href="http://go.microsoft.com/?linkid=9726166" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;F# is in the box&lt;/strong&gt;&lt;/a&gt; - F# ships with Visual Studio 2010. There&amp;#39;s a good &lt;a href="http://go.microsoft.com/?linkid=9726166" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;Introduction to Functional Programming for .NET Developers&lt;/a&gt; you should check out to see how you can use F# and how it will augment and complement your current language of choice. &lt;/li&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/concurrency/default.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/a&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd460693%28VS.100%29.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;img style="border-width: 0px; margin: 0px 0px 0px 10px; display: inline;" title="IC292903" alt="IC292903" src="http://www.hanselman.com/blog/content/binary/WindowsLiveWriter/VisualStudio2010Released_1353E/IC292903_eb53638f-8153-48fe-88ed-ce199e42f1ce.png" width="300" align="right" border="0" height="160"&gt;&lt;/a&gt; Concurrency, Threading and Parallelism - Check out the &lt;a href="http://msdn.microsoft.com/en-us/concurrency/default.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;Parallel Computing Dev Center&lt;/a&gt; and how &lt;a href="http://msdn.microsoft.com/en-us/library/dd460693%28VS.100%29.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;PLinq, the Task Parallel Library and the Coordination Data Structures work&lt;/a&gt;. &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=86b3d32b-ad26-4bb8-a3ae-c1637026c3ee&amp;amp;displaylang=en" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;Understand how to apply parallel patterns with .NET 4 with this awesome whitepaper&lt;/a&gt;. There&amp;#39;s also &lt;a href="http://msdn.microsoft.com/en-us/library/bb385755%28v=VS.100%29.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;major improvements in the Profiling Tools&lt;/a&gt;, including a &lt;a href="http://msdn.microsoft.com/en-us/library/dd537632%28v=VS.100%29.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;Concurrency Visualizer&lt;/a&gt; for seeing how Multithreaded apps really behave. View their threads and how those threads migrate across cores. &lt;/li&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb385832%28VS.100%29.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;Team Foundation Server&lt;/strong&gt;&lt;/a&gt; - Previously, installing TFS was, ahem, challenging. Today, I&amp;#39;ve seen people install TFS in 6 minutes with VS2010. Some say &lt;a href="http://blog.hinshelwood.com/archive/2009/10/20/installing-visual-studio-2010-team-foundation-server-on-windows-vista.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;they can do it in 3&lt;/a&gt;. The point is, &lt;a href="http://go.microsoft.com/fwlink/?LinkId=127730" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;it&amp;#39;s easy to  install now&lt;/a&gt; along with &lt;a href="http://msdn.microsoft.com/en-us/library/bb385832%28VS.100%29.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;lots more new features&lt;/a&gt;. &lt;/li&gt;   &lt;/ul&gt;  &lt;p&gt;Also, there&amp;#39;s a FREE e-Book called &lt;strong&gt;&amp;quot;&lt;/strong&gt;&lt;a href="http://go.microsoft.com/?linkid=9726581" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;strong&gt;Moving to Visual Studio 2010&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&amp;quot;&lt;/strong&gt; that you might want to check out. It&amp;#39;s an excerpt of a larger book that&amp;#39;ll be coming from MSPress later this summer. It takes a interesting approach as it has three parts, moving from VS2003, moving from VS2005, and moving from VS2008. It&amp;#39;s clever, actually. You start in the book on the version that you&amp;#39;re currently on. If you&amp;#39;re not familiar with versions like VS2008, you start at the beginning. Otherwise, you jump ahead. When you&amp;#39;re done, you&amp;#39;re ready to move to VS2010.&lt;/p&gt;  &lt;h3&gt;MSDN and Visual Studio 2010&lt;/h3&gt;  &lt;p&gt;When a new product launches, &lt;a href="http://www.msdn.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;MSDN&lt;/a&gt; launches with updates and new features of its own. Here&amp;#39;s a few things the folks at MSDN have been doing to support the launch.&lt;/p&gt;     &lt;ul&gt;&lt;li&gt;&lt;strong&gt;Better MSDN Search&lt;/strong&gt; - Most people likely use a search engine to search MSDN, but if you do &lt;a href="http://social.msdn.microsoft.com/Search/en-US/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;search from within MSDN&lt;/a&gt;, there are a number of new improvements. You can refine by source, saying only search blogs, or only search the library. There&amp;#39;s also an OpenSearch provider so you can search the MSDN Library directly from within Windows itself. &lt;br&gt;&lt;a href="http://social.msdn.microsoft.com/Search/en-US/OpenSearchDescription/?format=osdx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;img style="border-width: 0px; display: inline;" title="XDocument - Search Results in MSDN" alt="XDocument - Search Results in MSDN" src="http://www.hanselman.com/blog/content/binary/WindowsLiveWriter/VisualStudio2010Released_1353E/XDocument%20-%20Search%20Results%20in%20MSDN_3.png" width="550" border="0" height="309"&gt;&lt;/a&gt;       &lt;br&gt;   MSDN Search also includes Metadata from the results to help you find right thing. For example, if a search turns up a CodePlex project, I can see type-specific details within search results: &lt;br&gt;&lt;a href="http://social.msdn.microsoft.com/Search/en-US?query=nerddinner&amp;amp;ac=8" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;img style="border-width: 0px; margin: 5px 0px 0px 5px; display: inline;" title="MSDN Search" alt="MSDN Search" src="http://www.hanselman.com/blog/content/binary/WindowsLiveWriter/VisualStudio2010Released_1353E/image_3.png" width="570" border="0" height="149"&gt;&lt;/a&gt; &lt;/li&gt;   &lt;li&gt;&lt;strong&gt;MSDN Subscriber Downloads Improvements &lt;/strong&gt;- There&amp;#39;s been lots of UX improvements including as-you-type filtering as well as filtering by platform (x64, etc) and language. I will very likely not need to download Quechua Windows, so now I don&amp;#39;t need to see it. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;MSDN Library in Lightweight and ScriptFree &lt;/strong&gt;- You can choose between three flavors of MSDN Library, Classic (the one with the treeview on the side), Lightweight (what I use) or ScriptFree. ScriptFree is great for mobile devices, and it&amp;#39;s lightning fast anywhere. &lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.xmlnode%28VS.100%29.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;Lightweight&lt;/a&gt; is the new default and I like it because it features community annotations made to the library prominently on the left side as well as a tabbed interface for code sample languages. I &lt;a href="http://www.hanselman.com/blog/LowBandwidthViewAndOtherHiddenAndFutureFeaturesOfMSDN.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;blogged a preview of this work last year&lt;/a&gt; and included some charts and graphs showing the improvements in speed worldwide.       &lt;br&gt;   &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.xmlnode%28VS.100%29.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;&lt;img style="border-width: 0px; margin: 0px 0px 5px; display: inline;" title="XmlNode Class (System.Xml) - Windows Internet Explorer" alt="XmlNode Class (System.Xml) - Windows Internet Explorer" src="http://www.hanselman.com/blog/content/binary/WindowsLiveWriter/VisualStudio2010Released_1353E/XmlNode%20Class%20%28System.Xml%29%20-%20Windows%20Internet%20Explorer_4.png" width="450" border="0" height="455"&gt;&lt;/a&gt;&lt;/strong&gt; &lt;/li&gt;   &lt;/ul&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/4349279927384911792-6086070210814541477?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/visual-studio-2010-released_19.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-4535725849153167217</guid><pubDate>Fri, 11 Jun 2010 12:38:00 +0000</pubDate><atom:updated>2010-06-11T05:39:04.042-07:00</atom:updated><title>How to setup vpn server in windows xp</title><description>&lt;table style="color: rgb(204, 0, 0);" width="640" align="center" bgcolor="#c0c0c0" border="1" cellpadding="6" cellspacing="3"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="2" align="center" background="../images/img29b.jpg" bgcolor="#ffffff"&gt;&lt;h1 style="text-align: left;"&gt;  &lt;b&gt;&lt;font size="2"&gt;WindowsXP VPN Server&lt;/font&gt;&lt;/b&gt;&lt;/h1&gt; 	&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;    &lt;td style="text-align: left;" colspan="2" background="../images/img29b.jpg" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt; 	The following page details the steps necessary to create  a WindowsXP VPN Server&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;    &lt;td width="1" align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;1.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;Go to   &lt;i&gt;Start / Settings / Network Connections&lt;/i&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;2.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;Start the &lt;i&gt;     New Connection Wizard&lt;/i&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td colspan="2" align="center" bgcolor="#ffffff"&gt;     &lt;b&gt;&lt;font size="2"&gt;&lt;img src="http://www.onecomputerguy.com/images/xp_vpn_server1.jpg" width="503" border="0" height="392"&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;3.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;Click on the     &lt;i&gt;Next&lt;/i&gt; button&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;4.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;Select &lt;i&gt;Set      up advanced connection&lt;/i&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr text="#000000" bgcolor="#ffffff"&gt; &lt;td colspan="2" align="center"&gt;     &lt;b&gt;&lt;font size="2"&gt;&lt;img src="http://www.onecomputerguy.com/images/xp_vpn_server2.jpg" width="503" border="0" height="392"&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;5.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;Click on the     &lt;i&gt;Next &lt;/i&gt;button.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;6.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;     Click on &lt;i&gt;Accept incoming connections&lt;/i&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr text="#000000" bgcolor="#ffffff"&gt; &lt;td colspan="2" align="center"&gt;     &lt;b&gt;&lt;font size="2"&gt;&lt;img src="http://www.onecomputerguy.com/images/xp_vpn_server3.jpg" width="503" border="0" height="392"&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;7.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;Click on the      &lt;i&gt;Next&lt;/i&gt; button&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;8.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;     At the LPT1 page, skip it and just click on the &lt;i&gt;Next &lt;/i&gt;button.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td colspan="2" align="center" bgcolor="#ffffff"&gt;     &lt;b&gt;&lt;font size="2"&gt;&lt;img src="http://www.onecomputerguy.com/images/xp_vpn_server4.jpg" width="503" border="0" height="392"&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;     9.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;     Click on &lt;i&gt;Allow virtual private connection&lt;/i&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td colspan="2" align="center" bgcolor="#ffffff"&gt;     &lt;b&gt;&lt;font size="2"&gt;&lt;img src="http://www.onecomputerguy.com/images/xp_vpn_server5.jpg" width="503" border="0" height="392"&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;10.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;Click on the     &lt;i&gt;Next&lt;/i&gt; button&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;11.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;Add user      accounts that you want to be able to connect to your WindowsXP computer.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td colspan="2" align="center" bgcolor="#ffffff"&gt;     &lt;b&gt;&lt;font size="2"&gt;&lt;img src="http://www.onecomputerguy.com/images/xp_vpn_server6.jpg" width="503" border="0" height="392"&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;12.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;Click on the     &lt;i&gt;Next &lt;/i&gt;button.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;13.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;Highlight  	Internet Protocol (TCP/IP) and click on Properties&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td colspan="2" align="center" bgcolor="#ffffff"&gt; 	&lt;b&gt;&lt;font size="2"&gt;&lt;img src="http://www.onecomputerguy.com/images/xp_vpn_server7.jpg" width="503" border="0" height="392"&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;14.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;Determine      how you want the remote computers to get their IP address&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td colspan="2" align="center" bgcolor="#ffffff"&gt;     &lt;b&gt;&lt;font size="2"&gt;&lt;img src="http://www.onecomputerguy.com/images/xp_vpn_server8.jpg" width="402" border="0" height="341"&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;19.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;The above      example will assign IP addresses to each client. Make sure the IP scheme is      the same as on your server.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;      &lt;td align="center" bgcolor="#ffffff"&gt;&lt;b&gt;&lt;font size="2"&gt;20.&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff"&gt;&lt;p&gt;&lt;b&gt;&lt;font size="2"&gt;If the VPN server is  	behind a router, Port Mapping will need to be done on the router. Standard  	port usage is 1723 for PPTP.  You might also need to configure your  	router for PPTP Passthrough. Port usage for IPSec is 500, 50-51. These      ports will have to be forwarded to the VPN server&amp;#39;s IP &lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-4535725849153167217?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/how-to-setup-vpn-server-in-windows-xp.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-1126911817292125164</guid><pubDate>Fri, 11 Jun 2010 12:33:00 +0000</pubDate><atom:updated>2010-06-11T05:33:52.084-07:00</atom:updated><title>Using AT commands to Send and Receive SMS</title><description>&lt;font size="2"&gt;&lt;font size="4"&gt;&lt;b&gt;Using AT commands to Send and Receive SMS &lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;This AT command tutorial is written to support our Teltonika T-ModemUSB, a                             USB2.0 GSM modem based on the Nokia 12i GSM module - fast EDGE technology is supported.                             Some of the most popular applications are SMS based telemetry, security                             and news broadcasting.&lt;br&gt;&lt;br&gt;                             Steps using AT commands to send and receive SMS using a GSM modem from a computer&lt;br&gt;&lt;br&gt;&lt;a href="http://www.control.com.sg/at_commands_sms.aspx#Setting%20up%20GSM%20modem"&gt;1. Setting up GSM modem&lt;/a&gt;&lt;br&gt;  &lt;a href="http://www.control.com.sg/at_commands_sms.aspx#Using%20the%20HyperTerminal"&gt;2. Using the HyperTerminal&lt;/a&gt;&lt;br&gt;&lt;a href="http://www.control.com.sg/at_commands_sms.aspx#Initial%20setup%20AT%20commands"&gt;3. Initial setup AT commands&lt;/a&gt;&lt;br&gt;  &lt;a href="http://www.control.com.sg/at_commands_sms.aspx#Sending%20SMS%20using%20using%20AT%20commands"&gt;4. Sending SMS using using AT commands&lt;/a&gt;&lt;br&gt;&lt;a href="http://www.control.com.sg/at_commands_sms.aspx#Receiving%20SMS%20using%20using%20AT%20commands"&gt;5. Receiving SMS using using AT commands&lt;/a&gt;&lt;br&gt;  &lt;a href="http://www.control.com.sg/at_commands_sms.aspx#Using%20a%20computer%20program%20to%20send%20and%20receive%20SMS"&gt;6. Using a computer program                             to send and receive SMS&lt;/a&gt;&lt;br&gt;&lt;br&gt;                             After succesfully sending and receiving SMS using AT commands via the HyperTerminal,                             developers can &amp;#39;port&amp;#39; the ASCII instructions over to their programming environment,                             eg. Visual Basic, C/C++ or Java and also programmically parse ASCII messages from                             modem.&lt;br&gt;&lt;br&gt;&lt;a name="#Setting up GSM modem"&gt;&lt;/a&gt;&lt;strong&gt;1. Setting up your GSM modem&lt;/strong&gt;&lt;br&gt;&lt;br&gt;                             Most GSM modems comes with a simple manual and necessary drivers. To setup your                             T-ModemUSB, download the &lt;a href="http://www.control.com.sg/docs%5CT-ModemUSB_Quick_Start.pdf" target="_blank"&gt;USB                             GSM Modem Quick Start ( Windows ) guide (460kB PDF)&lt;/a&gt;. You would be able to send                             SMS from the Windows application and also setup GPRS connectivity. The GSM modem will                             map itself as a COM serial port on your computer.                          &lt;/font&gt;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       &lt;p align="center"&gt;                             &lt;font size="2"&gt;&lt;img alt="T-ModemUSB Windows Control Tool and SMS sending application" src="http://www.control.com.sg/t_modem_control_tool.png" width="500" border="0" height="182"&gt;&lt;br&gt;                             Windows based control panel to setup GSM modem, GPRS and send SMS                          &lt;/font&gt;                              &lt;/p&gt;                         &lt;p&gt;                             &lt;font size="2"&gt;&lt;a name="#Using the HyperTerminal"&gt;&lt;/a&gt;&lt;strong&gt;2. Using the HyperTerminal&lt;/strong&gt;&lt;br&gt;&lt;br&gt;                             Hint :: By developing your AT commands using HyperTerminal, it will be easier for                             you to develop your actual program codes in VB, C, Java or other platforms.&lt;br&gt;&lt;br&gt;                             Go to START\Programs\Accessories\Communications\HyperTerminal (Win 2000) to create                             a new connection, eg. &amp;quot;My USB GSM Modem&amp;quot;. Suggested settings ::&lt;br&gt;&lt;br&gt;                              - COM Port :: As indicated in the T-Modem Control Tool &lt;br&gt;                              - Bits per second :: 230400 ( or slower )&lt;br&gt;                              - Data Bits : 8                              &lt;br&gt;                              - Parity : None&lt;br&gt;                              - Stop Bits : 1&lt;br&gt;                              - Flow Control : Hardware&lt;br&gt;&lt;br&gt;                             You are now ready to start working with AT commands. Type in &amp;quot;AT&amp;quot; and you should get                             a &amp;quot;OK&amp;quot;, else you have not setup your HyperTerminal correctly. Check your port settings                             and also make sure your GSM modem is properly connected and the drivers installed.&lt;br&gt;&lt;br&gt;&lt;a name="#Initial setup AT commands"&gt;&lt;/a&gt;&lt;strong&gt;3. Initial setup AT commands&lt;br&gt;                             &lt;br&gt;                             &lt;/strong&gt;We are ready now to start working with AT commands to setup and check                             the status of the GSM modem.&lt;br&gt;&lt;br&gt;&lt;/font&gt;                                                                                                                                                                                                                                                                  &lt;/p&gt;                         &lt;p&gt;                             &lt;table border="0"&gt;                                 &lt;tbody&gt;                                     &lt;tr&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             AT&lt;/font&gt;&lt;/td&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             Returns a &amp;quot;OK&amp;quot; to confirm that modem is working&lt;/font&gt;&lt;/td&gt;                                     &lt;/tr&gt;                                     &lt;tr&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             AT+CPIN=&amp;quot;xxxx&amp;quot;                                            &lt;/font&gt;&lt;/td&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             To enter the PIN for your SIM ( if enabled )&lt;/font&gt;&lt;/td&gt;                                     &lt;/tr&gt;                                     &lt;tr&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             AT+CREG?&lt;/font&gt;&lt;/td&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             A &amp;quot;0,1&amp;quot; reply confirms your modem is connected to GSM network&lt;/font&gt;&lt;/td&gt;                                     &lt;/tr&gt;                                     &lt;tr&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             AT+CSQ&lt;/font&gt;&lt;/td&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             Indicates the signal strength, 31.99 is maximum.&lt;/font&gt;&lt;/td&gt;                                     &lt;/tr&gt;                                 &lt;/tbody&gt;                             &lt;/table&gt;                         &lt;/p&gt;                         &lt;p&gt;                             &lt;font size="2"&gt;&lt;a name="Sending SMS using using AT commands"&gt;&lt;/a&gt;&lt;strong&gt;4. Sending SMS using                             AT commands&lt;br&gt;                             &lt;br&gt;                             &lt;/strong&gt;We suggest try sending a few SMS using the Control Tool above to make sure                             your GSM modem can send SMS before proceeding. Let&amp;#39;s look at the AT commands involved                             ..                          &lt;/font&gt;&lt;/p&gt;                         &lt;p&gt;                             &lt;table border="0"&gt;                                 &lt;tbody&gt;                                     &lt;tr&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             AT+CMGF=1&lt;/font&gt;&lt;/td&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             To format SMS as a TEXT message&lt;/font&gt;&lt;/td&gt;                                     &lt;/tr&gt;                                     &lt;tr&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             AT+CSCA=&amp;quot;+xxxxx&amp;quot;                                            &lt;/font&gt;&lt;/td&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             Set your SMS center&amp;#39;s number. Check with your provider.&lt;/font&gt;&lt;/td&gt;                                     &lt;/tr&gt;                                 &lt;/tbody&gt;                             &lt;/table&gt;                         &lt;/p&gt;                         &lt;p&gt;&lt;font size="2"&gt;                             To send a SMS, the AT command to use is AT+CMGS ..&lt;br&gt;&lt;br&gt;                             AT+CMGS=&amp;quot;+yyyyy&amp;quot; &amp;lt;Enter&amp;gt;&lt;br&gt;                             &amp;gt; Your SMS text message here &amp;lt;Ctrl-Z&amp;gt;&lt;br&gt;&lt;br&gt;                             The &amp;quot;+yyyyy&amp;quot; is your receipent&amp;#39;s mobile number. Next, we will look at receiving                             SMS via AT commands.&lt;br&gt;&lt;br&gt;&lt;a name="Receiving SMS using using AT commands"&gt;&lt;/a&gt;&lt;strong&gt;5. Receiving SMS                             using AT commands&lt;/strong&gt;&lt;/font&gt;                                                                                                                                              &lt;/p&gt;                         &lt;p&gt;&lt;font size="2"&gt;                             The GSM modem can be configured to response in different ways when it receives a SMS.&lt;br&gt;&lt;br&gt;                             a) Immediate - when a SMS is received, the SMS&amp;#39;s details are immediately sent                             to the host computer (DTE) via the +CMT command                          &lt;/font&gt;                             &lt;/p&gt;                         &lt;table border="0"&gt;                             &lt;tbody&gt;                                 &lt;tr&gt;                                     &lt;td&gt;&lt;font size="2"&gt;                                         AT+CMGF=1&lt;/font&gt;&lt;/td&gt;                                     &lt;td&gt;&lt;font size="2"&gt;                                         To format SMS as a TEXT message&lt;/font&gt;&lt;/td&gt;                                 &lt;/tr&gt;                                 &lt;tr&gt;                                     &lt;td&gt;&lt;font size="2"&gt;                                         AT+CNMI=1,2,0,0,0                                        &lt;/font&gt;&lt;/td&gt;                                     &lt;td&gt;&lt;font size="2"&gt;                                         Set how the modem will response when a SMS is received&lt;/font&gt;&lt;/td&gt;                                 &lt;/tr&gt;                             &lt;/tbody&gt;                         &lt;/table&gt;                         &lt;font size="2"&gt;&lt;br&gt;                         When a new SMS is received by the GSM modem, the DTE will receive the following ..&lt;br&gt;&lt;br&gt;                         +CMT :  &amp;quot;+61xxxxxxxx&amp;quot; , , &amp;quot;04/08/30,23:20:00+40&amp;quot;&lt;br&gt;                         This the text SMS message sent to the modem&lt;br&gt;&lt;br&gt;                         Your computer (DTE) will have to continuously monitor the COM serial port, read and                         parse the message.&lt;br&gt;&lt;br&gt;                         b) Notification - when a SMS is recieved, the host computer ( DTE ) will be notified                         of the new message. The computer will then have to read the message from the indicated                         memory location and clear the memory location.&lt;br&gt;&lt;br&gt;&lt;/font&gt;                                                                                                                             &lt;table border="0"&gt;                             &lt;tbody&gt;                                 &lt;tr&gt;                                     &lt;td&gt;&lt;font size="2"&gt;                                         AT+CMGF=1&lt;/font&gt;&lt;/td&gt;                                     &lt;td&gt;&lt;font size="2"&gt;                                         To format SMS as a TEXT message&lt;/font&gt;&lt;/td&gt;                                 &lt;/tr&gt;                                 &lt;tr&gt;                                     &lt;td&gt;&lt;font size="2"&gt;                                         AT+CNMI=1,1,0,0,0                                        &lt;/font&gt;&lt;/td&gt;                                     &lt;td&gt;&lt;font size="2"&gt;                                         Set how the modem will response when a SMS is received&lt;/font&gt;&lt;/td&gt;                                 &lt;/tr&gt;                             &lt;/tbody&gt;                         &lt;/table&gt;                         &lt;font size="2"&gt;                             When a new SMS is received by the GSM modem, the DTE will receive the following ..&lt;br&gt;&lt;br&gt;&lt;/font&gt;                                                          &lt;table border="0"&gt;                                 &lt;tbody&gt;                                     &lt;tr&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             +CMTI: &amp;quot;SM&amp;quot;,3&lt;/font&gt;&lt;/td&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             Notification sent to the computer. Location 3 in SIM memory&lt;/font&gt;&lt;/td&gt;                                     &lt;/tr&gt;                                     &lt;tr&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             AT+CMGR=3 &amp;lt;Enter&amp;gt; &lt;/font&gt;&lt;/td&gt;                                         &lt;td&gt;&lt;font size="2"&gt;                                             AT command to send read the received SMS from modem&lt;/font&gt;&lt;/td&gt;                                     &lt;/tr&gt;                                 &lt;/tbody&gt;                             &lt;/table&gt;                             &lt;font size="2"&gt;&lt;br&gt;                             The modem will then send to the computer details of the received SMS from the specified                             memory location ( eg. 3 ) ..&lt;br&gt;&lt;br&gt;                             +CMGR: &amp;quot;REC READ&amp;quot;,&amp;quot;+61xxxxxx&amp;quot;,,&amp;quot;04/08/28,22:26:29+40&amp;quot;&lt;br&gt;                             This is the new SMS received by the GSM modem&lt;br&gt;&lt;br&gt;                             After reading and parsing the new SMS message, the computer (DTE) should send a AT                             command to clear the memory location in the GSM modem ..&lt;br&gt;&lt;br&gt;                             AT+CMGD=3 &amp;lt;Enter&amp;gt;   To clear the SMS receive memory location                             in the GSM modem&lt;br&gt;&lt;br&gt;                             If the computer tries to read a empty/cleared memory location, a +CMS ERROR : 321                             will be sent to the computer.&lt;br&gt;&lt;br&gt;&lt;a name="Using a computer program to send and receive SMS"&gt;&lt;/a&gt;&lt;strong&gt;6. Using a                             computer program to send and receive SMS                              &lt;br&gt;                             &lt;/strong&gt;&lt;br&gt;                             Once we are able to work the modem using AT commands, we can use high-level programming                             ( eg. VB, C, Java ) to send the AT ASCII commands to and read messages from the COM                             serial port that the GSM modem is attached to.&lt;br&gt;&lt;br&gt;&lt;strong&gt;Developer Tip :&lt;/strong&gt; To speed up development of your solution, download                             trial versions of &lt;a onmouseover="window.status=&amp;#39;Download SerialTools .NET SDK&amp;#39;;return true;" onmouseout="window.status=&amp;#39; &amp;#39;;return true;" href="http://www.shareit.com/product.html?productid=193144&amp;amp;affiliateid=70562"&gt;SerialTools                             for C# and VB.NET&lt;/a&gt; or &lt;a onmouseover="window.status=&amp;#39;Download SerialTools ActiveX Trial SDK&amp;#39;;return true;" onmouseout="window.status=&amp;#39; &amp;#39;;return true;" href="http://www.shareit.com/product.html?productid=202720&amp;amp;affiliateid=70562"&gt;SerialTools                             ActiveX for Windows&lt;/a&gt; - with sample serial port ( modem ) reading and                             writing samples.&lt;br&gt;&lt;/font&gt;                                                                                                                                                                                                                                                                                                   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-1126911817292125164?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/using-at-commands-to-send-and-receive.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-6125993256093951105</guid><pubDate>Fri, 11 Jun 2010 12:18:00 +0000</pubDate><atom:updated>2010-06-11T05:18:22.974-07:00</atom:updated><title>Simple ASP.NET 2.0 Tips and Tricks</title><description>&lt;font size="4"&gt;&lt;b&gt;Simple &lt;a href="http://ASP.NET"&gt;ASP.NET&lt;/a&gt; 2.0 Tips and Tricks &lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;&lt;a href="http://ASP.NET"&gt;ASP.NET&lt;/a&gt; 2.0 is an awesome framework for developing Web applications.  If you&amp;#39;ve worked with it for awhile then that&amp;#39;s no secret.  It offers some great new features that you can implement with a minimal amount of code.  I wanted to start a list of some of the most simple (yet cool) things you could do with it that required little or no C#/&lt;a href="http://VB.NET"&gt;VB.NET&lt;/a&gt; code.  If you have other suggestions add a comment and I&amp;#39;ll update the list if the suggestion is a simple task that can be applied easily.&lt;/p&gt; &lt;p&gt;&lt;strong&gt; 1.&lt;/strong&gt;  &lt;strong&gt;Maintain the position of the scrollbar on postbacks&lt;/strong&gt;:  In &lt;a href="http://ASP.NET"&gt;ASP.NET&lt;/a&gt; 1.1 it was a pain to maintain the position of the scrollbar when doing a postback operation.  This was especially true when you had a grid on the page and went to edit a specific row.  Instead of staying on the desired row, the page would reload and you&amp;#39;d be placed back at the top and have to scroll down.  In &lt;a href="http://ASP.NET"&gt;ASP.NET&lt;/a&gt; 2.0 you can simply add the MaintainScrollPostionOnPostBack attribute to the Page directive:&lt;/p&gt; &lt;div class="code"&gt;&lt;span style="background-color: rgb(255, 255, 153);"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;%@&lt;/font&gt;&lt;font color="#ff0000"&gt; Page &lt;/font&gt;&lt;font color="#ff0000"&gt;Language&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;C#&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; MaintainScrollPositionOnPostback&lt;font color="#0000ff"&gt;=&amp;quot;true&amp;quot; &lt;/font&gt;AutoEventWireup&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;true&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; CodeFile&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;...&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; Inherits&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;...&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; %&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt; &lt;/div&gt;   &lt;p&gt;&lt;strong&gt;2.  Set the default focus to a control when the page loads&lt;/strong&gt;:  This is another extremely simple thing that can be done without resorting to writing JavaScript.  If you only have a single textbox (or two) on a page why should the user have to click in the textbox to start typing?  Shouldn&amp;#39;t the cursor already be blinking in the textbox so they can type away?  Using the DefaultFocus property of the HtmlForm control you can easily do this.&lt;/p&gt; &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;form&lt;/font&gt;&lt;font color="#ff0000"&gt; id&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;frm&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; DefaultFocus&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;txtUserName&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; runat&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;server&amp;quot;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;br&gt;    ...&lt;br&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;form&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt; &lt;/div&gt; &lt;p&gt;&lt;strong&gt;3. Set the default button that is triggered when the user hits the enter key:&lt;/strong&gt;  This was a major pain point in &lt;a href="http://ASP.NET"&gt;ASP.NET&lt;/a&gt; 1.1 and required some JavaScript to be written to ensure that when the user hit the enter key that the appropriate button on the form triggered a &amp;quot;click&amp;quot; event on the server-side.  Fortunately, you can now use the HtmlForm control&amp;#39;s DefaultButton property to set which button should be clicked when the user hits enter.  This property is also available on the Panel control in cases where different buttons should be triggered as a user moves into different Panels on a page.&lt;/p&gt; &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;form&lt;/font&gt;&lt;font color="#ff0000"&gt; id&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;frm&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; DefaultButton&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;btnSubmit&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; runat&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;server&amp;quot;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;br&gt;    ...&lt;br&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;form&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt; &lt;/div&gt; &lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt; &lt;strong&gt;Locate nested controls easily&lt;/strong&gt;: Finding controls within a Page&amp;#39;s control hierarchy can be painful but if you know how the controls are nested you can use the lesser known &amp;quot;$&amp;quot; shortcut to find controls without having to write recursive code.  If you&amp;#39;re looking for a great way to recursively find a control (in cases where you don&amp;#39;t know the exact control nesting) check out my good buddy &lt;a href="http://weblogs.asp.net/palermo4/archive/2007/04/13/recursive-findcontrol-t.aspx" target="_blank"&gt;Michael Palermo&amp;#39;s blog&lt;/a&gt; entry. The following example shows how to use the DefaultFocus property to set the focus on a textbox that is nested inside of a FormView control.  Notice that the &amp;quot;$&amp;quot; is used to delimit the nesting:&lt;/p&gt; &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;form&lt;/font&gt; &lt;font color="#ff0000"&gt;id&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;form1&amp;quot;&lt;/font&gt; &lt;font color="#ff0000"&gt;runat&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/font&gt; &lt;font color="#ff0000"&gt;DefaultFocus&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;formVw$txtName&amp;quot;&amp;gt;&lt;br&gt;      &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;br&gt;        &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;asp&lt;/font&gt;&lt;font color="#0000ff"&gt;:&lt;/font&gt;&lt;font color="#800000"&gt;FormView&lt;/font&gt; &lt;font color="#ff0000"&gt;ID&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;formVw&amp;quot;&lt;/font&gt; &lt;font color="#ff0000"&gt;runat&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;server&amp;quot;&amp;gt;&lt;br&gt;              &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;ItemTemplate&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;br&gt;                &lt;/font&gt;Name: &lt;br&gt;                &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;asp&lt;/font&gt;&lt;font color="#0000ff"&gt;:&lt;/font&gt;&lt;font color="#800000"&gt;TextBox&lt;/font&gt; &lt;font color="#ff0000"&gt;ID&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;txtName&amp;quot;&lt;/font&gt; &lt;font color="#ff0000"&gt;runat&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;server&amp;quot; &lt;br&gt;                      &lt;/font&gt;&lt;font color="#ff0000"&gt;Text&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;#39;&lt;/font&gt;&amp;lt;%# Eval(&amp;quot;FirstName&amp;quot;) + &amp;quot; &amp;quot; + Eval(&amp;quot;LastName&amp;quot;) %&amp;gt;&lt;font color="#0000ff"&gt;&amp;#39;&lt;/font&gt; &lt;font color="#0000ff"&gt;/&amp;gt;&lt;br&gt;              &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;ItemTemplate&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;br&gt;        &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;asp&lt;/font&gt;&lt;font color="#0000ff"&gt;:&lt;/font&gt;&lt;font color="#800000"&gt;FormView&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;br&gt;      &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;br&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;form&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/div&gt;  &lt;p&gt;This little trick can also be used on the server-side when calling FindControl().  &lt;a href="http://weblogs.asp.net/dwahlin/archive/2006/08/25/Finding-ASP.NET-Child-Controls_2E002E002E002E00_The-Simple-Way.aspx" target="_blank"&gt;I blogged about this&lt;/a&gt; awhile back if you&amp;#39;d like more details.  Here&amp;#39;s an example:&lt;/p&gt;   &lt;div class="code"&gt;&lt;font color="#000000"&gt;TextBox tb &lt;/font&gt;&lt;font color="#0000ff"&gt;= this&lt;/font&gt;&lt;font color="#000000"&gt;.FindControl(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;form1$formVw$txtName&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;) &lt;/font&gt;&lt;font color="#0000ff"&gt;as &lt;/font&gt;&lt;font color="#000000"&gt;TextBox&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;br&gt;  if &lt;/font&gt;&lt;font color="#000000"&gt;(tb !&lt;/font&gt;&lt;font color="#0000ff"&gt;= null&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;br&gt;{&lt;br&gt;    &lt;/font&gt;&lt;font color="#006400"&gt;//Access TextBox control&lt;br&gt;&lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt; &lt;/div&gt; &lt;p&gt;&lt;strong&gt;5.&lt;/strong&gt; &lt;strong&gt;Strongly-typed access to cross-page postback controls:&lt;/strong&gt;  This one is a little more involved than the others, but quite useful.  &lt;a href="http://ASP.NET"&gt;ASP.NET&lt;/a&gt; 2.0 introduced the concept of cross-page postbacks where one page could postback information to a page other than itself.  This is done by setting the PostBackUrl property of a button to the name of the page that the button should postback data to.  Normally, the posted data can be accessed by doing something like PreviousPage.FindControl(&amp;quot;ControlID&amp;quot;).  However, this requires a cast if you need to access properties of the target control in the previous page (which you normally need to do).  If you add a public property into the code-behind page that initiates the postback operation, you can access the property in a strongly-typed manner by adding the PreviousPageType directive into the target page of the postback.  That may sound a little confusing if you haven&amp;#39;t done it so let me explain a little more.&lt;/p&gt; &lt;p&gt;If you have a page called Default.aspx that exposes a public property that returns a Textbox that is defined in the page, the page that data is posted to (lets call it SearchResults.aspx) can access that property in a strongly-typed manner (no FindControl() call is necessary) by adding the PreviousPageType directive into the top of the page:&lt;/p&gt; &lt;div class="code"&gt;&lt;span style="background-color: rgb(255, 255, 153);"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;%@&lt;/font&gt;&lt;font color="#ff0000"&gt; PreviousPageType VirtualPath&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;Default.aspx&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; %&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt; &lt;/div&gt;   &lt;p&gt;By adding this directive, the code in SearchResults.aspx can access the TextBox defined in Default.aspx in a strongly-typed manner.  The following example assumes the property defined in Default.aspx is named SearchTextBox.&lt;/p&gt; &lt;div class="code"&gt;&lt;font color="#000000"&gt;TextBox tb &lt;/font&gt;&lt;font color="#0000ff"&gt;= &lt;/font&gt;&lt;font color="#000000"&gt;PreviousPage.SearchTextBox&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt; &lt;/div&gt; &lt;p&gt;This code obviously only works if the previous page is Default.aspx.  PreviousPageType also has a TypeName property as well where you could define a base type that one or more pages derive from to make this technique work with multiple pages.  You can &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.page.previouspage.aspx" target="_blank"&gt;learn more about PreviousPageType here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;6. Strongly-typed access to Master Pages controls:&lt;/strong&gt; The PreviousPageType directive isn&amp;#39;t the only one that provides strongly-typed access to controls.  If you have public properties defined in a Master Page that you&amp;#39;d like to access in a strongly-typed manner you can add the MasterType directive into a page as shown next (note that the MasterType directive also allows a TypeName to be defined as with the PreviousPageType directive):&lt;/p&gt; &lt;div class="code"&gt;&lt;span style="background-color: rgb(255, 255, 153);"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;%@&lt;/font&gt;&lt;font color="#ff0000"&gt; MasterType VirtualPath&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;MasterPage.master&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; %&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt; &lt;/div&gt;   &lt;p&gt;You can then access properties in the target master page from a content page by writing code like the following:&lt;/p&gt; &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;this&lt;/font&gt;&lt;font color="#000000"&gt;.Master.HeaderText &lt;/font&gt;&lt;font color="#0000ff"&gt;= &lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;Label updated using MasterType directive with VirtualPath attribute.&amp;quot;&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt; &lt;/div&gt;   &lt;p&gt;You can find several other tips and tricks related to working with master pages including sharing master pages across IIS virtual directories at a &lt;a href="http://weblogs.asp.net/dwahlin/archive/2006/08/22/Master-Pages-Tips-and-Tricks.aspx" target="_blank"&gt;previous blog post I wrote&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;7. Validation groups&lt;/strong&gt;: You may have a page that has multiple controls and multiple buttons.  When one of the buttons is clicked you want specific validator controls to be evaluated rather than all of the validators defined on the page.  With &lt;a href="http://ASP.NET"&gt;ASP.NET&lt;/a&gt; 1.1 there wasn&amp;#39;t a great way to handle this without resorting to some hack code.  &lt;a href="http://ASP.NET"&gt;ASP.NET&lt;/a&gt; 2.0 adds a ValidationGroup property to all validator controls and buttons (Button, LinkButton, etc.) that easily solves the problem.  If you have a TextBox at the top of a page that has a RequiredFieldValidator next to it and a Button control, you can fire that one validator when the button is clicked by setting the ValidationGroup property on the button and on the RequiredFieldValidator to the same value.  Any other validators not in the defined ValidationGroup will be ignored when the button is clicked. Here&amp;#39;s an example:&lt;/p&gt; &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;form&lt;/font&gt;&lt;font color="#ff0000"&gt; id&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;form1&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; runat&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;server&amp;quot;&amp;gt;&lt;br&gt;  &lt;/font&gt;&lt;font color="#000000"&gt;&lt;br&gt;    Search Text: &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;asp:TextBox&lt;/font&gt;&lt;font color="#ff0000"&gt; ID&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;txtSearch&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; runat&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;/&amp;gt; &lt;br&gt;  &lt;br&gt;    &amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;asp:RequiredFieldValidator&lt;/font&gt;&lt;font color="#ff0000"&gt; ID&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;valSearch&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; runat&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;Server&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; &lt;br&gt;        ControlToValidate&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;txtSearch&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; &lt;strong&gt;ValidationGroup&lt;/strong&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&lt;strong&gt;=&amp;quot;SearchGroup&amp;quot;&lt;/strong&gt;&lt;/font&gt;&lt;font color="#ff0000"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;/&amp;gt; &lt;br&gt;  &lt;br&gt;    &amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;asp:Button&lt;/font&gt;&lt;font color="#ff0000"&gt; ID&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;btnSearch&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; runat&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; Text&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;Search&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; &lt;br&gt;        &lt;strong&gt;ValidationGroup&lt;/strong&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&lt;strong&gt;=&amp;quot;SearchGroup&amp;quot;&lt;/strong&gt;&lt;/font&gt;&lt;font color="#ff0000"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;/&amp;gt;&lt;br&gt;    ....&lt;br&gt;    Other controls with validators and buttons defined here&lt;br&gt;  &amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;form&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt; &lt;/div&gt; &lt;p&gt;&lt;strong&gt;8. Finding control/variable names while typing code:&lt;/strong&gt;  This tip is a bit more related to Visual Studio than to &lt;a href="http://ASP.NET"&gt;ASP.NET&lt;/a&gt; directly, but it&amp;#39;s definitely helpful for those of you who remember the first few characters of control variable name (or any variable for that matter) but can&amp;#39;t remember the complete name.  It also gives me the chance to mention two great downloads from Microsoft.  First the tip though.  After typing the first few characters of a control/variable name, hit CTRL + SPACEBAR and Visual will bring up a short list of matching items.  Definitely a lot easier than searching for the control/variable definition.  Thanks to Darryl for the tip.  For those who are interested, Microsoft made all of the &lt;a href="http://VS.NET"&gt;VS.NET&lt;/a&gt; keyboard shortcuts available in a nice downloadable and printable guide.  Get the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=E5F902A8-5BB5-4CC6-907E-472809749973&amp;amp;displaylang=en" target="_blank"&gt;C# version here&lt;/a&gt; and the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=255b8cf1-f6bd-4b55-bb42-dd1a69315833&amp;amp;displaylang=en" target="_blank"&gt;Visual Basic version here&lt;/a&gt;.&lt;/p&gt;   &lt;p&gt;That&amp;#39;s all for now.  There are a lot of other things that could be mentioned and I&amp;#39;ll try to keep this post updated.  Have a great (simple) &lt;a href="http://ASP.NET"&gt;ASP.NET&lt;/a&gt; 2.0 tip or trick?  Post the details in the comments and I&amp;#39;ll add it if the content is appropriate for the list.  Make sure to list your name so I can give proper credit.&lt;/p&gt; &lt;p&gt;For those who are interested, you can also view videos I&amp;#39;ve put together that show how to accomplish different tasks from working with AJAX, to &lt;a href="http://ASP.NET"&gt;ASP.NET&lt;/a&gt; to Web Services and WCF at the following URL:&lt;/p&gt; &lt;p&gt;&lt;a href="http://weblogs.asp.net/dwahlin/archive/tags/Video/default.aspx"&gt;http://weblogs.asp.net/dwahlin/archive/tags/Video/default.aspx&lt;/a&gt;&lt;/p&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-6125993256093951105?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/simple-aspnet-20-tips-and-tricks.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-2333574850437805824</guid><pubDate>Fri, 11 Jun 2010 12:14:00 +0000</pubDate><atom:updated>2010-06-11T05:15:12.866-07:00</atom:updated><title>SQL Server interview auestions and answers</title><description>&lt;p&gt;&lt;b&gt;1. What is normalization? Explain different levels of normalization?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Check out the article Q100139 from &lt;span class="IL_AD" id="IL_AD2"&gt;Microsoft knowledge base&lt;/span&gt; and of&lt;br&gt;course, there&amp;#39;s much more &lt;span class="IL_AD" id="IL_AD6"&gt;information&lt;/span&gt; available in the net. It&amp;#39;ll be a&lt;br&gt;  good idea to get a hold of any RDBMS fundamentals text book,&lt;br&gt;especially the one by C. J. Date. Most &lt;span class="IL_AD" id="IL_AD7"&gt;of the&lt;/span&gt; times, it will be okay&lt;br&gt;if you can explain till third normal form.&lt;/p&gt;  &lt;br&gt;&lt;p&gt;&lt;b&gt;2. What is denormalization and when would you go for it?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;As the name indicates, denormalization is the reverse process of&lt;br&gt;normalization. It&amp;#39;s the controlled introduction of redundancy in to&lt;br&gt;  the &lt;span class="IL_AD" id="IL_AD1"&gt;database design&lt;/span&gt;. It helps improve the query performance as the&lt;br&gt;number of joins could be reduced.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;3. How do you implement one-to-one, one-to-many and many-to-many&lt;br&gt;  relationships while designing tables?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;One-to-One relationship can be implemented as a single table and&lt;br&gt;rarely as two tables with primary and foreign key relationships.&lt;br&gt;One-to-Many relationships are implemented by splitting the data into&lt;br&gt;  two tables with &lt;span class="IL_AD" id="IL_AD4"&gt;primary key&lt;/span&gt; and foreign key relationships.&lt;br&gt;Many-to-Many relationships are implemented using a junction table with&lt;br&gt;the keys from both the tables forming the composite primary key of the&lt;br&gt;  junction table.&lt;/p&gt;&lt;br&gt;&lt;p&gt;It will be a good idea to read up a database designing fundamentals&lt;br&gt;text book.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;4. What&amp;#39;s the difference between a primary key and a unique key?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Both primary key and unique enforce uniqueness of the column on which&lt;br&gt;  they are defined. But by default primary key creates a clustered index&lt;br&gt;on the column, where are unique creates a nonclustered index by&lt;br&gt;default. Another major difference is that, primary key doesn&amp;#39;t allow&lt;br&gt;NULLs, but unique key allows one NULL only.&lt;/p&gt;  &lt;br&gt;&lt;p&gt;&lt;b&gt;5. What are user defined datatypes and when you should go for them?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;User defined datatypes let you extend the base SQL Server datatypes by&lt;br&gt;providing a descriptive name, and format to the database. Take for&lt;br&gt;  example, in your database, there is a column called Flight_Num which&lt;br&gt;appears in many tables. In all these tables it should be varchar(8).&lt;br&gt;In this case you could create a user defined datatype called&lt;br&gt;Flight_num_type of varchar(8) and use it across all your tables.&lt;/p&gt;  &lt;br&gt;&lt;p&gt;See sp_addtype, sp_droptype in &lt;span class="IL_AD" id="IL_AD5"&gt;books online&lt;/span&gt;.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;6. What is bit datatype and what&amp;#39;s the information that can be stored&lt;br&gt;inside a bit column?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Bit datatype is used to store boolean information like 1 or 0 (true or&lt;br&gt;  false). Untill SQL Server 6.5 bit datatype could hold either a 1 or 0&lt;br&gt;and there was no support for NULL. But from SQL Server 7.0 onwards,&lt;br&gt;bit datatype can represent a third state, which is NULL.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Define candidate key, alternate key, composite key.&lt;/p&gt;  &lt;br&gt;&lt;p&gt;A candidate key is one that can identify each row of a table uniquely.&lt;br&gt;Generally a candidate key becomes the primary key of the table. If the&lt;br&gt;table has more than one candidate key, one of them will become the&lt;br&gt;  primary key, and the rest are called alternate keys.&lt;/p&gt;&lt;br&gt;&lt;p&gt;A key formed by combining at least two or more columns is called&lt;br&gt;composite key.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;7. What are defaults? Is there a column to which a default can&amp;#39;t be bound?&lt;/b&gt;&lt;/p&gt;  &lt;br&gt;&lt;p&gt;A default is a value that will be used by a column, if no value is&lt;br&gt;supplied to that column while inserting data. IDENTITY columns and&lt;br&gt;timestamp columns can&amp;#39;t have defaults bound to them. See CREATE&lt;br&gt;DEFUALT in books online.&lt;/p&gt;  &lt;br&gt;&lt;p&gt;Back to top&lt;br&gt;SQL Server architecture       (top)&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;8. What is a transaction and what are ACID properties?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;A transaction is a logical unit of work in which, all the steps must&lt;br&gt;be performed or none. ACID stands for Atomicity, Consistency,&lt;br&gt;  Isolation, Durability. These are the properties of a transaction. For&lt;br&gt;more information and explanation of these properties, see SQL Server&lt;br&gt;books online or any RDBMS fundamentals text book.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;9. Explain different isolation levels&lt;/b&gt;&lt;/p&gt;  &lt;br&gt;&lt;p&gt;An isolation level determines the degree of isolation of data between&lt;br&gt;concurrent transactions. The default SQL Server isolation level is&lt;br&gt;Read Committed. Here are the other isolation levels (in the ascending&lt;br&gt;  order of isolation): Read Uncommitted, Read Committed, Repeatable&lt;br&gt;Read, Serializable. See SQL Server books online for an explanation of&lt;br&gt;the isolation levels. Be sure to read about SET TRANSACTION ISOLATION&lt;br&gt;LEVEL, which lets you customize the isolation level at the connection&lt;br&gt;  level.&lt;/p&gt;&lt;br&gt;&lt;p&gt;CREATE INDEX myIndex ON myTable(myColumn)&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;10. What type of Index will get created after executing the above statement?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Non-clustered index. Important thing to note: By default a clustered&lt;br&gt;  index gets created on the primary key, unless specified otherwise.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;11. What&amp;#39;s the maximum size of a row?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;8060 bytes. Don&amp;#39;t be surprised with questions like &amp;#39;what is the&lt;br&gt;maximum number of columns per table&amp;#39;. Check out SQL Server books&lt;br&gt;  online for the page titled: &amp;quot;Maximum Capacity Specifications&amp;quot;.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;12. Explain Active/Active and Active/Passive cluster configurations&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Hopefully you have experience setting up cluster servers. But if you&lt;br&gt;  don&amp;#39;t, at least be familiar with the way clustering works and the two&lt;br&gt;clusterning configurations Active/Active and Active/Passive. SQL&lt;br&gt;Server books online has enough information on this topic and there is&lt;br&gt;a good white paper available on Microsoft site.&lt;/p&gt;  &lt;br&gt;&lt;p&gt;&lt;b&gt;13. Explain the architecture of SQL Server&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;This is a very important question and you better be able to answer it&lt;br&gt;if consider yourself a DBA. SQL Server books online is the best place&lt;br&gt;to read about SQL Server architecture. Read up the chapter dedicated&lt;br&gt;  to SQL Server Architecture.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;14. What is lock escalation?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Lock escalation is the process of converting a lot of low level locks&lt;br&gt;(like row locks, page locks) into higher level locks (like table&lt;br&gt;  locks). Every lock is a memory structure too many locks would mean,&lt;br&gt;more memory being occupied by locks. To prevent this from happening,&lt;br&gt;SQL Server escalates the many fine-grain locks to fewer coarse-grain&lt;br&gt;locks. Lock escalation threshold was definable in SQL Server 6.5, but&lt;br&gt;  from SQL Server 7.0 onwards it&amp;#39;s dynamically managed by SQL Server.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;15. What&amp;#39;s the difference between DELETE TABLE and TRUNCATE TABLE commands?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;DELETE TABLE is a logged operation, so the deletion of each row gets&lt;br&gt;  logged in the transaction log, which makes it slow. TRUNCATE TABLE&lt;br&gt;also deletes all the rows in a table, but it won&amp;#39;t log the deletion of&lt;br&gt;each row, instead it logs the deallocation of the data pages of the&lt;br&gt;table, which makes it faster. Of course, TRUNCATE TABLE can be rolled&lt;br&gt;  back.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;16. Explain the storage models of OLAP&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Check out MOLAP, ROLAP and HOLAP in SQL Server books online for more&lt;br&gt;infomation.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;17. What are the new features introduced in SQL Server 2000 (or the latest&lt;br&gt;  release of SQL Server at the time of your interview)? What changed&lt;br&gt;between the previous version of SQL Server and the current version?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;This question is generally asked to see how current is your knowledge.&lt;br&gt;  Generally there is a section in the beginning of the books online&lt;br&gt;titled &amp;quot;What&amp;#39;s New&amp;quot;, which has all such information. Of course,&lt;br&gt;reading just that is not enough, you should have tried those things to&lt;br&gt;  better answer the questions. Also check out the section titled&lt;br&gt;&amp;quot;Backward Compatibility&amp;quot; in books online which talks about the changes&lt;br&gt;that have taken place in the new version.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;18. What are constraints? Explain different types of constraints.&lt;/b&gt;&lt;/p&gt;  &lt;br&gt;&lt;p&gt;Constraints enable the RDBMS enforce the integrity of the database&lt;br&gt;automatically, without needing you to create triggers, rule or defaults.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Types of constraints: NOT NULL, CHECK, UNIQUE, PRIMARY KEY, FOREIGN KEY&lt;/p&gt;  &lt;br&gt;&lt;p&gt;For an explanation of these constraints see books online for the pages&lt;br&gt;titled: &amp;quot;Constraints&amp;quot; and &amp;quot;&lt;span class="IL_AD" id="IL_AD8"&gt;CREATE TABLE&lt;/span&gt;&amp;quot;, &amp;quot;ALTER TABLE&amp;quot;&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;19. Whar is an index? What are the types of &lt;span class="IL_AD" id="IL_AD3"&gt;indexes&lt;/span&gt;? How many clustered&lt;br&gt;  indexes can be created on a table? I create a separate index on each&lt;br&gt;column of a table. what are the advantages and disadvantages of this&lt;br&gt;approach?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Indexes in SQL Server are similar to the indexes in books. They help&lt;br&gt;  SQL Server retrieve the data quicker.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Indexes are of two types. Clustered indexes and non-clustered indexes.&lt;br&gt;When you craete a clustered index on a table, all the rows in the&lt;br&gt;table are stored in the order of the clustered index key. So, there&lt;br&gt;  can be only one clustered index per table. Non-clustered indexes have&lt;br&gt;their own storage separate from the table data storage. Non-clustered&lt;br&gt;indexes are stored as B-tree structures (so do clustered indexes),&lt;br&gt;with the leaf level nodes having the index key and it&amp;#39;s row locater.&lt;br&gt;  The row located could be the RID or the Clustered index key, depending&lt;br&gt;up on the absence or presence of clustered index on the table.&lt;/p&gt;&lt;br&gt;&lt;p&gt;If you create an index on each column of a table, it improves the&lt;br&gt;query performance, as the query optimizer can choose from all the&lt;br&gt;  existing indexes to come up with an efficient execution plan. At the&lt;br&gt;same t ime, data modification operations (such as INSERT, UPDATE,&lt;br&gt;DELETE) will become slow, as every time data changes in the table, all&lt;br&gt;the indexes need to be updated. Another disadvantage is that, indexes&lt;br&gt;  need disk space, the more indexes you have, more disk space is used.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Back to top&lt;br&gt;Database administration       (top)&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;20. What is RAID and what are different types of RAID configurations?&lt;/b&gt;&lt;/p&gt; &lt;br&gt; &lt;p&gt;RAID stands for Redundant Array of Inexpensive Disks, used to provide&lt;br&gt;fault tolerance to database servers. There are six RAID levels 0&lt;br&gt;through 5 offering different levels of performance, fault tolerance.&lt;br&gt;MSDN has some information about RAID levels and for detailed&lt;br&gt;  information, check out the RAID advisory board&amp;#39;s homepage&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;21. What are the steps you will take to improve performance of a poor&lt;br&gt;performing query?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;This is a very open ended question and there could be a lot of reasons&lt;br&gt;  behind the poor performance of a query. But some general issues that&lt;br&gt;you could talk about would be: No indexes, table scans, missing or out&lt;br&gt;of date statistics, blocking, excess recompilations of stored&lt;br&gt;procedures, procedures and triggers without SET NOCOUNT ON, poorly&lt;br&gt;  written query with unnecessarily complicated joins, too much&lt;br&gt;normalization, excess usage of cursors and temporary tables.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Some of the tools/ways that help you troubleshooting performance&lt;br&gt;problems are: SET SHOWPLAN_ALL ON, SET SHOWPLAN_TEXT ON, SET&lt;br&gt;  STATISTICS IO ON, SQL Server Profiler, Windows NT /2000 Performance&lt;br&gt;monitor, Graphical execution plan in Query Analyzer.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Download the white paper on performance tuning SQL Server from&lt;br&gt;Microsoft web site. Don&amp;#39;t forget to check out &lt;a href="http://sql-server-performance.com"&gt;sql-server-performance.com&lt;/a&gt;&lt;/p&gt;  &lt;br&gt;&lt;p&gt;&lt;b&gt;22. What are the steps you will take, if you are tasked with securing an&lt;br&gt;SQL Server?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Again this is another open ended question. Here are some things you&lt;br&gt;could talk about: Preferring NT authentication, using server, databse&lt;br&gt;  and application roles to control access to the data, securing the&lt;br&gt;physical database files using NTFS permissions, using an unguessable&lt;br&gt;SA password, restricting physical access to the SQL Server, renaming&lt;br&gt;the Administrator account on the SQL Server computer, disabling the&lt;br&gt;  Guest account, enabling auditing, using multiprotocol encryption,&lt;br&gt;setting up SSL, setting up firewalls, isolating SQL Server from the&lt;br&gt;web server etc.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Read the white paper on SQL Server security from Microsoft website.&lt;br&gt;  Also check out My SQL Server security best practices&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;23. What is a deadlock and what is a live lock? How will you go about&lt;br&gt;resolving deadlocks?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Deadlock is a situation when two processes, each having a lock on one&lt;br&gt;  piece of data, attempt to acquire a lock on the other&amp;#39;s piece. Each&lt;br&gt;process  would wait indefinitely for the other to release the lock,&lt;br&gt;unless one of the user processes is terminated. SQL Server detects&lt;br&gt;deadlocks and terminates one user&amp;#39;s process.&lt;/p&gt;  &lt;br&gt;&lt;p&gt;A livelock is one, where a  request for an exclusive lock is&lt;br&gt;repeatedly denied because a series of overlapping shared locks keeps&lt;br&gt;interfering. SQL Server detects the situation after four denials and&lt;br&gt;refuses further shared locks. A livelock also occurs when read&lt;br&gt;  transactions monopolize a table or page, forcing a write transaction&lt;br&gt;to wait indefinitely.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Check out SET DEADLOCK_PRIORITY and &amp;quot;Minimizing Deadlocks&amp;quot;  in SQL&lt;br&gt;Server books online. Also check out the article Q169960 from Microsoft&lt;br&gt;  knowledge base.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;24. What is blocking and how would you troubleshoot it?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Blocking happens when one connection from an application holds a lock&lt;br&gt;and a second connection requires a conflicting lock type. This forces&lt;br&gt;  the second connection to wait, blocked on the first.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Read up the following topics in SQL Server books online: Understanding&lt;br&gt;and avoiding blocking, Coding efficient transactions.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;25. Explain CREATE DATABASE syntax&lt;/b&gt;&lt;/p&gt;  &lt;br&gt;&lt;p&gt;Many of us are used to craeting databases from the Enterprise Manager&lt;br&gt;or by just issuing the command: CREATE DATABAE MyDB. But what if you&lt;br&gt;have to create a database with two filegroups, one on drive C and the&lt;br&gt;  other on drive D with log on drive E with an initial size of 600 MB&lt;br&gt;and with a growth factor of 15%? That&amp;#39;s why being a DBA you should be&lt;br&gt;familiar with the CREATE DATABASE syntax. Check out SQL Server books&lt;br&gt; online for more information.&lt;/p&gt; &lt;br&gt;&lt;p&gt;&lt;b&gt;26. How to restart SQL Server in single user mode? How to start SQL Server&lt;br&gt;in minimal configuration mode?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;SQL Server can be started from command line, using the SQLSERVR.EXE.&lt;br&gt;This EXE has some very important parameters with which a DBA should be&lt;br&gt;  familiar with. -m is used for starting SQL Server in single user mode&lt;br&gt;and -f is used to start the SQL Server in minimal confuguration mode.&lt;br&gt;Check out SQL Server books online for more parameters and their&lt;br&gt;explanations.&lt;/p&gt;  &lt;br&gt;&lt;p&gt;As a part of your job, what are the DBCC commands that you commonly&lt;br&gt;use for database maintenance?&lt;/p&gt;&lt;br&gt;&lt;p&gt;DBCC CHECKDB, DBCC CHECKTABLE, DBCC CHECKCATALOG, DBCC CHECKALLOC,&lt;br&gt;DBCC SHOWCONTIG, DBCC SHRINKDATABASE, DBCC SHRINKFILE etc. But there&lt;br&gt;  are a whole load of DBCC commands which are very useful for DBAs.&lt;br&gt;Check out SQL Server books online for more information.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;27. What are statistics, under what circumstances they go out of date, how&lt;br&gt;do you update them?&lt;/b&gt;&lt;/p&gt;  &lt;br&gt;&lt;p&gt;Statistics determine the selectivity of the indexes. If an indexed&lt;br&gt;column has unique values then the selectivity of that index is more,&lt;br&gt;as opposed to an index with non-unique values. Query optimizer uses&lt;br&gt; these indexes in determining whether to choose an index or not while&lt;br&gt; executing a query.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Some situations under which you should update statistics:&lt;br&gt;1) If there is significant change in the key values in the index&lt;br&gt;2) If a large amount of data in an indexed column has been added,&lt;br&gt;  changed, or removed (that is, if the distribution of key values has&lt;br&gt;changed), or the table has been truncated using the TRUNCATE TABLE&lt;br&gt;statement and then repopulated&lt;br&gt;3) Database is upgraded from a previous version&lt;/p&gt;  &lt;br&gt;&lt;p&gt;Look up SQL Server books online for the following commands: UPDATE&lt;br&gt;STATISTICS, STATS_DATE, DBCC SHOW_STATISTICS, CREATE STATISTICS, DROP&lt;br&gt;STATISTICS, sp_autostats, sp_createstats, sp_updatestats&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;28. What are the different ways of moving data/databases between servers&lt;br&gt;  and databases in SQL Server?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;There are lots of options available, you have to choose your option&lt;br&gt;depending upon your requirements. Some of the options you have are:&lt;br&gt;BACKUP/RESTORE, dettaching and attaching databases, replication, DTS,&lt;br&gt;  BCP, logshipping, INSERT...SELECT, SELECT...INTO, creating INSERT&lt;br&gt;scripts to generate data.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;29. Explian different types of BACKUPs avaialabe in SQL Server? Given a&lt;br&gt;particular scenario, how would you go about choosing a backup plan?&lt;/b&gt;&lt;/p&gt;  &lt;br&gt;&lt;p&gt;Types of backups you can create in SQL Sever 7.0+ are Full database&lt;br&gt;backup, differential database backup, transaction log backup,&lt;br&gt;filegroup backup. Check out the BACKUP and RESTORE commands in SQL&lt;br&gt;Server books online. Be prepared to write the commands in your&lt;br&gt;  interview. Books online also has information on detailed&lt;br&gt;backup/restore architecture and when one should go for a particular&lt;br&gt;kind of backup.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;30. What is database replicaion? What are the different types of&lt;br&gt;  replication you can set up in SQL Server?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Replication is the process of copying/moving data between databases on&lt;br&gt;the same or different servers. SQL Server supports the following types&lt;br&gt;of replication scenarios:&lt;/p&gt;  &lt;br&gt;&lt;p&gt;    * Snapshot replication&lt;br&gt;    * Transactional replication (with immediate updating subscribers,&lt;br&gt;with queued updating subscribers)&lt;br&gt;    * Merge replication&lt;/p&gt;&lt;br&gt;&lt;p&gt;See SQL Server books online for indepth coverage on replication. Be&lt;br&gt;  prepared to explain how different replication agents function, what&lt;br&gt;are the main system tables used in replication etc.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;31. How to determine the service pack currently installed on SQL Server?&lt;/b&gt;&lt;/p&gt;&lt;br&gt; &lt;p&gt; The global variable @@Version stores the build number of the&lt;br&gt;sqlservr.exe, which is used to determine the service pack installed.&lt;br&gt;To know more about this process visit SQL Server service packs and&lt;br&gt;versions.&lt;/p&gt;&lt;br&gt;  &lt;p&gt;Back to top&lt;br&gt;Database programming       (top)&lt;/p&gt;&lt;b&gt;&lt;br&gt;&lt;/b&gt;&lt;p&gt;&lt;b&gt;32. What are cursors? Explain different types of cursors. What are the&lt;br&gt;disadvantages of cursors? How can you avoid cursors?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Cursors allow row-by-row prcessing of the resultsets.&lt;/p&gt;  &lt;br&gt;&lt;p&gt;Types of cursors: Static, Dynamic, Forward-only, Keyset-driven. See&lt;br&gt;books online for more information.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Disadvantages of cursors: Each time you fetch a row from the cursor,&lt;br&gt;it results in a network roundtrip, where as a normal SELECT query&lt;br&gt;  makes only one rowundtrip, however large the resultset is. Cursors are&lt;br&gt;also costly because they require more resources and temporary storage&lt;br&gt;(results in more IO operations). Furthere, there are restrictions on&lt;br&gt;the SELECT statements that can be used with some types of cursors.&lt;/p&gt;  &lt;br&gt;&lt;p&gt;Most of the times, set based operations can be used instead of&lt;br&gt;cursors. Here is an example:&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;33. If you have to give a flat hike to your employees using the following&lt;br&gt;criteria:&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Salary between 30000 and 40000 -- 5000 hike&lt;br&gt;  Salary between 40000 and 55000 -- 7000 hike&lt;br&gt;Salary between 55000 and 65000 -- 9000 hike&lt;/p&gt;&lt;br&gt;&lt;p&gt;In this situation many developers tend to use a cursor, determine each&lt;br&gt;employee&amp;#39;s salary and update his salary according to the above&lt;br&gt;  formula. But the same can be achieved by multiple update statements or&lt;br&gt;can be combined in a single UPDATE statement as shown below:&lt;/p&gt;&lt;br&gt;&lt;p&gt;UPDATE tbl_emp SET salary =&lt;br&gt;CASE WHEN salary BETWEEN 30000 AND 40000 THEN salary + 5000&lt;br&gt;  WHEN salary BETWEEN 40000 AND 55000 THEN salary + 7000&lt;br&gt;WHEN salary BETWEEN 55000 AND 65000 THEN salary + 10000&lt;br&gt;END&lt;/p&gt;&lt;br&gt;&lt;p&gt;Another situation in which developers tend to use cursors: You need to&lt;br&gt;call a stored procedure when a column in a particular row meets&lt;br&gt;  certain condition. You don&amp;#39;t have to use cursors for this. This can be&lt;br&gt;achieved using WHILE loop, as long as there is a unique key to&lt;br&gt;identify each row. For examples of using WHILE loop for row by row&lt;br&gt;processing, check out the &amp;#39;My code library&amp;#39; section of my site or&lt;br&gt;  search for WHILE.&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;34. Write down the general syntax for a SELECT statements covering all the&lt;br&gt;options.&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Here&amp;#39;s the basic syntax: (Also checkout SELECT in books online for&lt;br&gt;advanced syntax).&lt;/p&gt;  &lt;br&gt;&lt;p&gt;SELECT select_list&lt;br&gt;[INTO new_table_]&lt;br&gt;FROM table_source&lt;br&gt;[WHERE search_condition]&lt;br&gt;[GROUP BY group_by__expression]&lt;br&gt;[HAVING search_condition]&lt;br&gt;[ORDER BY order__expression [ASC | DESC] ]&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;35. What is a join and explain different types of joins.&lt;/b&gt;&lt;/p&gt;  &lt;br&gt;&lt;p&gt;Joins are used in queries to explain how different tables are related.&lt;br&gt;Joins also let you select data from a table depending upon data from&lt;br&gt;another table.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Types of joins: INNER JOINs, OUTER JOINs, CROSS JOINs. OUTER JOINs are&lt;br&gt;  further classified as LEFT OUTER JOINS, RIGHT OUTER JOINS and FULL&lt;br&gt;OUTER JOINS.&lt;/p&gt;&lt;br&gt;&lt;p&gt;For more information see pages from books online titled: &amp;quot;Join&lt;br&gt;Fundamentals&amp;quot; and &amp;quot;Using Joins&amp;quot;.&lt;/p&gt;&lt;br&gt;&lt;p&gt;  &lt;b&gt;36. Can you have a nested transaction?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Yes, very much. Check out BEGIN TRAN, COMMIT, ROLLBACK, SAVE TRAN and&lt;br&gt;@@TRANCOUNT&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;37. What is an extended stored procedure? Can you instantiate a COM object&lt;br&gt;  by using T-SQL?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;An extended stored procedure is a function within a DLL (written in a&lt;br&gt;programming language like C, C++ using Open Data Services (ODS) API)&lt;br&gt;that can be called from T-SQL, just the way we call normal stored&lt;br&gt;  procedures using the EXEC statement. See books online to learn how to&lt;br&gt;create extended stored procedures and how to add them to SQL Server.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Yes, you can instantiate a COM (written in languages like VB, VC++)&lt;br&gt;  object from T-SQL by using sp_OACreate stored procedure. Also see&lt;br&gt;books online for sp_OAMethod, sp_OAGetProperty, sp_OASetProperty,&lt;br&gt;sp_OADestroy. For an example of creating a COM object in VB and&lt;br&gt;calling it from T-SQL, see &amp;#39;My code library&amp;#39; section of this site.&lt;/p&gt;  &lt;br&gt;&lt;p&gt;&lt;b&gt;38. What is the system function to get the current user&amp;#39;s user id?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;USER_ID(). Also check out other system functions like USER_NAME(),&lt;br&gt;SYSTEM_USER, SESSION_USER, CURRENT_USER, USER, SUSER_SID(), HOST_NAME().&lt;/p&gt;  &lt;br&gt;&lt;p&gt;&lt;b&gt;39. What are triggers? How many triggers you can have on a table? How to&lt;br&gt;invoke a trigger on demand?&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Triggers are special kind of stored procedures that get executed&lt;br&gt;automatically when an INSERT, UPDATE or DELETE operation takes place&lt;br&gt;  on a table.&lt;/p&gt;&lt;br&gt;&lt;p&gt;In SQL Server 6.5 you could define only 3 triggers per table, one for&lt;br&gt;INSERT, one for UPDATE and one for DELETE. From SQL Server 7.0&lt;br&gt;onwards, this restriction is gone, and you could create multiple&lt;br&gt;  triggers per each action. But in 7.0 there&amp;#39;s no way to control the&lt;br&gt;order in which the triggers fire. In SQL Server 2000 you could specify&lt;br&gt;which trigger fires first or fires last using sp_settriggerorder&lt;/p&gt;&lt;br&gt; &lt;p&gt; Triggers can&amp;#39;t be invoked on demand. They get triggered only when an&lt;br&gt;associated action (INSERT, UPDATE, DELETE) happens on the table on&lt;br&gt;which they are defined.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Triggers are generally used to implement business rules, auditing.&lt;br&gt;  Triggers can also be used to extend the referential integrity checks,&lt;br&gt;but wherever possible, use constraints for this purpose, instead of&lt;br&gt;triggers, as constraints are much faster.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Till SQL Server 7.0, triggers fire only after the data modification&lt;br&gt;  operation happens. So in a way, they are called post triggers. But in&lt;br&gt;SQL Server 2000 you could create pre triggers also. Search SQL Server&lt;br&gt;2000 books online for INSTEAD OF triggers.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Also check out books online for &amp;#39;inserted table&amp;#39;, &amp;#39;deleted table&amp;#39; and&lt;br&gt;  COLUMNS_UPDATED()&lt;/p&gt;&lt;br&gt;&lt;p&gt;There is a trigger defined for INSERT operations on a table, in an&lt;br&gt;OLTP system. The trigger is written to instantiate a COM object and&lt;br&gt;pass the newly insterted rows to it for some custom processing. What&lt;br&gt;  do you think of this implementation? Can this be implemented better?&lt;/p&gt;&lt;br&gt;&lt;p&gt;Instantiating COM objects is a time consuming process and since you&lt;br&gt;are doing it from within a trigger, it slows down the data insertion&lt;br&gt;  process. Same is the case with sending emails from triggers. This&lt;br&gt;scenario can be better implemented by logging all the necessary data&lt;br&gt;into a separate table, and have a job which periodically checks this&lt;br&gt;table and does the needful.&lt;/p&gt;  &lt;br&gt;&lt;p&gt;What is a self join? Explain it with an example.&lt;/p&gt;&lt;br&gt;&lt;p&gt;Self join is just like any other join, except that two instances of&lt;br&gt;the same table will be joined in the query. Here is an example:&lt;br&gt;Employees table which contains rows for normal employees as well as&lt;br&gt;  managers. So, to find out the managers of all the employees, you need&lt;br&gt;a self join.&lt;/p&gt;&lt;br&gt;&lt;p&gt;CREATE TABLE emp&lt;br&gt;(&lt;br&gt;empid int,&lt;br&gt;mgrid int,&lt;br&gt;empname char(10)&lt;br&gt;)&lt;/p&gt;&lt;br&gt;&lt;p&gt;INSERT emp SELECT 1,2,&amp;#39;Vyas&amp;#39;&lt;br&gt;  INSERT emp SELECT 2,3,&amp;#39;Mohan&amp;#39;&lt;br&gt;INSERT emp SELECT 3,NULL,&amp;#39;Shobha&amp;#39;&lt;br&gt;INSERT emp SELECT 4,2,&amp;#39;Shridhar&amp;#39;&lt;br&gt;INSERT emp SELECT 5,2,&amp;#39;Sourabh&amp;#39;&lt;/p&gt;&lt;br&gt;&lt;p&gt;SELECT t1.empname [Employee], t2.empname [Manager]&lt;br&gt;  FROM emp t1, emp t2&lt;br&gt;WHERE t1.mgrid = t2.empid&lt;/p&gt;&lt;br&gt;&lt;p&gt;Here&amp;#39;s an advanced query using a LEFT OUTER JOIN that even returns the&lt;br&gt;employees without managers (super bosses)&lt;/p&gt;&lt;br&gt;&lt;p&gt;SELECT t1.empname [Employee], COALESCE(t2.empname, &amp;#39;No manager&amp;#39;) [Manager]&lt;br&gt;  FROM emp t1&lt;br&gt;LEFT OUTER JOIN&lt;br&gt;emp t2&lt;br&gt;ON&lt;br&gt;t1.mgrid = t2.empid&lt;/p&gt;&lt;br&gt;&lt;br&gt; &lt;br&gt; &lt;div id="google_ads_div_GeekCenterBottom"&gt;  &lt;/div&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-2333574850437805824?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/sql-server-interview-auestions-and.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-2785764888909246023</guid><pubDate>Fri, 11 Jun 2010 08:51:00 +0000</pubDate><atom:updated>2010-06-11T01:51:28.356-07:00</atom:updated><title>how to decompile c# dll and exe..net decompiler</title><description>&lt;b&gt;Decompiler features&lt;/b&gt;&lt;br&gt;&lt;br style="color: rgb(204, 0, 0);"&gt;&lt;ul style="color: rgb(204, 0, 0);"&gt;&lt;li&gt;S&lt;font style="color: rgb(0, 0, 102);" size="2" face="Arial"&gt;upport generics introduced by .NET Framework 2.0, &lt;/font&gt; &lt;/li&gt;&lt;li style="color: rgb(0, 0, 102);"&gt; &lt;font size="2" face="Arial"&gt; recognize all .NET language constructs, such as attributes, properties, events, fields, methods and nested types, &lt;/font&gt; &lt;/li&gt;&lt;li style="color: rgb(0, 0, 102);"&gt; &lt;font size="2" face="Arial"&gt; automitically recognize different compilers, and generate corresponding target languages, such as C#, managed C++,  Visual Basic.NET,and thus salamander is C# decompiler, &lt;a href="http://VB.NET"&gt;VB.NET&lt;/a&gt; Decompiler, VC++.NET Decompiler and J# Decompiler &lt;/font&gt; &lt;/li&gt;&lt;li style="color: rgb(0, 0, 102);"&gt;&lt;font size="2" face="Arial"&gt;support unsafe codes and pointer arithmetics, support fixed statement,&lt;/font&gt; &lt;/li&gt;&lt;li style="color: rgb(0, 0, 102);"&gt;&lt;font size="2" face="Arial"&gt;generate Visual Studio .NET project file for easy recompilation,&lt;/font&gt; &lt;/li&gt;&lt;li style="color: rgb(0, 0, 102);"&gt;&lt;font size="2" face="Arial"&gt;support .h and .cpp file generation for MC++. Advanced dependency analysis  enables the correct .h files to be included in a .cpp file,&lt;/font&gt; &lt;/li&gt;&lt;li style="color: rgb(0, 0, 102);"&gt;&lt;font size="2" face="Arial"&gt;comments are generated along with the source codes when API documentation is available, &lt;/font&gt; &lt;/li&gt;&lt;li style="color: rgb(0, 0, 102);"&gt;&lt;font size="2" face="Arial"&gt;recognize all CIL instructions, handles address type instructions correctly, &lt;/font&gt; &lt;/li&gt;&lt;li style="color: rgb(0, 0, 102);"&gt;&lt;font size="2" face="Arial"&gt;robust and thoroughly tested against as many .NET assemblies as we can find, more than 10,000  classes have been successfully decompiled,&lt;/font&gt; &lt;/li&gt;&lt;/ul&gt;&lt;font size="4"&gt;&lt;b style="font-family: arial,helvetica,sans-serif;"&gt;&lt;br&gt; &lt;a href="http://www.onlineindiamusic.info/DOTNEt%20Decompiler.rar"&gt;Download dot net decompiler from here&lt;/a&gt;&lt;/b&gt;&lt;/font&gt;&lt;br&gt; &lt;ul&gt;&lt;li&gt;&lt;b&gt;Inplace Editor&lt;/b&gt;&lt;br&gt; &lt;br&gt; Double click or press Enter: &lt;br&gt; &lt;img src="http://netdecompiler.com/images/code1.gif"&gt; &lt;br&gt; Type new name and press Enter: &lt;br&gt; &lt;img src="http://netdecompiler.com/images/code2.gif"&gt; &lt;br&gt; The typical problem with decompilation is the absence of full source information in the executable file. For instance, .NET assembly does not contains names of local variables. Program can automatically assign local names in accordance with their types (what Dis# is really do), but it still too differentiates with the original source. &lt;br&gt;&lt;br&gt; Dis# makes next logical step in this direction. You can edit the names and keep the changes in a project file. ( see &lt;a href="http://netdecompiler.com/screen.html"&gt;&lt;b&gt;screenshot&lt;/b&gt;&lt;/a&gt; ) &lt;br&gt;&lt;br&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;Dis# project file&lt;/b&gt;&lt;br&gt; &lt;br&gt; Dis# have it&amp;#39;s own metadata structure, which expands PE metadata structure with all necessary for decompilation information, such as local variable names. You can save Dis# metadata in the project file (extension .dis) and keep all changes. &lt;br&gt;&lt;br&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;Decompilation Speed&lt;/b&gt;&lt;br&gt; &lt;br&gt; Custom metadata provides outstanding decompilation speed, which 25-700 times faster then have other .NET decompilers. Dis# decompiles more then 2000 methods per second. &lt;br&gt;&lt;br&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;Multiple Languages decompilation&lt;/b&gt;&lt;br&gt; &lt;br&gt; Support for C#, Visual Basic.NET, Delphi.NET and Chrome. &lt;br&gt;&lt;br&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;Well formed code&lt;/b&gt;&lt;br&gt; &lt;br&gt; Dis# generates code, which is look like the human edited. Dis# .net decompiler have many options to adjust code view for your preferences. &lt;br&gt;&lt;br&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;Optimization&lt;/b&gt;&lt;br&gt; &lt;br&gt; Dis# optimize code. &lt;br&gt;&lt;br&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;.NET 2.0 support&lt;/b&gt;&lt;br&gt; &lt;br&gt; Dis# support .NET 2.0 assembly format, generics etc. &lt;br&gt;&lt;br&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;Raw Code&lt;/b&gt;&lt;br&gt; &lt;br&gt; In some cases you have to view raw code (before high level decompilation algorithms processing).&lt;/li&gt;&lt;/ul&gt;&lt;font size="4"&gt;&lt;b style="font-family: arial,helvetica,sans-serif;"&gt;&lt;br&gt;&lt;a href="http://www.onlineindiamusic.info/DOTNEt%20Decompiler.rar"&gt;Download dot net decompiler from here&lt;/a&gt;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;  &lt;br&gt;&lt;br&gt;&lt;span style="color: black;"&gt;&lt;div dir="ltr"&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;span style="font-weight: bold; font-family: verdana,sans-serif;"&gt;           Mangesh Singh&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif;"&gt;&lt;img style="width: 25px; height: 25px; font-family: verdana,sans-serif;" src="http://www.techreaders.com/wp-content/uploads/2009/09/Mobile-Phone-Icon-300x300.jpg" border="0"&gt;&lt;span style="font-family: verdana,sans-serif; font-weight: bold;"&gt;    &lt;span style="color: rgb(204, 0, 0);"&gt;+91-9457874019&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif; font-weight: bold;"&gt;  &lt;img style="width: 28px; height: 24px; font-family: verdana,sans-serif; font-weight: bold;" src="http://www.bestfreeicons.com/smimages/Phone%20icon.png" border="0"&gt;&lt;span style="font-family: verdana,sans-serif; font-weight: bold;"&gt;   &lt;span style="color: rgb(204, 0, 0);"&gt; +91-522-4102340&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif;"&gt;  &lt;img style="width: 30px; height: 31px; font-family: verdana,sans-serif;" src="http://www.vpmthane.org/Arts-Comm/seminar2010/First%20page/email_icon.jpg" border="0"&gt;&lt;span style="font-family: verdana,sans-serif;"&gt;   &lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;a style="font-weight: bold;" href="mailto:mangeshgangwar@gmail.com"&gt;mangeshgangwar@gmail.com&lt;/a&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif; font-weight: bold;"&gt;  &lt;img style="width: 25px; height: 25px; font-family: verdana,sans-serif; font-weight: bold;" src="http://www.icon-king.com/images/portfolio-konqueror.jpg" border="0"&gt;&lt;span style="font-family: verdana,sans-serif; font-weight: bold;"&gt;      &lt;a href="http://www.onlineindiamusic.info/"&gt;www.onlineindiamusic.info&lt;/a&gt;&lt;/span&gt;&lt;br style="font-family: verdana,sans-serif;"&gt;  &lt;/font&gt;&lt;/div&gt;&lt;div style="padding: 5px 0pt; font-family: arial,sans-serif; font-size: 13.3px;"&gt;&lt;span style="color: gray;"&gt;Contact Me&lt;/span&gt;  &lt;a href="mangeshgangwar.blogspot.com" style="padding: 0pt 2px; color: blue; font-size: 10pt;"&gt;&lt;img src="http://www.images.wisestamp.com/blogger.png" alt="Blogger" style="vertical-align: middle; padding-bottom: 5px;" width="16" border="0" height="16"&gt;&lt;/a&gt;&lt;a href="http://twitter.com/mangeshsingh" style="padding: 0pt 2px; color: blue; font-size: 10pt;"&gt;&lt;img src="http://www.images.wisestamp.com/twitter.png" alt="Twitter" style="vertical-align: middle; padding-bottom: 5px;" width="16" border="0" height="16"&gt;&lt;/a&gt;&lt;/div&gt;  &lt;br&gt;&lt;/div&gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-2785764888909246023?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/how-to-decompile-c-dll-and-exenet.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-8036076273656364110</guid><pubDate>Fri, 11 Jun 2010 08:24:00 +0000</pubDate><atom:updated>2010-06-11T01:24:37.831-07:00</atom:updated><title>Windows XP Genuine Patch,Windows XP Genuine Ceack,How to activate  Windows XP Genuine</title><description>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CMangesh%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;}  /* 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;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;This is the newest Windows Genuine Advantage from Microsoft&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&amp;#39;&amp;#39;LegitCheckControl.dll Notification v1.5.708.0&amp;#39;&amp;#39; NEW&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Microsoft has come out with a new &amp;#39;&amp;#39;Windows Genuine Advantage Notification v1.5.708.0 released 22 September 2006.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Also included WGA nag screen removal file.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;(WindowsXP KB905474-1.5.554.0.)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Windows Genuine Advantage Validation v1.5.554.0 new added on 2 october 2006.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;and some instructions for this latest Windows Genuine Advantage Notification. &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;INSTALL NOTES :&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Before applying this close all applications &amp;amp; do the below step&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;1. click &amp;#39;&amp;#39;LegitCheckControl .DLL Validation v1.5.708.0&amp;#39;&amp;#39;&lt;span style=""&gt;  &lt;/span&gt;button &amp;amp; follow install notes...&lt;span style=""&gt;                             &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style=""&gt;                                                                                &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;100% working on Windows Update&lt;span style=""&gt;                           &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style=""&gt; &lt;/span&gt;and no nag windows :)&lt;span style=""&gt;                                    &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style=""&gt;                                                                      &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Restart your computer &amp;amp; Open &amp;#39;&amp;#39;Genuine validation status Tool&amp;#39;&amp;#39; again and you will see the &amp;#39;&amp;#39;Genuine validation status&amp;#39;&amp;#39; will be changed &amp;amp; your &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Windows XP to GENUINE....&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Now Download and Install All MicroSoft&lt;span style=""&gt;  &lt;/span&gt;( IE7 , WMP11 , Windows Defender etc... ) without any Problem as a Genuine XP &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;User. !!&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;font size="4"&gt;&lt;b&gt;&lt;a href="http://www.onlineindiamusic.info/WinXPGen.rar"&gt;Download Windows XP Genuine utility from here&lt;/a&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;TRY ANOTHER METHOD :&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;INSTRUCTIONS&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;STEP 1:&lt;span style=""&gt;         &lt;/span&gt;Open up &amp;#39;&amp;#39;Genuine validation status Tool&amp;#39;&amp;#39; and check the &amp;#39;&amp;#39;Genuine validation status&amp;#39;&amp;#39;, if it says Invalid&lt;span style=""&gt;               &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Product Key then close this program and go to step 2&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;STEP 2 :&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;1.&lt;span style=""&gt;       &lt;/span&gt;Open &amp;#39;&amp;#39;Windows XP CD Key and Product ID Changer&amp;#39;&amp;#39;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;2.&lt;span style=""&gt;       &lt;/span&gt;Click on the &amp;#39;&amp;#39;verify&amp;#39;&amp;#39; tab and you&amp;#39;ll see popup window there verify that your windows xp is Activated or not ?! &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;if not Activated close that window click &amp;#39;&amp;#39;Reactivate&amp;#39;&amp;#39; in &amp;#39;&amp;#39;Windows XP CD Key and Product ID Changer&amp;#39;&amp;#39; thre another window &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;will popup there choose second option &amp;#39;&amp;#39;activate by phone&amp;#39;&amp;#39; then click next then choose &amp;#39;&amp;#39;change product key button&amp;#39;&amp;#39; then &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;click next &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;then &amp;#39;&amp;#39;Enter a valid key .&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style=""&gt; &lt;/span&gt;V2C47-MK7JD-3R89F-D2KXW-VPK3J&lt;span style=""&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;then press &amp;#39;&amp;#39;Update&amp;#39;&amp;#39; &amp;amp; close window &amp;amp; Restart your computer &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Again open &amp;#39;&amp;#39;Windows XP CD Key and Product ID Changer&amp;#39;&amp;#39; &amp;amp; press &amp;#39;&amp;#39;verify&amp;#39;&amp;#39; button to double check &amp;amp; your Windows XP is &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;activated... &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;3.&lt;span style=""&gt;       &lt;/span&gt;Open &amp;#39;&amp;#39;Genuine validation status Tool&amp;#39;&amp;#39; again and you will see the &amp;#39;&amp;#39;Genuine validation status&amp;#39;&amp;#39; will be changed &amp;amp; your &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Windows XP to GENUINE.... &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;font size="4"&gt;&lt;b&gt;&lt;a href="http://www.onlineindiamusic.info/WinXPGen.rar"&gt;&lt;br&gt;&lt;/a&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;font size="4"&gt;&lt;b&gt;&lt;a href="http://www.onlineindiamusic.info/WinXPGen.rar"&gt;Download Windows XP Genuine utility from here&lt;/a&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;ANOTHER WAY TO MAKE GENUINE :&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;1.&lt;span style=""&gt;       &lt;/span&gt;Load up Microsoft Genuine Advantage Diagnostic Tools and check the "Genuine validation status", if it says Invalid Product Key then close this program and go to step 2&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;2.&lt;span style=""&gt;       &lt;/span&gt;Load Port_RockXP_V4, when loaded click&lt;span style=""&gt;  &lt;/span&gt;&amp;#39;&amp;#39;Agree&amp;#39;&amp;#39;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;3.&lt;span style=""&gt;       &lt;/span&gt;Click on the Windows Key tab and then Click &amp;#39;&amp;#39;Scan&amp;#39;&amp;#39; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;4.&lt;span style=""&gt;       &lt;/span&gt;Once the &amp;#39;&amp;#39;scan&amp;#39;&amp;#39; is complete, select &amp;#39;&amp;#39;Microsoft Windows XP&amp;#39;&amp;#39; in the software box. Then Under &amp;#39;&amp;#39;Change you key&amp;#39;&amp;#39; enter : &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;V2C47-MK7JD-3R89F-D2KXW-VPK3J&lt;span style=""&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;And then click on &amp;#39;&amp;#39;Modify&amp;#39;&amp;#39; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;5.&lt;span style=""&gt;       &lt;/span&gt;RockXP will then re-scan your computer and your product key will change. Close RockXP. &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;6.&lt;span style=""&gt;       &lt;/span&gt;Load up Microsoft Genuine Advantage Diagnostic Tools again and you will see the &amp;#39;&amp;#39;Genuine validation status&amp;#39;&amp;#39; will have changed. &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;OR ONE MORE METHOD :&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Also you may use &amp;#39;&amp;#39;WindowsXP KB905474-x86-1.5.540.0.exe&amp;#39;&amp;#39; XP Validator &amp;amp; WGA nag screen removal exe file. ( WindowsXP KB905474-x86-1.5.540.0.exe)t. &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;just run it ... restart your computer &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&amp;amp; see for yourself that your startup nag screen has gone &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&amp;amp; your Windows XP is activated &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&amp;amp; can update &amp;#39;&amp;#39;All windows update&amp;#39;&amp;#39;&lt;span style=""&gt;  &lt;/span&gt;see for yourself to &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;beleive.....&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Now Download and Install All MicroSoft&lt;span style=""&gt;  &lt;/span&gt;( IE7 , WMP11 , Windows Defender etc... ) without any Problem as a Genuine XP &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;User. !!&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;enjoy !&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;br&gt;&lt;br&gt;&lt;font size="4"&gt;&lt;b&gt;&lt;a href="http://www.onlineindiamusic.info/WinXPGen.rar"&gt;Download Windows XP Genuine utility from here&lt;/a&gt;&lt;/b&gt;&lt;/font&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-8036076273656364110?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/windows-xp-genuine-patchwindows-xp.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-4009676103795941893</guid><pubDate>Fri, 11 Jun 2010 07:28:00 +0000</pubDate><atom:updated>2010-06-11T00:28:40.408-07:00</atom:updated><title>An Introduction to Clustered and Non-Clustered Index Data Structures</title><description>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CMangesh%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Wingdings; 	panose-1:5 0 0 0 0 0 0 0 0 0; 	mso-font-charset:2; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 268435456 0 0 -2147483648 0;}  /* 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";} h1 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	mso-outline-level:1; 	font-size:24.0pt; 	font-family:"Times New Roman"; 	font-weight:bold;} p 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} p.textboldblue, li.textboldblue, div.textboldblue 	{mso-style-name:textboldblue; 	mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} p.textcode, li.textcode, div.textcode 	{mso-style-name:textcode; 	mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} p.textbold1, li.textbold1, div.textbold1 	{mso-style-name:textbold1; 	mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} p.textbold, li.textbold, div.textbold 	{mso-style-name:textbold; 	mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	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;}  /* List Definitions */  @list l0 	{mso-list-id:1485776511; 	mso-list-template-ids:667600788;} @list l0:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;  &lt;h1&gt;An Introduction to Clustered and Non-Clustered Index Data Structures&lt;/h1&gt;  &lt;p class="MsoNormal"&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p class="textboldblue"&gt;&lt;b style=""&gt;&lt;u&gt;Part I: Non-Clustered Index&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;strong&gt;Creating a Table&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;To better explain SQL Server non-clustered indexes; let's start by creating a new table and populating it with some sample data using the following scripts. I assume you have a database you can use for this. If not, you will want to create one for these examples.&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Create Table DummyTable1&lt;br&gt; (&lt;br&gt; EmpId Int,&lt;br&gt; EmpName Varchar(8000)&lt;br&gt; )&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;When you first create a new table, there is no index created by default. In technical terms, a table without an index is called a "heap". We can confirm the fact that this new table doesn't have an index by taking a look at the sysindexes system table, which contains one for this table with an of indid = 0. The sysindexes table, which exists in every database, tracks table and index information. "Indid" refers to Index ID, and is used to identify indexes. An indid of 0 means that a table does not have an index, and is stored by SQL Server as a heap.&lt;/p&gt;  &lt;p&gt;Now let's add a few records in this table using this script:&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable1 Values (4, Replicate (&amp;#39;d&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable1 Values (6, Replicate (&amp;#39;f&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable1 Values (1, Replicate (&amp;#39;a&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable1 Values (3, Replicate (&amp;#39;c&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Now, let's view the contests of the table by executing the following command in Query Analyzer for our new table.&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Select EmpID From DummyTable1&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 58.5pt; border-collapse: collapse;" width="78" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 57pt; height: 12.75pt;" width="76" nowrap&gt;   &lt;p class="textbold1" style="text-align: right;" align="right"&gt;&lt;strong&gt;Empid&lt;/strong&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;4&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;6&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;3&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;As you would expect, the data we inserted earlier has been displayed. Note that the order of the results is in the same order that I inserted them in, which is in no order at all.&lt;/p&gt;  &lt;p&gt;Now, let's execute the following commands to display the actual page information for the table we created and is now stored in SQL Server.&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;dbcc ind(dbid, tabid, -1) – This is an undocumented command.&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Declare @DBID Int, @TableID Int&lt;br&gt; Select @DBID = db_id(), @TableID = object_id(&amp;#39;DummyTable1&amp;#39;)&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;DBCC ind(@DBID, @TableID, -1)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;This script will display many columns, but we are only interested in three of them, as shown below.&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 254.25pt; border-collapse: collapse;" width="339" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 81.75pt; height: 12.75pt;" valign="bottom" width="109" nowrap&gt;   &lt;p class="textbold1"&gt;&lt;strong&gt;PagePID&lt;/strong&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 75.75pt; height: 12.75pt;" valign="bottom" width="101" nowrap&gt;   &lt;p class="textbold1" style="text-align: right;" align="right"&gt;&lt;strong&gt;IndexID&lt;/strong&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 92.25pt; height: 12.75pt;" valign="bottom" width="123" nowrap&gt;   &lt;p class="textbold1" style="text-align: right;" align="right"&gt;&lt;strong&gt;PageType&lt;/strong&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26408&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;10&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26255&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26409&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Here's what the information displayed means:&lt;/p&gt;  &lt;p&gt;PagePID is the physical page numbers used to store the table. In this case, three pages are currently used to store the data.&lt;/p&gt;  &lt;p&gt;IndexID is the type of index,&lt;/p&gt;  &lt;p&gt;Where:&lt;/p&gt;  &lt;p&gt;0 – Datapage&lt;/p&gt;  &lt;p&gt;1 – Clustered Index&lt;/p&gt;  &lt;p&gt;2 – Greater and equal to 2 is an Index page (Non-Clustered Index and ordinary index),&lt;/p&gt;  &lt;p&gt;PageType tells you what kind of data is stored in each database,&lt;/p&gt;  &lt;p&gt;Where:&lt;/p&gt;  &lt;p&gt;10 – IAM (Index Allocation MAP)&lt;/p&gt;  &lt;p&gt;1 – Datapage&lt;/p&gt;  &lt;p&gt;2 – Index page&lt;/p&gt;  &lt;p&gt;Now, let us execute DBCC PAGE command. This is an undocumented command.&lt;/p&gt;  &lt;p&gt;DBCC page(dbid, fileno, pageno, option)&lt;/p&gt;  &lt;p&gt;Where:&lt;/p&gt;  &lt;p&gt;dbid = database id.&lt;/p&gt;  &lt;p&gt;Fileno = fileno of the page.  Usually it will be 1, unless we use more than one file for a database.&lt;/p&gt;  &lt;p&gt;Pageno = we can take the output of the dbcc ind page no.&lt;/p&gt;  &lt;p&gt;Option = it can be 0, 1, 2, 3. I use 3 to get a display of the data.  You can try yourself for the other options.&lt;/p&gt;  &lt;p&gt;Run this script to execute the command:&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;DBCC page(@DBID, 1, 26408, 3)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;The output will be page allocation details.&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604) &lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;dbcc page(@DBID, 1, 26255, 3)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;The data will be displayed in the order it was entered in the table. This is how SQL stores the data in pages.  Actually, 26255 &amp;amp; 26409 both display the data page.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;I have displayed the data page information for page 26255 only. This is how MS SQL stores the contents in data pages as such column name with its respective value.   &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Record Type = PRIMARY_RECORD                        &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpId          = 4&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpName    = ddddddddddddddddddddddddddddddddddddddddddddddddddd&lt;br&gt; ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd&lt;br&gt; ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd&lt;br&gt; ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd&lt;br&gt; ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Record Type = PRIMARY_RECORD                        &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpId            = 6&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpName      = ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff&lt;br&gt; ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff&lt;br&gt; ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff&lt;br&gt; ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Record Type = PRIMARY_RECORD                        &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpId           = 1&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpName     = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;br&gt; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;br&gt; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;br&gt; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;br&gt; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;This displays the exact data storage in SQL, without any index on table. Now, let's go and create a unique non-clustered index on the EmpID column.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="color: blue;"&gt;Creating a Non-Clustered Index&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Now, we will create a unique non-clustered index on the empid column to see how it affects the data, and how the data is stored in SQL Server.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;CREATE UNIQUE NONCLUSTERED INDEX DummyTable1_empid&lt;br&gt; ON DummyTable1 (empid)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Now, execute the DBCC ind (dbid, tabid, -1) &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604) &lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Declare @DBID Int, @TableID Int&lt;br&gt; Select @DBID = db_id(), @TableID = object_id(&amp;#39;DummyTable1&amp;#39;)&lt;br&gt; DBCC ind(@DBID, @TableID, -1)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Here are the results:&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 286.5pt; border-collapse: collapse;" width="382" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 95.25pt; height: 12.75pt;" valign="bottom" width="127" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;PagePID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 84.75pt; height: 12.75pt;" valign="bottom" width="113" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;IndexID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 102pt; height: 12.75pt;" valign="bottom" width="136" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;PageType&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26408&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;10&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26255&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26409&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26411&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;2&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;10&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;2&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;2&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style=""&gt;Now, we see two more rows than before, which now contains index page details. Page 26408 displays the page allocation details, and pages 26255 and 26409 display the data page details, as before.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;In regard to the new pages, page 26411 displays the page allocation details of an index page and page 26410 displays the index page details.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;MS SQL generates a page (pagetype = 10) for an index and explains the page allocation details for an index. It shows the number of index page have been occupied for an index.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Let us see what would be the output for page 26411, that is page type = 10&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;IAM: Single Page Allocations @0x308A608E&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;-----------------------------------------&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Slot 0 = (1:26410)&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Let us view page 26410 to see the index page details.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC page(10, 1, 26410, 3)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;SQL populates the index column data in order. The last column (?) is pointed to the row locator.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Here are the results, using two different methods:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;Method I &lt;/b&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 354pt; border-collapse: collapse;" width="472" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 57pt; height: 12.75pt;" valign="bottom" width="76" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;FileID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 71.25pt; height: 12.75pt;" valign="bottom" width="95" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;PageID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 60pt; height: 12.75pt;" valign="bottom" width="80" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;EMPID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 159.75pt; height: 12.75pt;" valign="bottom" width="213" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;?&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;0x8F66000001000200&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;3&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;0x2967000001000000&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;4&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;0x8F66000001000000&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;6&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;0x8F66000001000100&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style=""&gt;The row location display in one of two ways:&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;If the table does not have a      clustered index, the row locator will be combination of fileno, pageno and      the no of rows in a page.  &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;If the table does have      clustered index, the row location will be clustered index key value.&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal" style=""&gt;Non-clustered indexes are particularly handy when we want to return a single row from a table.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;For example, to search for employee ID (empid = 3) in a table that has a non-clustered index on the empid column, SQL Server looks through the index to find an entry that lists the exact page and row in the table where the matching empid can be found, and then goes directly to that page and row. This greatly speeds up accessing the record in question.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Select EmpID, EmpName From DummyTable1 WHERE EMPID = 3&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Now, let's insert some more rows in our table and view the data page storage of our non-clustered index.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable1 Values (10, Replicate (&amp;#39;j&amp;#39;,2000))&lt;br&gt; GO&lt;br&gt; &lt;br&gt; Insert Into DummyTable1 Values (2, Replicate (&amp;#39;b&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable1 Values (5, Replicate (&amp;#39;e&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable1 Values (8, Replicate (&amp;#39;h&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable1 Values (9, Replicate (&amp;#39;i&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable1 Values (7, Replicate (&amp;#39;g&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Now, let's view the data in our table.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Execute:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Select EmpID From DummyTable1&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Here are the results:&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 57pt; border-collapse: collapse;" width="76" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 55.5pt; height: 12.75pt;" valign="bottom" width="74" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;EmpID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;4&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;6&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;3&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;10&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;2&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;5&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;8&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;9&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;7&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style=""&gt;As you may notice above, the data is still in the order we entered it, and not in any particular order. This is because adding the non-clustered index didn't change how the data was stored and ordered on the data pages.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Now, let's view the results of the DBCC IND command. In order to find out what happened when the new data was added to the table.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604) &lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Declare @DBID Int, @TableID Int&lt;br&gt; Select @DBID = db_id(), @TableID = object_id(&amp;#39;DummyTable1&amp;#39;)&lt;br&gt; DBCC ind(@DBID, @TableID, -1)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Here are the results:&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 233.25pt; border-collapse: collapse;" width="311" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 77.25pt; height: 12.75pt;" valign="bottom" width="103" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;PagePID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 1in; height: 12.75pt;" valign="bottom" width="96" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;IndexID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 79.5pt; height: 12.75pt;" valign="bottom" width="106" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;PageType&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26408&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;10&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26255&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26409&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26412&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26413&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26411&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;2&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;10&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;2&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;2&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style=""&gt;Let us execute the page 26410 again and get the index page details.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604) &lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;dbcc page(10, 1, 26410, 3)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;SQL Server populates the index column data in order.  The last column (?) is pointed to the row locator.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Here are the results:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;Method I&lt;/b&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 57.75pt; height: 12.75pt;" valign="bottom" width="77" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;FileID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 64.5pt; height: 12.75pt;" valign="bottom" width="86" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;PageID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 59.25pt; height: 12.75pt;" valign="bottom" width="79" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;EMPID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 178.5pt; height: 12.75pt;" valign="bottom" width="238" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;?&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0x8F66000001000200&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;2&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0x2C67000001000000&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;3&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0x2967000001000000&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;4&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0x8F66000001000000&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;5&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0x2C67000001000100&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;6&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0x8F66000001000100&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;7&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0x2D67000001000000&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;8&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0x2C67000001000200&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;9&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0x2967000001000200&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;10&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0x2967000001000100&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style=""&gt;As I explained earlier, there are two types of row locations. We have seen Method I.  Now, let's try Method II with the help of a clustered and non-clustered index in a table. DummyTable1 already has a non-clustered index. Let's now add a new column to the DummyTabl1 table and add a clustered index on that column. &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Alter Table DummyTable1 Add EmpIndex Int IDENTITY(1,1)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;This will link the clustered index key value, instead of &lt;b&gt;the row locator, and be will the combination of fileno, pageno and no of rows in a page.&lt;/b&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;This adds the Empindex column to DummyTable1. I have used an identity column so that we will not have null values on that column. &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;You can execute the DBCC ind and DBCC page to check if there any change after the new column is added to the table. If you don't want to check this yourself, I can tell you that adding the new column did not affect the total number of pages currently allocated to the table by SQL Server. &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Now, let's add a unique clustered index on the empindex column and then view the differences in &lt;b&gt;page 26410.&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;First, we execute the DBCC ind command.  This displays a new set of pages for dummytable1.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604) &lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Declare @DBID Int, @TableID Int&lt;br&gt; Select @DBID = db_id(), @TableID = object_id(&amp;#39;DummyTable1&amp;#39;)&lt;br&gt; DBCC ind(@DBID, @TableID, -1)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Here are the results:&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 228pt; border-collapse: collapse;" width="304" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 74.25pt; height: 12.75pt;" valign="bottom" width="99" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;PagePID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 69pt; height: 12.75pt;" valign="bottom" width="92" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;IndexID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 80.25pt; height: 12.75pt;" valign="bottom" width="107" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;PageType&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26415&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;10&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26414&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26416&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;2&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26417&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26418&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26420&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;2&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;10&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26419&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;2&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;2&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style=""&gt;Pages 26415 and 26420 have page allocation details.  Pages 26414, 26417 and 26418 have data page details.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Now, let's view pages 26416 and 26419 and see the output.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604) &lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC page(10, 1, 26416, 3)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Here are the results:&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 310.5pt; border-collapse: collapse;" width="414" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0in; width: 53.25pt; height: 12.75pt;" valign="bottom" width="71" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;FileID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 66.75pt; height: 12.75pt;" valign="bottom" width="89" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;PageID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 117pt; height: 12.75pt;" valign="bottom" width="156" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;ChildPageID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 68.25pt; height: 12.75pt;" valign="bottom" width="91" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;EMPID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26416&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26414&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26416&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26417&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;5&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26416&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26418&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;9&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style=""&gt;This displays the output of the clustered index page, which has got a link to data page (ChildPageID).  EMPID is an index column that contains the starting row of the page. &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604) &lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC page(10, 1, 26419, 3)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Here are the results:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;Method II&lt;/b&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 267pt; border-collapse: collapse;" width="356" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 57.75pt; height: 12.75pt;" valign="bottom" width="77" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;FileID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 61.5pt; height: 12.75pt;" valign="bottom" width="82" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;PageID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 0.75in; height: 12.75pt;" valign="bottom" width="72" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;EMPID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 87.75pt; height: 12.75pt;" valign="bottom" width="117" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;EMPIndex&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26419&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26419&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;2&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;2&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26419&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;3&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;3&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26419&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;4&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;4&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26419&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;5&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;5&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26419&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;6&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;6&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26419&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;7&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;7&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26419&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;8&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;8&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26419&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;9&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;9&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26419&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;10&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;10&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style=""&gt;It is interesting to see the differences now. There is a difference between &lt;b&gt;Method I&lt;/b&gt; and &lt;b&gt;Method II&lt;/b&gt;.  &lt;b&gt;Method II&lt;/b&gt; is now linked to a clustered index key.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;The main difference between &lt;b&gt;Method I&lt;/b&gt; and &lt;b&gt;Method II&lt;/b&gt; is the link to a row in a data page.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Part II: Clustered Index&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;Creating a Table&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;To better explain how SQL Server creates clustered indexes; let's start by creating a new table and populating it with some sample data using the following scripts. You can use the same sample database as before.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Create Table DummyTable2 &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;(&lt;br&gt;     EmpId Int,&lt;br&gt;     EmpName Varchar(8000)&lt;br&gt; )&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;As in the previous example, when you first create a new table, there is no index created by default, and a heap is created. As before, we can confirm the fact that this new table doesn't have an index by taking a look at the sysindexes system table, which contains one for this table with an of indid = 0. The sysindexes table, which exists in every database, tracks table and index information. "Indid" refers to Index ID, and is used to identify indexes. An indid of 0 means that a table does not have an index, and is stored by SQL Server as a heap.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Now let's add a few records in this table using this script:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable2 Values (4, Replicate (&amp;#39;d&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable2 Values (6, Replicate (&amp;#39;f&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable2 Values (1, Replicate (&amp;#39;a&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable2 Values (3, Replicate (&amp;#39;c&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Now, let's view the contents of the table by executing the following command in Query Analyzer for our new table.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Select EmpID From DummyTable2&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 48pt; border-collapse: collapse;" width="64" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0in; width: 53.25pt; height: 12.75pt;" valign="bottom" width="71" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;Empid&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;4&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;6&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;3&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style=""&gt;As you would expect, the data we inserted has been displayed. Note that the order of the results is in the same order that I inserted them in, which is in no order at all.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Now, let's execute the following commands to display the actual page information for the table we created and is now stored in SQL Server.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC ind(dbid, tabid, -1) – It is an undocumented command.  &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604) &lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Declare @DBID Int, @TableID Int&lt;br&gt; Select @DBID = db_id(), @TableID = object_id(&amp;#39;DummyTable2&amp;#39;)&lt;br&gt; DBCC ind(@DBID, @TableID, -1)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;This script will display many columns, but we are only interested in three of them, as shown below.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Here are the results:&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 243.75pt; border-collapse: collapse;" width="325" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 77.25pt; height: 12.75pt;" valign="bottom" width="103" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;PagePID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 73.5pt; height: 12.75pt;" valign="bottom" width="98" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;IndexID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 88.5pt; height: 12.75pt;" valign="bottom" width="118" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;PageType&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26408&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;10&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26255&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26409&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style=""&gt;Here's what the information displayed means:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;PagePID is the physical page numbers used to store the table. In this case, three pages are currently used to store the data.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;IndexID is the type of index,&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Where:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;0 – Datapage&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;1 – Clustered Index&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;2 – Greater and equal to 2 is an Index page (Non-Clustered Index and ordinary index)&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;PageType tells you what kind of data is stored in each database&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Where:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;10 – IAM (Index Allocation MAP)&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;1 – Datapage&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;2 – Index page&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Now, let us execute DBCC PAGE command.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;DBCC page(dbid, fileno, pageno, option)&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Where:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: black;"&gt;dbid = database id.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: black;"&gt;Fileno = fileno of the page.  Usually it will be 1, unless we use more than one file for a database.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: black;"&gt;Pageno = we can take the output of the dbcc ind page no.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: black;"&gt;Option = it can be 0, 1, 2, 3. I use 3 to get a display of the data.  You can try yourself for the other options.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Run this script to execute the command:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604) &lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC page(@DBID, 1, 26408, 3)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;The output will be page allocation details.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604) &lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC page(@DBID, 1, 26255, 3)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;The output will display the data however it was entered in the table. This is how SQL stores the data in pages. Actually, 26255 &amp;amp; 26409 will display the data page.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;I have displayed the data page information for page 26255 only. This is how MS-SQL stores the contents in data pages as such column name with its respective value.   &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Record Type = PRIMARY_RECORD                        &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpId          = 4&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpName    = dddddddddddddddddddddddddddddddddddddddddddddddd&lt;br&gt; dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd&lt;br&gt; dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd&lt;br&gt; dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd&lt;br&gt; dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Record Type = PRIMARY_RECORD                        &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpId           = 6&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpName     = ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff&lt;br&gt; fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff&lt;br&gt; fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Record Type = PRIMARY_RECORD                        &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpId           = 1&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpName     = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;br&gt; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;br&gt; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;br&gt; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;This displays the exact data storage in SQL without any index on table. Now, let's go and create a Unique Clustered Index on EmpID column.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="color: blue;"&gt;Create a Clustered Index&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Now, let us create a unique clustered index on empid column to see how it affects the data that is stored in SQL Server.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;CREATE UNIQUE CLUSTERED INDEX DummyTable2_EmpIndex&lt;br&gt; ON DummyTable2 (EmpID)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Execute:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Select EmpID From DummyTable2&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Here are the results:&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 48pt; border-collapse: collapse;" width="64" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0in; width: 53.25pt; height: 12.75pt;" valign="bottom" width="71" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;Empid&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;3&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;4&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;6&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style=""&gt;Now, execute the DBCC ind (dbid, tabid, -1)&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Declare @DBID Int, @TableID Int&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Select @DBID = db_id(), @TableID = object_id(&amp;#39;DummyTable2&amp;#39;)&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC ind(@DBID, @TableID, -1)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Here are the results:&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 246pt; border-collapse: collapse;" width="328" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 79.5pt; height: 12.75pt;" valign="bottom" width="106" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;PagePID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 80.25pt; height: 12.75pt;" valign="bottom" width="107" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;IndexID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 81.75pt; height: 12.75pt;" valign="bottom" width="109" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;PageType&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26411&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;10&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;26412&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;2&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style=""&gt; MS SQL generates a page (pagetype = 10) for an index and explains the page allocation details for an index. It shows the number of index page have been occupied for an index.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Now, let us view the page 26410 and 26412 and see the page details. &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC page(10, 1, 26412, 3)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Here are the results:&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 319.5pt; border-collapse: collapse;" width="426" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0in; width: 53.25pt; height: 12.75pt;" valign="bottom" width="71" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;FileID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 85.5pt; height: 12.75pt;" valign="bottom" width="114" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;PageID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 102.75pt; height: 12.75pt;" valign="bottom" width="137" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;b&gt;ChildPageID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 72.75pt; height: 12.75pt;" valign="bottom" width="97" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;EMPID&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;26412&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p class="MsoNormal" style=""&gt;0&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;The output display many columns, but we are only interested in four of them as shown above.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;This will display the output of the index page, which has got link to data page (ChildPageID).  EMPID is an index column will contain the starting row of the page.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Now, let us view the page 26410 and see the page details.  &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;DBCC page (10, 1, 26410, 3)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Here are the results:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Record Type = PRIMARY_RECORD      &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpId            = 1&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpName          = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;br&gt; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;br&gt; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;br&gt; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;br&gt; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Record Type = PRIMARY_RECORD      &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpId            = 2&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpName          = bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb&lt;br&gt; bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb&lt;br&gt; bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb&lt;br&gt; bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb&lt;br&gt; bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;Record Type = PRIMARY_RECORD      &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpId            = 3&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="color: blue;"&gt;EmpName          = cccccccccccccccccccccccccccccccccccccccccccccccc&lt;br&gt; cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc&lt;br&gt; cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc&lt;br&gt; cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc&lt;br&gt; cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Though I have added disorder records, SQL has displayed the data page in sequence because we have got a clustered index on empid. This is absolutely great!  Adding a clustered index to the table has physically reordered the data pages, putting them in physical order based on the indexed column.&lt;/p&gt;  &lt;p&gt;Now, let's insert some more rows in our table and view the data and index page storage of our clustered index.  &lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable2 Values (10, Replicate (&amp;#39;j&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable2 Values (2, Replicate (&amp;#39;b&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable2 Values (5, Replicate (&amp;#39;e&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable2 Values (8, Replicate (&amp;#39;h&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable2 Values (9, Replicate (&amp;#39;i&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Insert Into DummyTable2 Values (7, Replicate (&amp;#39;g&amp;#39;,2000))&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Now, execute the DBCC ind (dbid, tabid, -1)&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Declare @DBID Int, @TableID Int&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Select @DBID = db_id(), @TableID = object_id(&amp;#39;DummyTable2&amp;#39;)&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;DBCC ind(@DBID, @TableID, -1)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Here are the results:&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 256.5pt; border-collapse: collapse;" width="342" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 86.25pt; height: 12.75pt;" valign="bottom" width="115" nowrap&gt;   &lt;p class="textbold"&gt;&lt;strong&gt;PagePID&lt;/strong&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 82.5pt; height: 12.75pt;" valign="bottom" width="110" nowrap&gt;   &lt;p class="textbold" style="text-align: right;" align="right"&gt;&lt;strong&gt;IndexID&lt;/strong&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 83.25pt; height: 12.75pt;" valign="bottom" width="111" nowrap&gt;   &lt;p class="textbold" style="text-align: right;" align="right"&gt;&lt;strong&gt;PageType&lt;/strong&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26411&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;10&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26412&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;2&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26255&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26408&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26409&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;0&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p style="text-align: right;" align="right"&gt;1&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Now, we see few more rows than before. Page 26411 displays the page allocation details, and pages 26408, 26409, 26410 and 26255 display the data page details, as before.&lt;/p&gt;  &lt;p&gt;In regard to the new pages, page 26411 displays the page allocation details of an index page and 26412 displays the index page details.&lt;/p&gt;  &lt;p&gt;MS-SQL generates a page (pagetype = 10) for an index and explains the page allocation details for an index.  It shows the number of index page have been occupied for an index.&lt;/p&gt;  &lt;p&gt;Let us see what would be the output for page 26411, that is page type = 10.&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;dbcc page(10, 1, 26411, 3)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Here are the results:&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;IAM: Single Page Allocations @0x30A5C08E&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;-----------------------------------------&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Slot 0 = (1:26410)&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Slot 1 = (1:26412)&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Slot 2 = (1:26255)&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Slot 3 = (1:26408)&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Slot 4 = (1:26409)&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Let us view page 26412 to see the index page details.&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;DBCC TRACEON (3604)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;DBCC page(10, 1, 26412, 3)&lt;br&gt; GO&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Here are the results:&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 284.25pt; border-collapse: collapse;" width="379" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0in; width: 53.25pt; height: 12.75pt;" valign="bottom" width="71" nowrap&gt;   &lt;p class="textbold"&gt;&lt;strong&gt;FileID&lt;/strong&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 63.75pt; height: 12.75pt;" valign="bottom" width="85" nowrap&gt;   &lt;p class="textbold"&gt;&lt;strong&gt;PageID&lt;/strong&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 94.5pt; height: 12.75pt;" valign="bottom" width="126" nowrap&gt;   &lt;p class="textbold"&gt;&lt;strong&gt;ChildPageID&lt;/strong&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; width: 68.25pt; height: 12.75pt;" valign="bottom" width="91" nowrap&gt;   &lt;p class="textbold"&gt;&lt;strong&gt;EMPID&lt;/strong&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26412&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26410&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;0&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26412&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26408&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;4&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26412&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26255&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;6&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;"&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="bottom" nowrap&gt;   &lt;p&gt;1&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26412&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;26409&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt 0.75pt 0in; height: 12.75pt;" valign="top" nowrap&gt;   &lt;p&gt;9&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;This helps us to get an idea to decide the need of clustered index. It is really useful to have a clustered index when retrieve many rows of data, ranges of data, and when BETWEEN is used in the WHERE clause. Because, the leaf level of the clustered index is the data. It should be used to save many I/Os. So, it is better to use clustered indexes to solve queries asking for ranges of data, not one row. &lt;/p&gt;  &lt;p&gt;For example, to search for an employee ID (empid between 3 and 9) in a table that has a clustered index on the empid column.&lt;/p&gt;  &lt;p class="textcode"&gt;&lt;span style="color: blue;"&gt;Select EmpID, EmpName From DummyTable1 WHEREEMPID Between 3 And 9&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt; &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-4009676103795941893?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/introduction-to-clustered-and-non.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-2813620458349347704</guid><pubDate>Fri, 11 Jun 2010 07:27:00 +0000</pubDate><atom:updated>2010-06-11T00:27:50.077-07:00</atom:updated><title>How to remoove references in whole database if primary key column  name and foreign column name are same</title><description>&lt;br&gt;&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CMangesh%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C10%5Cclip_filelist.xml"&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;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: green;"&gt;/**********************************************************************&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: green;"&gt;Procedure Name:&lt;span style=""&gt;  &lt;/span&gt;RemooveAllReference&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: green;"&gt;Created By:&lt;span style=""&gt;      &lt;/span&gt;Mangesh Singh&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: green;"&gt;Date:&lt;span style=""&gt;            &lt;/span&gt;24 April 2009&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: green;"&gt;Purpose:&lt;span style=""&gt;         &lt;/span&gt;To Remoove All Constraints / Foreign Keys In Database &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: green;"&gt;**********************************************************************/&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;ALTER&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;Procedure&lt;/span&gt; RemooveAllReference&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;AS&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @ERR &lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Begin&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;Tran&lt;/span&gt; Reference &lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Create&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;Table&lt;/span&gt; #temp &lt;span style="color: gray;"&gt;(&lt;/span&gt;ID &lt;span style="color: blue;"&gt;INT&lt;/span&gt; &lt;span style="color: blue;"&gt;IDENTITY&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;1&lt;span style="color: gray;"&gt;,&lt;/span&gt;1&lt;span style="color: gray;"&gt;),&lt;/span&gt;TableName &lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;100&lt;span style="color: gray;"&gt;),&lt;/span&gt;IDD &lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Insert&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;INTO&lt;/span&gt; #temp&lt;span style="color: gray;"&gt;(&lt;/span&gt;TableName&lt;span style="color: gray;"&gt;,&lt;/span&gt;IDD&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Select&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;Name&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;ID &lt;span style="color: blue;"&gt;From&lt;/span&gt; &lt;span style="color: green;"&gt;Sys.SysObjects&lt;/span&gt; &lt;span style="color: blue;"&gt;Where&lt;/span&gt; ID &lt;span style="color: gray;"&gt;IN(&lt;/span&gt; &lt;span style="color: blue;"&gt;select&lt;/span&gt; &lt;span style="color: blue;"&gt;Distinct&lt;/span&gt; Parent_Obj &lt;span style="color: blue;"&gt;from&lt;/span&gt; &lt;span style="color: green;"&gt;sys.sysobjects&lt;/span&gt; &lt;span style="color: blue;"&gt;where&lt;/span&gt; xtype&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39;F&amp;#39;&lt;/span&gt; &lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Declare&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @Count &lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Declare&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @A &lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Declare&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @TableName &lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;100&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Set&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @A&lt;span style="color: gray;"&gt;=&lt;/span&gt;1&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Select&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @Count&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;Count&lt;/span&gt;&lt;span style="color: gray;"&gt;(*)&lt;/span&gt; &lt;span style="color: blue;"&gt;From&lt;/span&gt; #temp&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;While&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: gray;"&gt;(&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;@A&lt;span style="color: gray;"&gt;&amp;lt;=&lt;/span&gt;@Count&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Begin&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;span style="color: blue;"&gt;Select&lt;/span&gt; @TableName&lt;span style="color: gray;"&gt;=&lt;/span&gt;TableName &lt;span style="color: blue;"&gt;From&lt;/span&gt; #temp &lt;span style="color: blue;"&gt;Where&lt;/span&gt; ID&lt;span style="color: gray;"&gt;=&lt;/span&gt;@A&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;Create&lt;/span&gt; &lt;span style="color: blue;"&gt;Table&lt;/span&gt; #Temp1&lt;span style="color: gray;"&gt;(&lt;/span&gt;ID &lt;span style="color: blue;"&gt;INT&lt;/span&gt; &lt;span style="color: blue;"&gt;IDENTITY&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;1&lt;span style="color: gray;"&gt;,&lt;/span&gt;1&lt;span style="color: gray;"&gt;),&lt;/span&gt;ColumnName &lt;span style="color: blue;"&gt;Varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;100&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;span style="color: blue;"&gt;Insert&lt;/span&gt; &lt;span style="color: blue;"&gt;Into&lt;/span&gt; #Temp1&lt;span style="color: gray;"&gt;(&lt;/span&gt;ColumnName&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;span style="color: blue;"&gt;select&lt;/span&gt; &lt;span style="color: blue;"&gt;Name&lt;/span&gt; &lt;span style="color: blue;"&gt;from&lt;/span&gt; &lt;span style="color: green;"&gt;Sys.SysObjects&lt;/span&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Where&lt;/span&gt; XType&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39;F&amp;#39;&lt;/span&gt; &lt;span style="color: gray;"&gt;AND&lt;/span&gt; Parent_Obj&lt;span style="color: gray;"&gt;=(&lt;/span&gt;&lt;span style="color: blue;"&gt;Select&lt;/span&gt; IDD &lt;span style="color: blue;"&gt;From&lt;/span&gt; #temp &lt;span style="color: blue;"&gt;Where&lt;/span&gt; ID&lt;span style="color: gray;"&gt;=&lt;/span&gt;@A&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;span style="color: blue;"&gt;Declare&lt;/span&gt; @CNT &lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;span style="color: blue;"&gt;Declare&lt;/span&gt; @AA &lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;span style="color: blue;"&gt;Set&lt;/span&gt; @AA&lt;span style="color: gray;"&gt;=&lt;/span&gt;1&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;span style="color: blue;"&gt;Select&lt;/span&gt; @CNT&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;Count&lt;/span&gt;&lt;span style="color: gray;"&gt;(*)&lt;/span&gt; &lt;span style="color: blue;"&gt;From&lt;/span&gt; #Temp1&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;span style="color: blue;"&gt;While&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;@AA&lt;span style="color: gray;"&gt;&amp;lt;=&lt;/span&gt;@CNT&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;Begin&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;Declare&lt;/span&gt; @CLNAME &lt;span style="color: blue;"&gt;Varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;200&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                  &lt;/span&gt;&lt;span style="color: blue;"&gt;Declare&lt;/span&gt; @SQL &lt;span style="color: blue;"&gt;Varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;1000&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                  &lt;/span&gt;&lt;span style="color: blue;"&gt;Select&lt;/span&gt; @CLNAME&lt;span style="color: gray;"&gt;=&lt;/span&gt;ColumnName &lt;span style="color: blue;"&gt;From&lt;/span&gt; #Temp1 &lt;span style="color: blue;"&gt;Where&lt;/span&gt; ID&lt;span style="color: gray;"&gt;=&lt;/span&gt;@AA&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                  &lt;/span&gt;&lt;span style="color: blue;"&gt;Set&lt;/span&gt; @SQL&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39;ALTER TABLE dbo.&amp;#39;&lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;@TableName&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: red;"&gt;&lt;span style=""&gt;                  &lt;/span&gt;DROP CONSTRAINT &amp;#39;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: gray;"&gt;+&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;@CLNAME&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                  &lt;/span&gt;&lt;span style="color: blue;"&gt;Exec&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;@SQL&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                  &lt;/span&gt;&lt;span style="color: blue;"&gt;Set&lt;/span&gt; @Err&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;@@ERROR&lt;/span&gt;&lt;span style=""&gt;          &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                  &lt;/span&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; &lt;span style="color: gray;"&gt;(&lt;/span&gt;@ERR &lt;span style="color: gray;"&gt;&amp;lt;&amp;gt;&lt;/span&gt; 0&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style=""&gt;          &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                  &lt;/span&gt;&lt;span style="color: blue;"&gt;Begin&lt;/span&gt;&lt;span style=""&gt;              &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                  &lt;/span&gt;&lt;span style="color: blue;"&gt;Raiserror&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39;Insert Statement Fail&amp;#39;&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;16&lt;span style="color: gray;"&gt;,&lt;/span&gt;1&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style=""&gt;              &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                  &lt;/span&gt;&lt;span style="color: blue;"&gt;RollBack&lt;/span&gt; &lt;span style="color: blue;"&gt;Transaction&lt;/span&gt; Reference&lt;span style=""&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                  &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;Set&lt;/span&gt; @AA&lt;span style="color: gray;"&gt;=&lt;/span&gt;@AA&lt;span style="color: gray;"&gt;+&lt;/span&gt;1&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;span style="color: blue;"&gt;Set&lt;/span&gt; @A&lt;span style="color: gray;"&gt;=&lt;/span&gt;@A&lt;span style="color: gray;"&gt;+&lt;/span&gt;1&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;span style="color: blue;"&gt;Drop&lt;/span&gt; &lt;span style="color: blue;"&gt;Table&lt;/span&gt; #temp1&lt;span style=""&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;End&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Drop&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;Table&lt;/span&gt; #temp&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Commit&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;Tran&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-2813620458349347704?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/how-to-remoove-references-in-whole.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-6130888911786185920</guid><pubDate>Fri, 11 Jun 2010 07:26:00 +0000</pubDate><atom:updated>2010-06-11T00:27:18.225-07:00</atom:updated><title>How to apply foreign key in whole databse if primary key column name  and foreign column name are same</title><description>&lt;div class="gmail_quote"&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: green;"&gt;/**********************************************************************&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: green;"&gt;Procedure Name:&lt;span&gt;  &lt;/span&gt;[Add_Reference]&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: green;"&gt;Created By:&lt;span&gt;      &lt;/span&gt;Mangesh Singh&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: green;"&gt;Date:&lt;span&gt;           &lt;/span&gt;&lt;span&gt; &lt;/span&gt;24 April 2009&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: green;"&gt;Purpose:&lt;span&gt;         &lt;/span&gt;To Add Relationship In Database &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: green;"&gt;**********************************************************************/&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;ALTER&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;Procedure&lt;/span&gt; [dbo]&lt;span style="color: gray;"&gt;.&lt;/span&gt;[Add_Reference]&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;AS&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @ERR &lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Begin&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;Tran&lt;/span&gt; Reference &lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Create&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;Table&lt;/span&gt; #temp&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: gray;"&gt;(&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;ID &lt;span style="color: blue;"&gt;INT&lt;/span&gt; &lt;span style="color: blue;"&gt;IDENTITY&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;TableName &lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;100&lt;span style="color: gray;"&gt;),&lt;/span&gt;IDD &lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Insert&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;Into&lt;/span&gt; #temp&lt;span style="color: gray;"&gt;(&lt;/span&gt;TableName&lt;span style="color: gray;"&gt;,&lt;/span&gt;IDD&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Select&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;Name&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;ID &lt;span style="color: blue;"&gt;From&lt;/span&gt; &lt;span style="color: green;"&gt;sys.sysobjects&lt;/span&gt; &lt;span style="color: blue;"&gt;Where&lt;/span&gt; xtype&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39;U&amp;#39;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Declare&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @Count &lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;declare&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @A &lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;declare&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @PrimaryColumn &lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;100&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;declare&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @primarytable &lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;100&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;declare&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @ForegnKeyTable &lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;100&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;declare&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @Sql &lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;max&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Set&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @A&lt;span style="color: gray;"&gt;=&lt;/span&gt;1&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Select&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; @Count&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;Count&lt;/span&gt;&lt;span style="color: gray;"&gt;(*)&lt;/span&gt; &lt;span style="color: blue;"&gt;From&lt;/span&gt; #temp&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;While&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: gray;"&gt;(&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;@A&lt;span style="color: gray;"&gt;&amp;lt;=&lt;/span&gt;@Count&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Begin&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Declare&lt;/span&gt; @IsPrimary &lt;span style="color: blue;"&gt;Bit&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Declare&lt;/span&gt; @FK &lt;span style="color: blue;"&gt;Varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;100&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Declare&lt;/span&gt; @PK &lt;span style="color: blue;"&gt;Varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;100&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Declare&lt;/span&gt; @PKTABLE &lt;span style="color: blue;"&gt;Varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;100&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Declare&lt;/span&gt; @FKTABLE &lt;span style="color: blue;"&gt;Varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;100&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Select&lt;/span&gt; @PKTABLE&lt;span style="color: gray;"&gt;=&lt;/span&gt;TableName &lt;span style="color: blue;"&gt;From&lt;/span&gt; #temp &lt;span style="color: blue;"&gt;Where&lt;/span&gt; ID&lt;span style="color: gray;"&gt;=&lt;/span&gt;@A&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Select&lt;/span&gt; @PK&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;Name&lt;/span&gt; &lt;span style="color: blue;"&gt;From&lt;/span&gt; &lt;span style="color: green;"&gt;Sys.SysColumns&lt;/span&gt; &lt;span style="color: blue;"&gt;Where&lt;/span&gt; ID &lt;span style="color: gray;"&gt;IN(&lt;/span&gt;&lt;span style="color: blue;"&gt;Select&lt;/span&gt; ID &lt;span style="color: blue;"&gt;From&lt;/span&gt; &lt;span style="color: green;"&gt;Sys.SysObjects&lt;/span&gt; &lt;span style="color: blue;"&gt;Where&lt;/span&gt; &lt;span style="color: blue;"&gt;Name&lt;/span&gt;&lt;span style="color: gray;"&gt;=(&lt;/span&gt;&lt;span style="color: blue;"&gt;Select&lt;/span&gt; TableName &lt;span style="color: blue;"&gt;From&lt;/span&gt; #temp&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;   &lt;/span&gt;&lt;span style="color: blue;"&gt;Where&lt;/span&gt; ID&lt;span style="color: gray;"&gt;=&lt;/span&gt;@A&lt;span style="color: gray;"&gt;))&lt;/span&gt; &lt;span style="color: gray;"&gt;and&lt;/span&gt; ColStat&lt;span style="color: gray;"&gt;=&lt;/span&gt;1&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Create&lt;/span&gt; &lt;span style="color: blue;"&gt;Table&lt;/span&gt; #fk&lt;span style="color: gray;"&gt;(&lt;/span&gt;ID &lt;span style="color: blue;"&gt;INT&lt;/span&gt; &lt;span style="color: blue;"&gt;IDENTITY&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;1&lt;span style="color: gray;"&gt;,&lt;/span&gt;1&lt;span style="color: gray;"&gt;),&lt;/span&gt;TblName &lt;span style="color: blue;"&gt;Varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;Max&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Insert&lt;/span&gt; &lt;span style="color: blue;"&gt;Into&lt;/span&gt; #fk&lt;span style="color: gray;"&gt;(&lt;/span&gt;TblName&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Select&lt;/span&gt; &lt;span style="color: blue;"&gt;name&lt;/span&gt; &lt;span style="color: blue;"&gt;From&lt;/span&gt; &lt;span style="color: green;"&gt;Sys.SysObjects&lt;/span&gt; &lt;span style="color: blue;"&gt;Where&lt;/span&gt; ID &lt;span style="color: gray;"&gt;IN(&lt;/span&gt;&lt;span style="color: blue;"&gt;Select&lt;/span&gt; ID &lt;span style="color: blue;"&gt;From&lt;/span&gt; &lt;span style="color: green;"&gt;Sys.SysColumns&lt;/span&gt; &lt;span style="color: blue;"&gt;Where&lt;/span&gt; &lt;span style="color: blue;"&gt;Name&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;@PK&lt;span style="color: gray;"&gt;)&lt;/span&gt; &lt;span style="color: gray;"&gt;AND&lt;/span&gt; XType&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39;U&amp;#39;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Declare&lt;/span&gt; @CountTemp &lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Declare&lt;/span&gt; @AA &lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Set&lt;/span&gt; @AA&lt;span style="color: gray;"&gt;=&lt;/span&gt;1&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Select&lt;/span&gt; @CountTemp&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;Count&lt;/span&gt;&lt;span style="color: gray;"&gt;(*)&lt;/span&gt; &lt;span style="color: blue;"&gt;From&lt;/span&gt; #fk&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;While&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;@AA&lt;span style="color: gray;"&gt;&amp;lt;=&lt;/span&gt;@CountTemp&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Begin&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;      &lt;/span&gt;&lt;span style="color: blue;"&gt;Select&lt;/span&gt; @FKTABLE&lt;span style="color: gray;"&gt;=&lt;/span&gt;TblName &lt;span style="color: blue;"&gt;From&lt;/span&gt; #fk &lt;span style="color: blue;"&gt;Where&lt;/span&gt; ID&lt;span style="color: gray;"&gt;=&lt;/span&gt;@AA&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;   &lt;/span&gt;&lt;span style="color: blue;"&gt;IF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;@FKTABLE&lt;span style="color: gray;"&gt;&amp;lt;&amp;gt;&lt;/span&gt;@PKTABLE&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;   &lt;/span&gt;&lt;span style="color: blue;"&gt;Begin&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;      &lt;/span&gt;&lt;span&gt;   &lt;/span&gt;&lt;span style="color: blue;"&gt;Set&lt;/span&gt; @Sql&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39;ALTER TABLE &amp;#39;&lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;@FKTABLE&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39; ADD FOREIGN KEY (&amp;#39;&lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;@PK&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39;) REFERENCES &amp;#39;&lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;@PKTABLE&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39;(&amp;#39;&lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;@PK&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39;);&amp;#39;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;      &lt;/span&gt;&lt;span&gt;   &lt;/span&gt;&lt;span style="color: blue;"&gt;Exec&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;@Sql&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;Set&lt;/span&gt; @Err&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;@@ERROR&lt;/span&gt;&lt;span&gt;          &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; &lt;span style="color: gray;"&gt;(&lt;/span&gt;@ERR &lt;span style="color: gray;"&gt;&amp;lt;&amp;gt;&lt;/span&gt; 0&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;          &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;Begin&lt;/span&gt;&lt;span&gt;              &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;Raiserror&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39;Insert Statement Fail&amp;#39;&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;16&lt;span style="color: gray;"&gt;,&lt;/span&gt;1&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span&gt;              &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;RollBack&lt;/span&gt; &lt;span style="color: blue;"&gt;Transaction&lt;/span&gt; Reference&lt;span&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;   &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;      &lt;/span&gt;&lt;span style="color: blue;"&gt;Set&lt;/span&gt; @AA&lt;span style="color: gray;"&gt;=&lt;/span&gt;@AA&lt;span style="color: gray;"&gt;+&lt;/span&gt;1&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Drop&lt;/span&gt; &lt;span style="color: blue;"&gt;table&lt;/span&gt; #fk &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;Set&lt;/span&gt; @A&lt;span style="color: gray;"&gt;=&lt;/span&gt;@A&lt;span style="color: gray;"&gt;+&lt;/span&gt;1&lt;span&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;End&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Drop&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;table&lt;/span&gt; #temp&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Commit&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;Tran&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;     &lt;/div&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-6130888911786185920?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/how-to-apply-foreign-key-in-whole.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-7677125618848489101</guid><pubDate>Fri, 11 Jun 2010 07:25:00 +0000</pubDate><atom:updated>2010-06-11T00:25:51.571-07:00</atom:updated><title>how to generate Serial numbers in select query in sql</title><description>&lt;br&gt;&lt;p&gt;&lt;font color="#0000a0"&gt;SELECT&lt;/font&gt; &lt;font color="#ff0000"&gt;ROW_NUMBER()&lt;/font&gt;  &lt;font color="#0000a0"&gt;OVER&lt;/font&gt; (&lt;font color="#0000a0"&gt;ORDER&lt;/font&gt; &lt;font color="#0000a0"&gt;BY&lt;/font&gt;  ColumnName1) &lt;font color="#0000a0"&gt;As&lt;/font&gt; SrNo, ColumnName1,  ColumnName2 &lt;font color="#0000a0"&gt;FROM&lt;/font&gt;  TableName&lt;/p&gt;   &lt;p&gt;Fig- (1) Query to display Serial Number Column using SQL Server &lt;br&gt;&lt;/p&gt; &lt;br&gt;&lt;br&gt;&lt;br&gt;Detailded example&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;span style="position: absolute; z-index: 249; left: 60px; top: 216px; width: 648px; height: 846px;"&gt;&lt;div style="padding: 2.85pt;" class="shape"&gt;&lt;br&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style="position: absolute; z-index: 249; left: 60px; top: 216px; width: 648px; height: 846px;"&gt;&lt;div style="padding: 2.85pt;" class="shape"&gt;     &lt;p class="MsoNormal" style="margin-right: 27pt;"&gt;&lt;span style="text-decoration: underline; font-weight: bold;"&gt;Abstract&lt;/span&gt;&lt;span style=""&gt;: Sometimes you just need to extract every other row from a result set. Other times you need a row number so as to provide paging in a web application. &lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-right: 27pt;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-right: 27pt;"&gt;&lt;span style=""&gt;Here is an example of how to extract every other row from a result set in both SQL Server 2000 and SQL Server 2005&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-right: 27pt;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-right: 27pt;"&gt;&lt;span style="text-decoration: underline; font-weight: bold;"&gt;Body:&lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-right: 27pt;"&gt;&lt;span style=""&gt;Possible shortcut: If the underlying result set has an integer that is more or less evenly divided between odd and even then this example with the Categories table in the Northwind database will work.&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt; &lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryID&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryName &lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;Categories&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryID &lt;/span&gt;&lt;span style="color: gray;"&gt;%&lt;/span&gt;&lt;span style="color: black;"&gt; 2 &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; 1&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-right: 27pt;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-right: 27pt;"&gt;&lt;span style=""&gt;By using the % (modulo) operator we get rows with the categoryid is odd. This does not perfectly give you everyother row since we could have a missing value (the row could have been deleted). Even worse, your additional search criteria could select data that is not evenly distributed between even and odd ids.&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-right: 27pt;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-right: 27pt;"&gt;&lt;span style=""&gt;This will work every time:&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-right: 27pt;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="color: black;"&gt; @tCat &lt;/span&gt;&lt;span style="color: blue;"&gt;TABLE&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;TID &lt;/span&gt;&lt;span style="color: blue;"&gt;int&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;identity&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;span dir="ltr"&gt;&lt;/span&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;span dir="ltr"&gt;&lt;/span&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryID &lt;/span&gt;&lt;span style="color: blue;"&gt;int&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryName &lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;span dir="ltr"&gt;&lt;/span&gt;100&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="color: gray;"&gt; &lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;INSERT&lt;/span&gt;&lt;span style="color: black;"&gt; @tCat &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;CategoryID&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryName &lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryID&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryName&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;Categories&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryID&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryName&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; @tCat&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; TID &lt;/span&gt;&lt;span style="color: gray;"&gt;%&lt;/span&gt;&lt;span style="color: black;"&gt; 2 &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; 1&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-right: 27pt;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-right: 27pt;"&gt;&lt;span style=""&gt;In &lt;/span&gt;&lt;span style="text-decoration: underline; font-weight: bold;"&gt;SQL 2005&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;  &lt;/span&gt;&lt;span style=""&gt;you could use the Row_Number() function. &lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-right: 27pt;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryID&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryName&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; Row_Number&lt;/span&gt;&lt;span style="color: gray;"&gt;()&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;OVER&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;ORDER&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;BY&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryName &lt;/span&gt;&lt;span style="color: blue;"&gt;DESC&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;as&lt;/span&gt;&lt;span style="color: black;"&gt; RowNum&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryID&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; CategoryName &lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="color: black;"&gt;                                  &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;Categories&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; Cat&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; RowNum &lt;/span&gt;&lt;span style="color: gray;"&gt;%&lt;/span&gt;&lt;span style="color: black;"&gt; 2 &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; 1&lt;/span&gt;&lt;/p&gt;     &lt;/div&gt;&lt;/span&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4349279927384911792-7677125618848489101?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/how-to-generate-serial-numbers-in.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-4349279927384911792.post-6499397418450752379</guid><pubDate>Fri, 11 Jun 2010 07:19:00 +0000</pubDate><atom:updated>2010-06-11T00:19:35.731-07:00</atom:updated><title>To Count Records In Tables in sql server 2005,2008</title><description>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CMangesh%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C06%5Cclip_filelist.xml"&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;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: rgb(51, 153, 102);"&gt;---To Count Records In Tables&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;Create&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;PROCEDURE&lt;/span&gt; [dbo]&lt;span style="color: gray;"&gt;.&lt;/span&gt;[listTableRowCounts]&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;AS&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;BEGIN&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt; &lt;span style="color: blue;"&gt;NOCOUNT&lt;/span&gt; &lt;span style="color: blue;"&gt;ON&lt;/span&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt; @SQL &lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;255&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt; @SQL &lt;span style="color: gray;"&gt;=&lt;/span&gt; &lt;span style="color: red;"&gt;&amp;#39;DBCC UPDATEUSAGE (&amp;#39;&lt;/span&gt; &lt;span style="color: gray;"&gt;+&lt;/span&gt; &lt;span style="color: fuchsia;"&gt;DB_NAME&lt;/span&gt;&lt;span style="color: gray;"&gt;()&lt;/span&gt; &lt;span style="color: gray;"&gt;+&lt;/span&gt; &lt;span style="color: red;"&gt;&amp;#39;)&amp;#39;&lt;/span&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;EXEC&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;@SQL&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;               &lt;/span&gt;&lt;span style=""&gt;          &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;CREATE&lt;/span&gt; &lt;span style="color: blue;"&gt;TABLE&lt;/span&gt; #foo&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;tablename &lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;255&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;rc &lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                             &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;INSERT&lt;/span&gt; #foo&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;EXEC&lt;/span&gt; &lt;span style="color: maroon;"&gt;sp_msForEachTable&lt;/span&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: red;"&gt;&amp;#39;SELECT PARSENAME(&amp;#39;&amp;#39;?&amp;#39;&amp;#39;, 1),&lt;span style=""&gt;                  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: red;"&gt;&lt;span style=""&gt;             &lt;/span&gt;COUNT(*) FROM ?&amp;#39;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt; tablename&lt;span style="color: gray;"&gt;,&lt;/span&gt; rc&lt;span style=""&gt;    &lt;/span&gt;&lt;span style=""&gt;                     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt; #foo&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;where&lt;/span&gt; rc&lt;span style=""&gt;  &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;gt;&lt;/span&gt; 0&lt;span style=""&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;Order&lt;/span&gt; &lt;span style="color: blue;"&gt;By&lt;/span&gt; tablename&lt;span style=""&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;DROP&lt;/span&gt; &lt;span style="color: blue;"&gt;TABLE&lt;/span&gt; #foo&lt;span style=""&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;END&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;          &lt;/span&gt;&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/4349279927384911792-6499397418450752379?l=sourcecodeforum.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://sourcecodeforum.blogspot.com/2010/06/to-count-records-in-tables-in-sql.html</link><author>noreply@blogger.com (Chauthi Drishti)</author><thr:total>0</thr:total></item></channel></rss>