<?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:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-1141840521707170383</atom:id><lastBuildDate>Mon, 09 Dec 2024 11:22:12 +0000</lastBuildDate><category>Recovery</category><category>Transaction Log</category><category>Database LOGs</category><category>Disaster Recovery</category><category>LOG Backup</category><category>Restore Recovery</category><category>Recovery Models</category><category>Backup</category><category>CLR Integration in SQL</category><category>Catalog Views</category><category>Checkpoints</category><category>Connectivity</category><category>DMVs</category><category>Endpoints</category><category>Firewall</category><category>High Availablity</category><category>LOG Shipping</category><category>REDO and UNDO In SQL 2005</category><category>Restart Recovery</category><category>SQL Protocols</category><category>lock escalation</category><title>SQLThoughts</title><description>To share and gain ideas about all concepts of MS SQL Server 2005.</description><link>http://sqlthoughts.blogspot.com/</link><managingEditor>noreply@blogger.com (Esakkiappan Barathan)</managingEditor><generator>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-6387095741078368055</guid><pubDate>Tue, 15 Mar 2011 04:36:00 +0000</pubDate><atom:updated>2011-03-15T10:06:58.284+05:30</atom:updated><title>Important support changes for SQL Server 2000 and SQL Server 2005</title><description>Important support changes for SQL Server 2000 and SQL Server 2005&lt;br /&gt;&lt;a href=&quot;http://blogs.technet.com/SQLServerTeam/ProfileUrlRedirect.ashx&quot; target=&quot;1&quot;&gt;&lt;/a&gt;SQL Server Team&lt;br /&gt;9 Mar 2011 1:28 PM&lt;br /&gt;There are some important support changes coming up for Microsoft SQL Server 2000 and SQL Server 2005. We want to make sure you know what’s happening so you can avoid the risk of running unsupported products and choose the right version of SQL Server for your business.&lt;br /&gt;&lt;br /&gt;What is happening:&lt;br /&gt;&lt;br /&gt;SQL Server 2000&lt;br /&gt;On 4/9/2013, Extended Support for SQL Server 2000 will come to an end, and SQL Server 2000 will no longer be supported.&lt;br /&gt;After this date:&lt;br /&gt;·         Updates to this software will stop and so you will no longer receive patches including security updates.&lt;br /&gt;·         Self-Help Online Support will be available for a minimum of 12 months.&lt;br /&gt;&lt;br /&gt;SQL Server 2005&lt;br /&gt;On 4/12/2011, SQL Server 2005 will transition from Mainstream Support to Extended Support, which includes:&lt;br /&gt;·         Paid support (charged on an hourly basis per incident). Customers will no longer receive no-charge incident support and warranty claims, and won’t be able to request design changes or features.&lt;br /&gt;·         Security update support at no additional cost.&lt;br /&gt;·         Non-security related hotfix support will require a separate Extended Hotfix Support Agreement to be purchased within 90 days of the end of Mainstream Support – July 11th, 2011.&lt;br /&gt;&lt;br /&gt;Microsoft Support Lifecycle Policy&lt;br /&gt;The Microsoft Support Lifecycle policy took effect in October 2002, and applies to most products currently available through retail purchase or volume licensing and most future release products.&lt;br /&gt;&lt;br /&gt;Through the policy, Microsoft will offer a minimum of:&lt;br /&gt;·         10 years of support (5 years Mainstream Support and 5 years Extended Support) at the &lt;a href=&quot;http://support.microsoft.com/lifecycle/?LN=en-us&amp;amp;x=18&amp;amp;y=15#Service&quot; target=&quot;1&quot;&gt;supported service pack level&lt;/a&gt; for Business and Developer products&lt;br /&gt;·         5 years Mainstream Support at the &lt;a href=&quot;http://support.microsoft.com/lifecycle/?LN=en-us&amp;amp;x=18&amp;amp;y=15#Service&quot; target=&quot;1&quot;&gt;supported service pack level&lt;/a&gt; for Consumer/Hardware/Multimedia products&lt;br /&gt;·         3 years of Mainstream Support for products that are annually released (for example, Money, Encarta, Picture It!, and Streets &amp;amp; Trips)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Phases of the Support Lifecycle&lt;br /&gt;&lt;a href=&quot;http://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-60-54-metablogapi/6114.clip_5F00_image002_5F00_2.jpg&quot; target=&quot;1&quot;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Your options in moving forward:&lt;br /&gt;SQL Server 2000&lt;br /&gt;·         Upgrade to a supported version of SQL Server.&lt;br /&gt;·         Find out more about a Custom Support Agreement (CSA).&lt;br /&gt;·         Run SQL Server 2000 unsupported with access to Self-Help Online Support only (not recommended)&lt;br /&gt;&lt;br /&gt;SQL Server 2005&lt;br /&gt;·         Remain on SQL Server 2005 with Extended Support. You can still open support incidents and receive support, however you will not be able to request specific fixes.&lt;br /&gt;·         Remain on SQL Server 2005 with Extended Support and purchase Extended Hotfix Support. You can then open support incidents and request specific fixes.&lt;br /&gt;·         Upgrade to a supported version of SQL Server.</description><link>http://sqlthoughts.blogspot.com/2011/03/important-support-changes-for-sql.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>38</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-3924298285388606580</guid><pubDate>Tue, 15 Mar 2011 04:34:00 +0000</pubDate><atom:updated>2011-03-15T10:05:23.928+05:30</atom:updated><title>Licensing changes in SQL Server 2008 R2</title><description>&lt;p&gt;I recieved a mail from one of my friend... This may be useful who ever involved in Puchase......&lt;/p&gt;&lt;p&gt;Licensing changes in SQL Server 2008 R2&lt;br /&gt;&lt;br /&gt;In the past, Microsoft has followed the “R2” strategy to provide a functional release to existing products. Windows Server 2003 and 2008 went through an R2 version. It was regarded as a bonus for loyal customers who were current on their Software Assurance agreement. This strategy has continued with SQL Server 2008 R2. However, for new licenses the price of a per-processor license for the Enterprise and Standard editions has increased by 15% and 25% respectively while a new edition, Datacenter, is available at a whopping $57,498 per processor for unlimited connections.&lt;br /&gt;Microsoft would say that the introduction of the Datacenter edition means the major SQL Server editions align with those of Windows Server to make things consistent. For instance, you are allowed up to 4 Virtual Machines with the Windows Server 2008 Enterprise license and now the same applies to SQL Server 2008 R2 Enterprise. If you want to go beyond that number you will want to upgrade to the Datacenter edition for both Windows and SQL Server. Also, because the Datacenter edition supports up to 256 logical processors (cores), the Enterprise edition now supports only 8 processors. To keep existing customers happy, to its credit, if you purchased Enterprise licensing with unlimited virtualization, that will be honored as long as you are current with Software Assurance.&lt;br /&gt;There’s also the new SQL Server 2008 R2 Parallel Data Warehouse edition which implements the DATAllegro appliance technology for supporting large databases into the tens of Terabytes. That goes for the same price as the Datacenter edition.&lt;br /&gt;From a technical point of view, the exciting new PowerPivot feature is supported by SQL Server 2008 R2 Enterprise and above with Office Excel 2010 Professional Plus. For existing features, there are a couple changes to licensing. Now Backup Compression is supported by SQL Server 2008 R2 Standard edition and above; however Data Compression still requires the Enterprise. And the free Express edition supports databases up to 10GB up from 4GB. So Microsoft has thrown us a few crumbs.&lt;br /&gt;&lt;br /&gt;With regards,&lt;br /&gt;Rahim Kandanuru,&lt;br /&gt;Database Administrator,&lt;br /&gt;DB Admin Team  IT Department  Dubai Islamic Bank (Head Office)  Mob: +971-50-6877056, Off:+971-4-2075563.&lt;/p&gt;</description><link>http://sqlthoughts.blogspot.com/2011/03/licensing-changes-in-sql-server-2008-r2.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-8392414664270675516</guid><pubDate>Tue, 09 Mar 2010 06:11:00 +0000</pubDate><atom:updated>2010-03-09T11:44:35.299+05:30</atom:updated><title>Must Read White Papers</title><description>For  Developers and  DBAs  .....&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A must read collection of  White papers from http://mssqltips.com&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://www.mssqltips.com/whitepaperlist.asp&quot;&gt;click here&lt;/a&gt; .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://sqlthoughts.blogspot.com/2010/03/must-read-white-papers.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>7</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-6749677982974520167</guid><pubDate>Sat, 23 Aug 2008 10:27:00 +0000</pubDate><atom:updated>2008-08-23T15:59:20.262+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">lock escalation</category><title>Lock Escalation in SQL Server 2005</title><description>Locking is a mechanism which is internally handled by SQL Server. This locking technology helps synchronize access of same piece of data by multiple users. &lt;br /&gt;A piece of data is being modified by a transaction triggered by USER A will be accessible only to the USERA and not for others. For achieve this, SQL Server’s Database Engine’s LOCK Manager Component is performing locking methods with different level of locking.  The Data can be locked in lowest level at Row level and be at the highest level at Database Level.&lt;br /&gt;The hierarchy starts database level at the top and further drill down to schema, tables, table partitions, extents, pages and finally at the bottom level to the individual ROW. By default SQL Server starts lock from the bottom level starts with row level locking.  Each locking uses some memory resources in SQL Server Box.  If a heap or B-Tree’s locks threshold crosses 5000 Row level locks counts by a single transaction then SQL Server automatically locks the whole table that is instead of having 5000 different row level locks for a single table, It locks whole table with a single lock.  This process of converting many fine-grain locks into fewer coarse-grain locks is calling Lock Escalation. &lt;br /&gt;Lock Escalation reduces system overhead and also increase the probability of concurrency contention.&lt;br /&gt;In practical we often use the table hints  in our Select Update Or Delete Command with in  transactions. The Table_hints like NOLOCK, HOLDLOCK, PAGLOCK, UPDLOCK and TABLOCK are specifying locking modes of a particular heap or B-Tree for the transaction.&lt;br /&gt;As the life time of a lock structure is equivalent to the life time of a transaction,  in-completed  transactions may hold large number of locks and these locks may cause  severe blockings. For information please visit :&lt;br /&gt;&lt;a href=&quot;http://support.microsoft.com/kb/295108/&quot;&gt;Incomplete transaction may hold large number of locks and cause blocking&lt;/a&gt;&lt;br /&gt;We can use DBCC OPENTRAN command to find out the open transactions in the instance.&lt;br /&gt;For More detailed study about the lock escalation please go through the following links&lt;br /&gt;&lt;a href=&quot;http://blogs.msdn.com/sqlserverstorageengine/archive/2006/05/17/Lock-escalation.aspx&quot;&gt;http://blogs.msdn.com/sqlserverstorageengine/archive/2006/05/17/Lock-escalation.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://blogs.technet.com/mat_stephen/archive/2005/01/31/363803.aspx&quot;&gt;http://blogs.technet.com/mat_stephen/archive/2005/01/31/363803.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://support.microsoft.com/kb/323630&quot;&gt;http://support.microsoft.com/kb/323630&lt;/a&gt;</description><link>http://sqlthoughts.blogspot.com/2008/08/lock-escalation-in-sql-server-2005.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>53</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-3057460088622886105</guid><pubDate>Mon, 21 Apr 2008 16:09:00 +0000</pubDate><atom:updated>2008-04-21T21:39:36.046+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">LOG Backup</category><category domain="http://www.blogger.com/atom/ns#">Recovery</category><category domain="http://www.blogger.com/atom/ns#">Recovery Models</category><category domain="http://www.blogger.com/atom/ns#">Restore Recovery</category><category domain="http://www.blogger.com/atom/ns#">Transaction Log</category><title>Know The Transaction Log – Part 4 - Restoring Data</title><description>&lt;p align=&quot;justify&quot;&gt;After looking about the backups in SQL Server it is time to know about the Restore and Recovery in SQL Server.&lt;/p&gt;  &lt;p&gt;SQL Server supports three levels of Restoring data. They are &lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;u&gt;&lt;font color=&quot;#804040&quot;&gt;1. Complete Database Restore :&lt;/font&gt;&lt;/u&gt; This is the basic restore strategy. A complete database restore for a simple recovery model database simply involve a full backup followed by the latest differential backup if any available. For a full or bulk-logged recovery model database this complete Data Restore involves restoring a Full Backup followed by a latest differential backup and then a sequence of Transaction log backup in which they are backed up and finally tail-log backup if any available.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;u&gt;&lt;font color=&quot;#804040&quot;&gt;2. File Restore :&lt;/font&gt;&lt;/u&gt; This restore operation is very useful when any one of the files in the file group is damage. The main advantage of this restore is restore time will be less, obviously compared to complete database restore. For simple recovery model database file restore will work with read-only secondary files.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;u&gt;&lt;font color=&quot;#804040&quot;&gt;3. Page Restore :&lt;/font&gt;&lt;/u&gt; This restore is only applicable for Full or Bulk-Logged Recovery model database and not available for Simple recovery model. Using this level of restore , a particular page or pages can be restored.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font color=&quot;#008000&quot;&gt;How Restore Works ?&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Restoring is the process of copying data from a backup and applying Transaction logs to the data to point of time when the backup is taken. This process is done in three phases, Data Copy phase, Redo Phase and Undo Phase.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;u&gt;&lt;font color=&quot;#804040&quot;&gt;Data Copy Phase:&lt;/font&gt;&lt;/u&gt; The process of copying the data, index and log pages from the backup media to the database files. No log backups nor log information in the data backups are applied in this phase.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;u&gt;&lt;font color=&quot;#804040&quot;&gt;Redo Phase :&lt;/font&gt;&lt;/u&gt; This phase applies logged changes to the data by processing log information from the log backups.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&lt;u&gt;&lt;font color=&quot;#804040&quot;&gt;Undo Phase :&lt;/font&gt;&lt;/u&gt; This phase applies undoing any uncommitted transactions from the data that are restored from Backup and brings the database online.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;In this stage we have to understand the relationship between the WITH RECOVERY and WITH NORECOVERY options in RESTORE Command.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;The default option is WITH RECOVERY. This will continue the Undo phase after completing the REDO phase.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;A normal restore operation stops at the redo stage if WITH NORECOVERY is included in RESTORE statement. This allows Roll Forward to continue with the next statement of the Restore Sequence, in which the other backups&amp;#160; typically a differential or a transaction backup will do the undo phase.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;For a Full Recovery model database or for a Bulk-logged recovery model database, a restore operation is done by a sequence of RESTORE statements. This sequence is called Restore Sequence. &lt;/p&gt;  &lt;p&gt;For a simple scenario a restore sequence might be &lt;/p&gt;  &lt;p&gt;&amp;#183; starting with restoring a recent full backup, &lt;/p&gt;  &lt;p&gt;&amp;#183; applying the most recent differential backup,&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&amp;#183; restoring the sequence of log backups in the order they are backed up after the most recent differential backup, &lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&amp;#183; finally the restoring tail log backup if any taken after the failure occurred. &lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;For more complex scenarios, complex sequence planning will be required. For these planning a recovery path is very important. A Recovery Path is a complete sequence of data and log backups that can&amp;#160; bring database to a point of time. For more details about Recovery Path search in Books On Line.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font color=&quot;#008000&quot;&gt;Complete Database Restore :&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;A simple restore strategy. Let us see how you have to do a Complete Database Restore using an example. Suppose for a full or bulk-logged recovery model database, a series of backups are taken in the following schedules. A Full backup on Monday 10 PM, Differential backups are scheduled on 10 PM of Wednesday,Friday and Sunday. Transaction Log Backups are scheduled twice a day 6 AM and 6 PM every day. In this sequence, the database is got failed on Saturday 4 PM. How to Restore this database with available backups ?&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;On a failure situation of database, first thing we have to do is take the tail log backup with NOTRUNCATE option if possible. So take the Tail-log backup first.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Every Restore is to be started with Full Backup. So start with restoring the full backup taken on Monday 10 PM with NORECOVERY option. We have the latest differential backup taken on Friday 10 PM. So apply that backup, and we can omit applying log backups taken after Monday 10 PM and before Friday 10 PM. After restoring this latest differential backup, we have to restore the log backup taken on Saturday 6 AM. That is latest log backup taken on schedule before failure. Now the database is ready up to the Saturday 6 AM. Now, Restore the tail backup that is taken after the failure , that Saturday 4 PM with RECOVERY option. Now the database is fully restored.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font color=&quot;#008000&quot;&gt;File or File Group Restore :&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;To Restore a Single File in a File group or Complete File group of a Database you have to use Restore Command with FILE option or FILEGROUP option. All you need is unbroken chain of log backups from the time of file or file group backup was made. Before applying the file&amp;#160; or file group backup you have to take the transaction log backup. After restoring the file or file group , you have to restore all the transaction log backups to synchronise that file or file group with the rest of the database.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Let us see an example. Suppose a SecondaryFG is a file group of a database backed up on Friday 12 noon and the database is still in use. Backing up of Transaction log of this database is scheduled on 10 AM, 11:30 AM, 1:00 PM, 2:30 PM , 4:00PM, 5:30PM and so on. Note that the database is still in use, and the changes are made in SecondaryFG and other file groups too. At 5:15 PM, a media failure occurs that corrupts the SecondaryFG. Now we have to restore this. First take the tail log backup that contains all the log records after 4:00 PM Log Backup, with NOTRUNCATE NORECOVERY, to make the database in Restoring state so that no other modification will be done after the failure. Now apply the backup that was taken at 12 noon. So the SecondaryFG now have&amp;#160; all the changes that are made up to 12 noon. Now start applying the Transaction log backups in the sequence of they backed up that is apply 1:00PM Backup first, 2:30 PM backup second, 4:00 PM backup third. Now the SecondaryFG is synchronised with all the database files up to 4:00 PM. Finally apply the tail log backup that was taken after the failure to make SecondaryFG fully compatible with all the files of the database.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font color=&quot;#008000&quot;&gt;Page Restore:&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Page restore is only possible for databases using Full Recovery model or Bulk-logged Recovery model. All Editions of SQL Sever other than Enterprise Edition&amp;#160; support offline Page Restore whereas SQL Server 2005 Enterprise Edition supports Online PAGE Restore when database is online. &lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;A page may be marked as suspect page, when a query or DBCC CHECK TABLE or DBCC CHECKDB&amp;#160; failed to access it. Every page in a database that is marked as suspect will have an entry in &lt;font color=&quot;#0000ff&quot;&gt;msdb..suspect_pages&lt;/font&gt; table. Event_type column of this table may have either one of the following numbers, 1 for the pages marked with error number 824 other than Bad Page ID and Checksum Error; 2 for Bad PageID ,3 for Checksum Error. 4,5 and 7 for the repaired pages. This table is limited to size and if it is full, the errors could not be logged in this table. So it should be a DBA&amp;#8217;s routine to delete the all the records in the msdb..suspect_pages table having event_type is greater than or equal to 4 in regular intervals.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Get the pageId and fileId from msdb..suspect_pages for the pages to be restored. Start RESTORE with full or File or Group Backup that contains the pages to be restored and use PAGE option. Then apply the most recent differential backup if any available and apply all subsequent log backups. Now backup the log and restore it again to match the last_target_LSN in sys.masterfile. &lt;/p&gt;  &lt;p&gt;&lt;font color=&quot;#804040&quot;&gt;&lt;u&gt;Limitations of Page Restore&lt;/u&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#183; Only Database pages can be restored not the log pages.&lt;/p&gt;  &lt;p&gt;&amp;#183; File boot page i.e Page 0 can not be restored and page 1:9 can not be restored that is database boot page.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&amp;#183; GAM , SGAM and PFS Pages can not be restored.&lt;/p&gt;  &lt;p&gt;For more details see Books Online.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;With this I conclude my Know The Transaction LOG Series. Some things are&amp;#160; purposely omitted in this series of post that are POINT-IN-TIME Restore using RESTORE with STOPAT option to avoid over doses. &lt;/p&gt;  </description><link>http://sqlthoughts.blogspot.com/2008/04/know-transaction-log-part-4-restoring.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-6058978384312808315</guid><pubDate>Fri, 21 Mar 2008 15:11:00 +0000</pubDate><atom:updated>2008-03-21T20:51:10.443+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Backup</category><category domain="http://www.blogger.com/atom/ns#">Database LOGs</category><category domain="http://www.blogger.com/atom/ns#">Disaster Recovery</category><category domain="http://www.blogger.com/atom/ns#">LOG Backup</category><category domain="http://www.blogger.com/atom/ns#">Recovery</category><category domain="http://www.blogger.com/atom/ns#">Restore Recovery</category><category domain="http://www.blogger.com/atom/ns#">Transaction Log</category><title>KNOW THE TRANSACTION LOG –PART- 3</title><description>&lt;p align=&quot;justify&quot;&gt;This is third article in the KNOW THE TRANSACTION LOG series. In &lt;a href=&quot;http://sqlthoughts.blogspot.com/2008/02/know-transaction-log-part-1.html&quot;&gt;Part 1 &lt;/a&gt;I explained about the Transaction Log File and its behaviour. In &lt;a href=&quot;http://sqlthoughts.blogspot.com/2008/03/know-transaction-log-part-2.html&quot;&gt;Part 2&lt;/a&gt; I explained about the Recovery Models available in SQL Server 2005 which affects the behaviour of Transaction log file of the database. In this Part 3, I am going to explain about the various Backup options available in SQL Server 2005, because, Backups are the backbone of the Restore Recovery of course for a DBA too. :)&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Backups in SQL Server 2005.&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;Two major categories of Backups are available in SQL Server. They are Data backup and Log Backup.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;Data backup includes image of one or more data files and log record data. It has three types.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;· &lt;b&gt;&lt;i&gt;&lt;u&gt;Full Database Backup &lt;/u&gt;&lt;/i&gt;&lt;/b&gt;includes all data files in the Database which is complete set of data. This also have enough log records that allow to restore the data during restore recovery. This is called base backup. Every restore situation need at least one base, full backup. For small databases, performing a Full Backup takes small amount of time and the backup occupies small amount of disk spaces. As database becomes larger, the full backup takes more time to finish, so as the restore takes more time during recovery. As for as larger databases concern, take Full backup along with supported differential backups, transaction log backups to reduce backup and restore time and associated system overhead.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;When restoring a database from a Full backup , SQL Server re-creates the database in one step. As Full database backups include transaction log records within it, after restoring is over, all uncommitted transactions during the time of full database backup taken, are rolled back. So the restored database matched the original database when it was backed up minus the uncommitted transactions.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;· &lt;b&gt;&lt;i&gt;&lt;u&gt;Differential Backup&lt;/u&gt;&lt;/i&gt;&lt;/b&gt; : Differential backup of a database backs up only modified data since a last base database backup. It is small in size comparative to Full Database backup, obviously, runs fast, saves backup time. The base for first Differential backup after the full backup, is last full backup and for subsequent differential backups the base is the previous differential backup until the next full data backup is performed. This base is called as differential base. For a Simple Recovery model database, there should be only one differential base and for Full Recovery Model, there may be multibase Differential bases are allowed, but it is difficult to administer. For a Read-Write and online databases, &lt;u&gt;sys.database_files&lt;/u&gt; system catalog view returns various information including three column information about differential base. That columns are &lt;b&gt;differential_base_lsn , differential_base_guid, differential_base_time. &lt;/b&gt;For a read-only databases &lt;u&gt;sys.master_files&lt;/u&gt; catalog view should be use to get the information about the differential base.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;Have a full database backup and subsequent frequently taken differential backup for a large mission critical databases to avoid data loss. As the differential backup process takes smaller time to finish, the restore from it also takes minimum time. &lt;/p&gt;&lt;p&gt;When restoring from Differential Backups , a full backup restore should be done first and then a most recent Differential backup is to be restored even though a multiple differential backups has been taken between Full Backup and most recent Differential backup. No Log Backups that were taken between full backup and Differential backup need to be restore. If any tail log backup that has been taken before the full backup is restored, then that should be restored after restoring the differential backup.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;· &lt;b&gt;&lt;i&gt;&lt;u&gt;Partial Backup&lt;/u&gt;&lt;/i&gt;&lt;/b&gt; includes primary file groups and read-write file groups. Excludes read-only file groups by default. It can back up specified read-only file groups while taking backup. This is new to SQL Server 2005. It is different from differential backup. It is designed to provide flexibility for databases having simple recovery model. A Partial Backup of a read-only databases only have the Primary file groups files. To create Partial Backup we have to use &lt;b&gt;&lt;i&gt;READ_WRITE_FILEGROUPS [&amp;lt;filegrouplist]&lt;/i&gt;&lt;/b&gt; option in T-SQL Statement. Partial Backups can not be done through SSMS. Maintenance Plans also do not support Partial Backups.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;A Partial Backup can be base for the &lt;b&gt;&lt;i&gt;&lt;u&gt;Differential Partial Backup&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;. Differential Partial backups back up all the data extents that are modified after a base partial backup of same set of file groups are performed. This can be performed with the help of the following command.&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;BACKUP DATABASE &lt;i&gt;database_name&lt;/i&gt; READ_WRITE_FILEGROUPS [ &lt;b&gt;,&lt;/b&gt; &lt;i&gt;&amp;lt;&lt;/i&gt;file_filegroup_list&lt;i&gt;&amp;gt;&lt;/i&gt; ] TO &lt;i&gt;&amp;lt;&lt;/i&gt;backup_device&lt;i&gt;&amp;gt;&lt;/i&gt; WITH DIFFERENTIAL &lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;· &lt;b&gt;&lt;i&gt;&lt;u&gt;File Or File Group Backup&lt;/u&gt;&lt;/i&gt;&lt;/b&gt; includes the file or file groups specified. An Individual file of a database alone can be backed up with this type of backup. This backup is very useful for the failure situation like if only one file is damaged in the database, we can restore that particular file only instead of having full database restore. This can minimize the restore time very much. There are two types of File backups. File Backup and Differential File Backup. A File Backup of a database can be the base for the Differential File Backup. Performing Differential File backup will give you an error if you changed the read/write file to read-only file after taking last full file backup. So whenever you change a read/write file to read-only file or a read-only file to read write file then take a full file backup.&lt;/p&gt;&lt;p&gt;An advantage of having file backup is recovery from damaged files or a file located in damaged media is very faster. The only damaged files can be restored. The disadvantage of this is maintaining complete file backup set can be more time consuming and complexity of administrative task is increased.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;A complete set of file or file group backup is equivalent to Full database backup. When performing file group backups for a full or bulk logged model database do perform transition log backups additionally.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;· &lt;b&gt;&lt;i&gt;&lt;u&gt;Transaction LOG Backup &lt;/u&gt;&lt;/i&gt;&lt;/b&gt;includes only log records. For a full or bulk-logged recovery model regular transaction log backup is required. If not taken the transaction log file grows continuously till the disk is full. LOG Backup can be performed with the following command.&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;BACKUP LOG &amp;lt;database name&amp;gt; To &amp;lt;device name&amp;gt;.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;There is a special type of LOG Backup that is Tail-Log backup. This log backup is taken immediately after the database failure if the log disk is accessible. This can be done if you include WITH NORECOVERY option in BACKUP LOG Command. When you issue this option the database becomes Restoring State and becomes offline to guaranty no modification can be done after finishing the tail-log backup. After taking Tail-Log Backup you have to restore the database.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;· &lt;b&gt;&lt;i&gt;&lt;u&gt;COPY-ONLY Backup&lt;/u&gt;&lt;/i&gt;&lt;/b&gt; : This is a special situation backup. It does not affect the regular SQL Server Backups and Restore sequences. After taking the COPY-Only Backup the transaction logs are not truncated. As the name specified it does only copying either Full Database or Full Log. This can be performed when issuing WITH COPY_ONLY option in BACKUP Command.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Backup History&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;The information about the backup history are stored in the msdb database which are very useful to manage backups. The following system tables in the msdb system database store history information about backups. &lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;1) &lt;b&gt;&lt;u&gt;Backupfile&lt;/u&gt;&lt;/b&gt; stores a row for each data and log file in the database including a column is_present that indicates whether that file was backed up as a part of the backup set.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;2) &lt;b&gt;&lt;u&gt;Backupfilegroup&lt;/u&gt;&lt;/b&gt; stores a row for each filegroup in a database at a time of a backup but this table does not indicate whether the filegroup was backed up or not. This table is new to SQL Server 2005.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;3) &lt;b&gt;&lt;u&gt;Backupset&lt;/u&gt;&lt;/b&gt; stores a row for each backup set when a new backup set is created for each backup event.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;4) &lt;b&gt;&lt;u&gt;Backupmediaset&lt;/u&gt;&lt;/b&gt; stores one row for each media set to which backupsets are written. &lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;5) &lt;b&gt;&lt;u&gt;Backupmediafamily&lt;/u&gt;&lt;/b&gt; stores one row for each media family or its part of mirrored media set and one row for each mirror in the set.&lt;/p&gt;&lt;p&gt;For more information about Backup History see Books Online.&lt;/p&gt;&lt;p&gt;In the next and final part, Part-4, I will explain about Restoring Database.&lt;/p&gt;</description><link>http://sqlthoughts.blogspot.com/2008/03/know-transaction-log-part-3.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-6121769501903174416</guid><pubDate>Thu, 13 Mar 2008 02:36:00 +0000</pubDate><atom:updated>2008-03-13T08:06:03.462+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Database LOGs</category><category domain="http://www.blogger.com/atom/ns#">Disaster Recovery</category><category domain="http://www.blogger.com/atom/ns#">LOG Backup</category><category domain="http://www.blogger.com/atom/ns#">Recovery</category><category domain="http://www.blogger.com/atom/ns#">Recovery Models</category><category domain="http://www.blogger.com/atom/ns#">Restore Recovery</category><category domain="http://www.blogger.com/atom/ns#">Transaction Log</category><title>KNOW THE TRANSACTION LOG –PART 2</title><description>&lt;p align=&quot;justify&quot;&gt;In my &lt;a href=&quot;http://sqlthoughts.blogspot.com/2008/02/know-transaction-log-part-1.html&quot;&gt;previous post&lt;/a&gt;&lt;/p&gt;  &lt;div class=&quot;wlWriterSmartContent&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:0c1bcc07-713a-4c3c-9620-8d45b46e27d1&quot; style=&quot;padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/SQL%20Server&quot; rel=&quot;tag&quot;&gt;SQL Server&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Recovery&quot; rel=&quot;tag&quot;&gt;Recovery&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Restore%20Recovery&quot; rel=&quot;tag&quot;&gt;Restore Recovery&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Backup&quot; rel=&quot;tag&quot;&gt;Backup&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Recovery%20Models&quot; rel=&quot;tag&quot;&gt;Recovery Models&lt;/a&gt;&lt;/div&gt;  &lt;p align=&quot;justify&quot;&gt;, I wrote about the Restart Recovery which is automatically done by SQL Server 2005 in the event of SQL Server startup. There is another type of recovery available that is, well known, commonly practiced and a manual process, &lt;font color=&quot;#008000&quot;&gt;RESTORE RECOVERY.&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Restore Recovery is triggered manually by DBAs during the data loss events, to bring back the SQL Server database to a particular point of working state. The data is recovered from the BACKUP of the database taken and stored away in a media either tape or disk file.&lt;/p&gt;  &lt;p&gt;Before looking further inside, let us discuss some basics of Backups.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font color=&quot;#800000&quot;&gt;What is the need of a Backup?&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Backup is the backbone for the mission where critical data involved. Even though having high availability system configured with compatible RAID level of Disk Subsystems or fully redundant Storage Area Networks and for Servers that are clustered with failovers with Microsoft Cluster Services and SQL Server 2005 failover clusters, backups of mission-critical databases are so important for many reasons. &lt;u&gt;Say suppose, a developer executed a DELETE FROM query forgetfully missed a WHERE clause in it against a production server, instead of Development Server where he supposed to execute&lt;/u&gt;! This is one simple example. A lot of such situations may arrive to test your Database Administrative abilities. You have to rely on your database Backup.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;In a Restore Recovery, Backup is so important. But a behaviour of Restore Recovery is based on a property of the Database that is &amp;#8216;Recovery&amp;#8217;. There are three Recovery Models available in SQL Server. They are &lt;font color=&quot;#008000&quot;&gt;SIMPLE&lt;/font&gt;, &lt;font color=&quot;#008000&quot;&gt;FULL&lt;/font&gt;, and &lt;font color=&quot;#008000&quot;&gt;BULK-LOGGED&lt;/font&gt;. When you create a Database, the default value of this option is &amp;#8216;FULL&amp;#8217;. This can be changed with &amp;#8216;Alter Database&amp;#8217; command with a SET RECOVERY option. For example Alter Database mydb SET RECOVERY SIMPLE. &lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font color=&quot;#800000&quot;&gt;Simple Recovery Model&lt;/font&gt;&lt;/u&gt;.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;This model provides a very simplest form of backup. This model minimizes the administrative overheads to a DBA. When this RECOVERY option is set in a database, then its transaction log will not be included during the backup and it is not possible to take TRANSACTION LOG Backup. When you take backup, the SQL Server automatically truncates transaction log by dropping the inactive log records and free up the space used by them.&lt;/p&gt;  &lt;p&gt;This model of recovery is advisable to &lt;/p&gt;  &lt;p&gt;&amp;#183; The databases that are under development process.&lt;/p&gt;  &lt;p&gt;&amp;#183; The databases that are mainly used for data ware houses.&lt;/p&gt;  &lt;p&gt;&amp;#183; The databases that are used for read-only purposes.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;There are no log backups involved in Simple Recovery model; the database can be restored to the end of the most recent backup. So the work done after the last full backup can be lost.&lt;/p&gt;  &lt;p&gt;Simple recovery model has following restrictions.&lt;/p&gt;  &lt;p&gt;1. Page restore can not be done.&lt;/p&gt;  &lt;p&gt;2. File Restore and Piecemeal Restore are available only for read only databases.&lt;/p&gt;  &lt;p&gt;3. Point-in-time restore is not available.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font color=&quot;#800000&quot;&gt;Full Recovery Model.&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;This is the default Recovery Model when you create a database in SQL Server 2005. This model provides a full protection to the data. Thus this is best option to prevent data loss. These recovery models full rely on transaction log backups. To avoid data loss you have to frequently take backup of transaction log along with data backups. If you have a transition log backup after a failure, then you can restore the data to the point of time when the failure occurs. &lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;As all activities including Bulk Copy operations, SELECT INTO, and even Create Index, are logged into the Transaction Log file, and it keeps the log records even after taking the data backup, the Transaction log file may grow high in volume in disk size if you specify auto grow during creating the database. This is one disadvantage of this recovery model, but can be easily handled with DBA&amp;#8217;s high attention. As the storage is growing high in this model, the restoration time will be relatively high. For each time a transaction log backup is performed, the inactive log records are truncated and the space used by them is freed up for future usages. &lt;/p&gt;  &lt;p&gt;The following scenarios are highly suited to have a database with FULL Recovery Model.&lt;/p&gt;  &lt;p&gt;1. If the database contains multiple filegroups or read-only file groups.&lt;/p&gt;  &lt;p&gt;2. If having efficient DBAs who can perform point-in-time recovery, Individual page restorations.&lt;/p&gt;  &lt;p&gt;3. For high cost tolerance scenarios to tolerate the disk cost due to highly growing transaction logs.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font color=&quot;#800000&quot;&gt;Bulk-logged Recovery model.&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;This model is very similar to the full recovery model excepts it won&amp;#8217;t log the Bulk Copy Operations, SELECT INTO, CREATE INDEX, ALTER INDEX REBUILD, DROP INDEX, WRITETEXT and UPDATETEXT BLOB operations. That means these operations are minimally logged. Because these recovery model can not log these operations as they run very fast. But transaction log records are created for such operations that took place and the page extents which are affected by these operations are also recorded in that log records. Still Log Backup is required to free up the inactive transaction log records. The Bulk-Logged Recovery model does not support Point-In-Time Restoration. This model is very useful where frequent bulk copy operations take place, so that, they are minimally logged and the performance degradations due to bulk copy operations will not be there.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font color=&quot;#800000&quot;&gt;What is LOG Truncation?&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;If the log records are not eventually not deleted in a frequency of time, Transaction LOG file will grow in high volume (of course depends upon the file size mentioned CREATE DATABASE command) upto even completely full your disk drive. So, inactive transaction records should be deleted in frequency of time. Deleting all inactive Transaction records from Transaction Log file is called as LOG Truncation. &lt;/p&gt;  &lt;p&gt;LOG truncates occurs automatically &lt;/p&gt;  &lt;p&gt;&amp;#183; for a simple recovery model database after a checkpoint occurs &lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;&amp;#183; for the FULL and Bulk-logged model after taking the Transaction Log backup, if a checkpoint occurs after the previous backup.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;In the next part of this series, we will see the Backup Types and Restore Sequences. &lt;/p&gt;  </description><link>http://sqlthoughts.blogspot.com/2008/03/know-transaction-log-part-2.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-8396856779993330342</guid><pubDate>Wed, 27 Feb 2008 05:54:00 +0000</pubDate><atom:updated>2008-02-27T11:24:40.012+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Checkpoints</category><category domain="http://www.blogger.com/atom/ns#">Database LOGs</category><category domain="http://www.blogger.com/atom/ns#">Recovery</category><category domain="http://www.blogger.com/atom/ns#">REDO and UNDO In SQL 2005</category><category domain="http://www.blogger.com/atom/ns#">Restart Recovery</category><category domain="http://www.blogger.com/atom/ns#">Transaction Log</category><title>Know The Transaction LOG -Part 1</title><description>&lt;p align=&quot;justify&quot;&gt;After writing about the LOG shipping in my previous post, many questions raised that urged me to share the knowledge about the database logs in SQL Server 2005. As it is a huge concept to discuss, I planned to write a series of posts in Database Transaction Logs.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;u&gt;&lt;font color=&quot;#800000&quot;&gt;What is Database LOG?&lt;/font&gt;&lt;/u&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;A Database log always called as Transaction Log, is a critical component of a database. It is in a format of one or more disk files, created with &#39;Create Database&#39; or &#39;Alter Database&#39; command. The Transaction Log is required to bring back the last working state of your database when a failure occurs to your database.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Based on the &#39;RECOVERY&#39; option of the database, Transaction Log records every database modification including the information about the pages which are being modified, the data values added or modified, start and end time of modification occurs to a series of LOG records. So that, whenever a &lt;strong&gt;&lt;font color=&quot;#008040&quot;&gt;&#39;undoing&#39; or &#39;redoing&#39;&lt;/font&gt;&lt;/strong&gt; is required, SQL Server 2005 can do that to your database with the help of Transaction Log.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;u&gt;&lt;font color=&quot;#800000&quot;&gt;What is Undo or&amp;#160; Redo ?&lt;/font&gt;&lt;/u&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Before&amp;#160; knowing these, it is necessary to know how a transaction&amp;#160; work with the modification or how SQL Server handles a transaction.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Whenever a data modification request is received by the SQL Server, regardless of explicit or implicit transaction, all the underlying pages are loaded into the buffer cache. A series of log records are created for this transaction including page numbers for which the modifications are to be carried out, before stage and after stage of the modification. All these logs records are internally linked together. Then the modifications take effect in the pages loaded in cache.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;After modifications are done in cache, if a Rollback request for this particular transaction is received then all the undo operations for this transaction are carried out from the Transaction Log records. This Roll Backward operation is called &lt;font color=&quot;#008040&quot;&gt;&#39;Undoing&#39;&lt;/font&gt;.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Suppose a Commit request for this transaction is received, then first log records are written to log disk files, prior to the data pages that are modified in cache are written to the data disk files. The buffer manager ensures this. Write LOG Records first and then DATA Records into Disk Files. This mechanism is called as &lt;font color=&quot;#008040&quot;&gt;&#39;Write-Ahead-Log&#39;(WAL). &lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;After writing log records into the log file or files and before writing the modified data records into the data files, say suppose, SQL Server stopped due to some resource problems, then, SQL Server uses these log records to recover all the transactions that are marked as committed&amp;#160; and not reflected in data,&amp;#160; during the restart of SQL Server. This recovery is called &lt;strong&gt;&lt;font color=&quot;#008040&quot;&gt;Restart Recovery&lt;/font&gt;&lt;/strong&gt;. This restart recovery is always done for all the databases of an instance when that instance of SQL Server is restarted. This restart recovery, which is doing Roll Forward of all transactions to the data files is called &lt;font color=&quot;#008040&quot;&gt;&#39;Re-doing&#39;&lt;/font&gt;.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font color=&quot;#800000&quot;&gt;LOG Sequence Number (LSN)&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Every Log Record in Transaction log is associated with a LSN that is Log Sequence Number. As every transaction is associated with a series of log records, and every log records having LSN within it and all related log records are linked backward for Rollback operations. LSN of a log record is unique and it is a sequence number greater than the previous LSN associated with old transactions.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Every Data Page has a LSN number of the Log record which modified this page earlier, recorded in its header. Every LOG Record associated with a page for which the modification is being carried out, is also having the previous LSN stored in the Page&amp;#8217;s header, and the new LSN number for this current modification. When a Redo operation is carried out by the SQL Server, it checks these two LSN numbers. If the LSN of the page is high then REDO skip for this page.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font color=&quot;#800000&quot;&gt;Active LOG Records and Inactive Log Records&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;The Records in LOG files are marked as two types, Active and Inactive. All the Log Records that are the part of live transactions which are not yet either committed or rolled back are called as Active Log Records. The Log Records related with earlier committed or rolled backed transactions are called as Inactive Records. The redoing or undoing operation carried out by the SQL Server, only deals with Inactive Log Records. &lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font color=&quot;#800000&quot;&gt;Virtual Log Files&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;SQL Server Database Engine, divide the physical Log disk file into Virtual log files internally. The number and size of the virtual log files cannot be configured explicitly by any DBA. It is based on the auto growth specification in Database for its log file. Database engine tries to have a minimum number of virtual log files for a physical log file. When a log file is created first, the number of Virtual log files may be 4 to 16. And it will go higher when the physical LOG file is enlarged. The performance will be slower, if number of virtual log files are high. SQL Server will automatically create VLFs during the expansion of Physical LOG File, so creating the LOG file with considerable size and file growth percentage should be adequately specified will reduce the number of Virtual Log Files in LOG. To view the Virtual log file use undocumented DBCC Command DBCC LOGINFO. The following is DBCC LOG Info of one of my active SQL Server Database in my development server. This Log file is having 16 Virtual Log files.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table class=&quot;MsoTableGrid&quot; style=&quot;border-right: medium none; border-top: medium none; border-left: medium none; border-bottom: medium none; border-collapse: collapse; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;     &lt;tr style=&quot;mso-yfti-irow: 0; mso-yfti-firstrow: yes&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: black 1pt solid; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt; color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;FieldID &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: black 1pt solid; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt; color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;FileSize &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: black 1pt solid; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt; color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;StartOffset &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: black 1pt solid; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt; color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;FSEQNO &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: black 1pt solid; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt; color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;STATUS &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: black 1pt solid; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt; color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;PARITY &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: black 1pt solid; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt; color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;CREATELSN &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 1&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;253952 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;8192 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;24 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;64 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 2&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;253952 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;262144 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;27 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;64 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 3&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;253952 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;516096 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;22 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;128 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 4&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;278528 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;770048 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;23 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;128 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 5&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;262144 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;1048576 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;25 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;64 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;24000000034800494 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 6&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;262144 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;1310720 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;26 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;64 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;25000000049500003 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 7&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;262144 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;1572864 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;28 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;64 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;27000000020000052 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 8&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;262144 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;1835008 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;29 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;64 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;28000000019100003 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 9&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;262144 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2097152 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;30 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;64 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;29000000007300459 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 10&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;262144 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2359296 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;31 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;64 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;29000000050700023 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 11&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;262144 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2621440 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;32 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;64 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;31000000019800006 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 12&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;327680 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2883584 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;33 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;64 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;32000000004600469 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 13&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;327680 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;3211264 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;34 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;64 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;33000000024100176 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 14&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;393216 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;3538944 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;35 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;64 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;34000000035400136 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 15&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;393216 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;3932160 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;36 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;64 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;35000000034400087 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr style=&quot;mso-yfti-irow: 16; mso-yfti-lastrow: yes&quot;&gt;       &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;64&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;2 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 57.8pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;77&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;458752 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 70.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;4325376 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 53.2pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;71&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;37 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 51.15pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;68&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;0 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 52.55pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;64 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style=&quot;border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 145.9pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1&quot; valign=&quot;top&quot; width=&quot;195&quot;&gt;         &lt;p&gt;&lt;span style=&quot;color: black; font-family: &quot; trebuchet=&quot;trebuchet&quot; ms?,?sans-serif??=&quot;ms?,?sans-serif??&quot;&gt;36000000044200003 &lt;/span&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;          &lt;p&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;u&gt;&lt;font color=&quot;#800000&quot;&gt;Checkpoints in Transaction Logs&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Within a start and end of a complete transaction, we may use checkpoints or save points with the help of CHECKPOINT and SAVE TRANSACTION T-SQL statements, to store partially done transactions to write in disk files. These checkpoints may also internally triggered by SQL Server itself too. What a checkpoint does within the transaction?&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Checkpoint is a SQL Server process that writing all modified data pages I buffer cache into disk files.It is also forces any pending transaction log records into log file. Performing Checkpoints reduces the recovery time of restart recovery, as it forced the transactions to written to log files and also writes the dirty pages into disk files. This process of Checkpoints minimize the Roll forward operations of Restore Recovery.&lt;/p&gt;  &lt;p&gt;The Checkpoint Operation involves following steps.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Writing out all dirty pages into Data disk files. &lt;/li&gt;    &lt;li&gt;Writing a list of active transactions to Transaction log. &lt;/li&gt;    &lt;li&gt;Storing check point log records to Transaction Log. &lt;/li&gt; &lt;/ul&gt;  &lt;p align=&quot;justify&quot;&gt;Scope of the Checkpoints is the Database level. So the Checkpoint operation run only for the current database only.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;Checkpoint occurs in the following cases.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Whenever we issue CHECKPOINT T-SQL Command for the current database. &lt;/li&gt;    &lt;li&gt;Whenever SQL Server shuts down without option WITH NOWAIT. This checkpoint works for all the databases in that instance. WITH NOWAIT option skips the checkpoint. &lt;/li&gt;    &lt;li&gt;Whenever a Data Files are added to or removed from a Database using ALTER DATABASE Command. &lt;/li&gt;    &lt;li&gt;When Bulk copy operation or Select Into operation performed in a database for which &amp;#8216;Bulk-logged&amp;#8217; Recovery model is set. &lt;/li&gt;    &lt;li&gt;When a database&amp;#8217;s recovery model is changed from Bulk-logged or FULL to SIMPLE. &lt;/li&gt;    &lt;li&gt;For a Simple Recovery Model Database, if the size of the Transaction Log exceeds 70%. &lt;/li&gt;    &lt;li&gt;When number of log entries exceeds the estimated amount of work required by the SQL Server&#39;s &#39;Recovery Interval&#39; configuration. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I think, I covered utmost every aspect of Restart Recovery often called as Crash Recovery.In my next part of this post, I will write about the another type of Recovery - Restore Recovery.&lt;/p&gt;  </description><link>http://sqlthoughts.blogspot.com/2008/02/know-transaction-log-part-1.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-536255386303368520</guid><pubDate>Fri, 22 Feb 2008 12:10:00 +0000</pubDate><atom:updated>2008-02-22T19:26:01.316+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Disaster Recovery</category><category domain="http://www.blogger.com/atom/ns#">High Availablity</category><category domain="http://www.blogger.com/atom/ns#">LOG Shipping</category><title>Hey Standby Server ! Your (Transaction Log) Ship(ment) has arrived…!-(LOGSHIPPING)</title><description>Having SQL Server as a Database Solution to your enterprise applications, you may have a little chance of losing your valuable data, due to some failures, as SQL Server 2005 is having a lot of features for High-Availability and Disaster Recoverability.&lt;br /&gt;&lt;br /&gt;One of such feature is LOG Shipping. Even though LOG Shipping is available from predecessors of SQL Server 2005, it is more robust with SQL Server 2005. In SQL Server 2000, logshipping is only available in Enterprise edition. In SQL 2005, it is available from Standard edition.&lt;br /&gt;&lt;br /&gt;All you require a stand by server with a same SQL Server Configuration, and a tamper proof network connection between the production server and the standby server.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;How LOGSHIPPING works….?&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;br /&gt;&lt;/span&gt;Before delving into LOGShipping, let us think over, how we were maintaining a stand by server for our failures?&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Normally, we backup our Database in to a Device (either tape or a disk file) and move the backup to another server, and restore the backup there. In these situations, the down time of the Database will be more, depending upon the standby or warm server’s setup and how frequently we are doing this manualy. If the standby server is located near by the primary production server then the job will be done frequently. Suppose if the Standby Server is located in another part of the world, then what will happen!?&lt;br /&gt;&lt;br /&gt;LOGShipping does all the steps described above in an automatic way. SQL Agent Service plays a vital role here.&lt;br /&gt;&lt;br /&gt;A SQL Server Agent Job first takes the Backup of the Transaction log of the Database from the Primary Server (for which Logshipping is enabled) in a file and store it in a (specified) network shared path in a specified time interval. Then secondary server’s SQL Server Agent’s Job gets the files from the network shared path in the order that they were taken backup from primary Server Database and copy it in its file system and restore the transaction log to the standby server’s database. For this purpose, the network service account which is maintaining the SQL Server Agent Service in the Secondary server must have the Read Permission for the Network Shared Path.&lt;br /&gt;&lt;br /&gt;Setting up a Logshipping in a Domain scenario , where the Primary Server and Standby Server are the members of the same Domain, it is advisable to use the same domain user account for the both Servers’ SQL Server Agent Service, so that no conflict will happen and give read /write permission for the network shared folder to that account. But in a no-domain scenario, to set up a log shipping, you have to adopt a tricky way. Create an user account with a same name and same password in both the Prinmary and the Secondary Server and make it member of SQL Server Agent Group and give full control over the Network Shared Path where Primary Server’s Database&#39;s Transaction Log Backup were stored.&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Steps Involved in Logshipping.&lt;br /&gt;&lt;/span&gt;1. Backup the primary database in to a device.&lt;br /&gt;2. Restore the backup in the secondary Server with NORECOVERY option.&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;color:#990000;&quot;&gt;(Note: First time transport log manually. If your LOG file is too big in size, then, change the RECOVERY model of the DATABASE to Simple and take the Backup. It will reduce the size of your log. After taking the backup change the recovery model to FULL, because, you can set up logshipping for the Database with FULL recovery model. Following steps are handled by the scheduled jobs.)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;3. Backup the Transaction Log of the Primary Database.&lt;br /&gt;4. Copy the Transaction Log to Secondary Database.&lt;br /&gt;5. Apply the Transaction Log To Secondary Database.&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Steps to be followed in Failover&lt;br /&gt;&lt;/span&gt;1. Backup the last transactions after the last schedule of LOGShipping from the Primary (fault) sever, if possible.&lt;br /&gt;2. Apply to the secondary database.&lt;br /&gt;3. Synchronize the user related to the database in the secondary server.&lt;br /&gt;4. Reconfigure the server as Production Server.&lt;br /&gt;&lt;span style=&quot;color:#cc0000;&quot;&gt;PROS &amp;amp; CONS of LOGShipping&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Pros are :&lt;/span&gt;&lt;br /&gt;o Easy to implement.&lt;br /&gt;o Easy to maintain.&lt;br /&gt;o It is more reliable.&lt;br /&gt;o Multiple standby servers can be configured.&lt;br /&gt;o Stand by Server Database can be used for reporting purposed to minimizing the workloads of the primary server.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Here are some cons too…&lt;/span&gt;&lt;br /&gt;o No automatic failover (The Database Mirroring, an another feature of SQL Server 2005, supports automatic failovers.)&lt;br /&gt;o Manual failover requires a technocrat during failover.&lt;br /&gt;o At least a minimum data loss depending upon how frequently your logs are being shipped.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc0000;&quot;&gt;Some last considerations….&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;All the steps in LOGShipping involves SQL Server Jobs, all that jobs are executed in a frequency of time, and the failover is manual (main drawback of LOGShipping)  so  keep the frequency of logshipping in a low time interval to minimize the amount of data loss during failover.&lt;br /&gt;&lt;br /&gt;Give some special consideration for synchronizing the user logins in both servers (primary and secondary) for failover situations, so that you can switch the standby server as a production server to all of your client applications by simply changing the name or IP or  both, and keep trouble-shooting the faulty server. If you succeeded in troubleshooting, you can make this server as standby server and started log shipping from the production server. Synchronizing users in secondary server may cause SID conflicts. So do it carefully.&lt;br /&gt;&lt;br /&gt;If you have enough infrastructure, then it is recommended to have another server as Monitoring Server which involves the LOGShipping operation, and track status and statistics of LOGShipping.&lt;br /&gt;&lt;br /&gt;After setting up LOGShipping, you can monitor the operations, through three tools available in SQL Server 2005.&lt;br /&gt;1. TRANSACTION LOG SHIPPING STATUS REPORT - an built-in Report available in SSMS Standard reports.&lt;br /&gt;2. SQL Server LOG files&lt;br /&gt;3. SQL Server Agent’s Job History.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;For further studies:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;br /&gt;&lt;/span&gt;1. Read Chapter 27:LOGShipping and Database Mirroring , from the book ‘MICROSOFT SQL SERVER 2005 – Administrator’s Companion’ by Edward Whalen, Marcilina Gracia and others - MS PRESS.&lt;br /&gt;2. Refer Books Online.</description><link>http://sqlthoughts.blogspot.com/2008/02/hey-standby-server-your-transaction-log.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>17</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-7771045820720269968</guid><pubDate>Fri, 15 Feb 2008 12:04:00 +0000</pubDate><atom:updated>2008-02-15T17:43:39.384+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Connectivity</category><category domain="http://www.blogger.com/atom/ns#">Firewall</category><category domain="http://www.blogger.com/atom/ns#">SQL Protocols</category><title>SQL Server 2005 Connectivity Problems</title><description>Last week, I have encountered a problem in connecting SQL Server 2005 from a remote machine, to a Server, in which Windows Vista Business Edition was the operating system.&lt;br /&gt;&lt;br /&gt;After installing the SQL Server 2005 with SP2 in the Vista Business Machine, I started checking the SQL Server. It is working fine in local server. When I am trying to connect the same server from an Application (developed in VB.NET), I was unable to connect that.&lt;br /&gt;&lt;br /&gt;My basic principle in diagnosing the problem is, always starting with zero. So I started ping the server IP and also the name of the Server. It was working fine.&lt;br /&gt;&lt;br /&gt;Second I checked the Application, that the Server Name (and instance name in the correct format, ‘\’ should be used with instance name not the ‘/’) specified there is correct or not!? It was right!&lt;br /&gt;&lt;br /&gt;Then I checked Server’s Surface area Configuration, whether the server is allowing remote connection or not! It is allowing! Then checked that the Protocols for Remote Connections are properly configured or not! That was also done! (As I knew the purpose of that Server earlier, after installing the SP2, I configured all these things earlier! Still I checked everything again!)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc0000;&quot;&gt;&lt;strong&gt;So everything is fine, and where lies the block!?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then I started digging with error numbers in SQL Server Books Online and a lot of SQL Server related websites.&lt;br /&gt;&lt;br /&gt;Most of the times I got the error was “Named Pipes Provider, error: 40 - Could not open a connection to SQL Server” . Best answer I have got on searching with this error is in &lt;a href=&quot;http://blogs.msdn.com/sql_protocols/&quot;&gt;SQLProtcols&lt;/a&gt; blogs. A must read blog for the every DBAs.( The last article published in that blog was July 2007)&lt;br /&gt;&lt;br /&gt;Then I found that, SQL Browser Service was stopped and disabled! So I started with the following commands!( I typed in Command Prompt!)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;color:#3366ff;&quot;&gt;sc config sqlbrowser start= auto&lt;br /&gt;net start sqlbrowser&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After starting the SQLBrowser, I was getting the Error (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)&lt;br /&gt;&lt;br /&gt;This error number is related to &lt;span style=&quot;font-size:130%;color:#cc0000;&quot;&gt;&lt;strong&gt;Firewall!&lt;/strong&gt;&lt;/span&gt; Then I got that. I have to open the port ( the default port for my situation is the default port of SQL Server 1433) in firewall! The following link helped me! Step by step is explained there.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms175043.aspx&quot;&gt;http://msdn2.microsoft.com/en-us/library/ms175043.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now it is working fine! Thank you MSDN!</description><link>http://sqlthoughts.blogspot.com/2008/02/sql-server-2005-connectivity-problems.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>18</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-8349861395301045095</guid><pubDate>Wed, 30 Jan 2008 12:05:00 +0000</pubDate><atom:updated>2008-01-30T17:43:58.681+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Catalog Views</category><category domain="http://www.blogger.com/atom/ns#">CLR Integration in SQL</category><category domain="http://www.blogger.com/atom/ns#">DMVs</category><title>.NET CLR Integration with SQL Server 2005.</title><description>Even though there are a lot of different thoughts in using CLR based codes inside SQL Server 2005, this feature of SQL SERVER provides a rich programming environment for both developers and DBAs. As the coding technology is in traditional way (with all of the language features) and integrating that code in a most secured area like SQL Server, this environment gives us to create safe, secure, scalable and feature - rich Stored Procedure, UDFs, UDTs, Triggers and User Defined Aggregates.&lt;br /&gt;&lt;br /&gt;Prior to SQL Server 2005, the developers use their complex logics in COM Objects and call that COM objects with OLE Automation in SQL Server (using sp_OA*) Extended Stored Procedure. In SQL Server 2005, the error handling introduced in with TRY..CATCH block but it is still susceptible to untrappable errors, where we can handle these with structure error handling methods available in .NET languages. (&lt;a href=&quot;http://download.microsoft.com/download/4/7/a/47a548b9-249e-484c-abd7-29f31282b04d/SQLCLRforDBAs.doc&quot;&gt;http://download.microsoft.com/download/4/7/a/47a548b9-249e-484c-abd7-29f31282b04d/SQLCLRforDBAs.doc&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;More advantages over using SQL CLR integration instead of XPROCs   are&lt;br /&gt;&lt;ul&gt;&lt;li&gt;As CLR requests memory from SQL Server not directly from Windows, there is no managed user-code memory leaks making SQL Server slow or hanging up.&lt;/li&gt;&lt;li&gt;As CLR and SQL Server integrated within, the CLR code runs within SQL Server also gaining safe and secure environment by SQL Security and .NET Framework environment’s security. &lt;/li&gt;&lt;li&gt;This also makes safe SQL Server from user-code access violation cause crashes.&lt;br /&gt;This CLR integration of Complex logics in Data layer itself reducing high cost of network traffic of high marshaling of data to  COM Server (in case of Distributed COMs are in use)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;By default, after the installation of the SQL Server, this feature is disabled. We have to enable this feature (if we want to use that).  Use Surface Area Configuration For Features Wizard to enable or use the following code.&lt;br /&gt;&lt;br /&gt;sp_configure &#39;show advanced options&#39;, 1;&lt;br /&gt;GO&lt;br /&gt;RECONFIGURE;&lt;br /&gt;GO&lt;br /&gt;sp_configure &#39;clr enabled&#39;, 1;&lt;br /&gt;GO&lt;br /&gt;RECONFIGURE;&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;Once you configured your server to enable this feature, now your .NET code can be integrated with SQL Server.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Assemblies&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;br /&gt;&lt;/span&gt;Managed code is compiled and deployed in units called Assembly. If you create a package in .NET language it will be either .exe or .dll. SQL Server supports .DLL assemblies. First you have to register an assembly using CREATE ASSEMBLY in SQL Server before its functionality is used or processed.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Create Assembly  TSQL Statement will register an assembly in SQL Server. Using WITH PERMISSION_SET keyword, you can specify security permission of the assembly. Permission set may be SAFE, EXTERNAL_ACCESS, or UNSAFE. Default permission set is SAFE.&lt;br /&gt;Books Online is saying&lt;br /&gt;&lt;br /&gt;“&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;To create an EXTERNAL_ACCESS or UNSAFE assembly in SQL Server, one of the following two conditions must be met:&lt;br /&gt;The assembly is strong name signed or Authenticode signed with a certificate. This strong name (or certificate) is created inside SQL Server as an asymmetric key (or certificate), and has a corresponding login with EXTERNAL ACCESS ASSEMBLY permission (for external access assemblies) or UNSAFE ASSEMBLY permission (for unsafe assemblies).&lt;br /&gt;The database owner (DBO) has EXTERNAL ACCESS ASSEMBLY (for EXTERNAL ACCESS assemblies) or UNSAFE ASSEMBLY (for UNSAFE assemblies) permission, and the database has the &lt;/span&gt;&lt;a id=&quot;ctl00_rs1_mainContentContainer_ctl20&quot; href=&quot;http://msdn2.microsoft.com/en-us/library/ms187861.aspx&quot;&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;TRUSTWORTHY Database Property&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt; set to ON. “&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;After an assembly is registered in SQL Server, It can be used.&lt;br /&gt;&lt;br /&gt;To monitor and manage CLR objects, we can use CLR Catalog views , CLR related DMVs  and DMFs.&lt;br /&gt;&lt;span style=&quot;color:#6666cc;&quot;&gt;Catalog Views&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#6666cc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:#33cc00;&quot;&gt;SYS.ASSEMBLIES&lt;/span&gt; Catalog view returns each row per assembly registered in SQL Server.&lt;br /&gt;&lt;span style=&quot;color:#33cc00;&quot;&gt;SYS.ASSEMBLY_FILES&lt;/span&gt; Catalog view return each row per file for all the files that makes up the assembly.&lt;br /&gt;&lt;span style=&quot;color:#33cc00;&quot;&gt;SYS.ASSEMLY_REFERENCES&lt;/span&gt; catalog view returns all each row for a pair of assemblies which is directly referencing other assembly.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#6666cc;&quot;&gt;Dynamic Management Views and Functions&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#33cc00;&quot;&gt;sys.dm_clr_appdomains &lt;/span&gt;: Returns a row for each application domain in the server&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#33cc00;&quot;&gt;sys.dm_clr_loaded_assemblies&lt;/span&gt;: Returns a row for each managed user assembly loaded into the server address space&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#33cc00;&quot;&gt;sys.dm_clr_properties&lt;/span&gt;: Returns a row for each property related to SQL Server common language runtime (CLR) integration, including the version and state of the hosted CLR&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#33cc00;&quot;&gt;sys.dm_clr_tasks&lt;/span&gt; : Returns a row for all common language runtime (CLR) tasks that are currently running&lt;br /&gt;&lt;br /&gt;For Further Studies Read&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Books Online : &lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms131102.aspx&quot;&gt;http://msdn2.microsoft.com/en-us/library/ms131102.aspx&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Blogs : &lt;a href=&quot;http://blogs.msdn.com/sqlclr/default.aspx&quot;&gt;http://blogs.msdn.com/sqlclr/default.aspx&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</description><link>http://sqlthoughts.blogspot.com/2008/01/net-clr-integration-with-sql-server.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>24</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-8657298050231519137</guid><pubDate>Mon, 28 Jan 2008 08:50:00 +0000</pubDate><atom:updated>2008-01-28T14:26:12.398+05:30</atom:updated><title>Database Snapshots</title><description>In SQL Server 2005, an interesting new feature is available is Database snapshots.(Of course it is available on Enterprise Edition only )&lt;br /&gt;&lt;br /&gt;It is a point-in-time, read-only , Virtual copy of the source database that is a snapshot of a particular source database can be created in a particular time.It is most useful if your database contains historical data like Quarterly sales, year-wise employees performance. This snapshots can be used for further reporting purposes. Multiple snapshots can be created from single source database for different point of times.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When you create a snapshot for a Source database, SQL Server create an empty Sparse file(is NTFS File),If there are uncommitted transactions are there, it will not copied to Snapshot, the pages before the transactions are copied to Sparse file. NTFS Sparse file will not hold the user data at the time of creation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Whenever the source database is modified after the snapshot is created, the Copy-On-Write operation is began for every snapshots! At the time of creation of a NTFS Sparse file, SQL Server creates a bitmap file for every sparse file, with bit for every page of the source database to check the page is copied to snapshot or not. When a page updating is in progress, SQL Server checks this bit and if the page is not copied then it will copy the page to snapshot(s). This is called Copy-On-Write operation. The Read from snapshot operation first checks this bit for whether read it from snapshot or from source database. This bitmap is stored in cache so it is always available until the SQL Server shuts down or the database is closed. If any one this two happen, then the bitmaps are need to be reconstructed when the database startups.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The snapshots can not be backed up an restored.More over if any snapshots are available for a particular database, that DB can not be dropped. Snapshots can not be attached or detached,&lt;br /&gt;For security aspects, the all the security constraints are inherited to snapshots. If you drop a user from source database it will not dropped from snapshot!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Need more about Database snapshots&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;blockquote&gt;&lt;li&gt;Chapter 4. Databases and Database Files from the book Inside Microsoft SQL&lt;br /&gt;Server 2005 : The Storage Engine by Kalen Delaney.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms187054(SQL.90).aspx&quot;&gt;Read More&lt;br /&gt;about Read / Write operations in snapshots.&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.simple-talk.com/sql/database-administration/sql-server-2005-snapshots/&quot;&gt;For&lt;br /&gt;further pros and cons of database snapshots read this.&lt;/a&gt; &lt;/li&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;</description><link>http://sqlthoughts.blogspot.com/2008/01/database-snapshots.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-3699404654410642121</guid><pubDate>Mon, 07 Jan 2008 11:18:00 +0000</pubDate><atom:updated>2008-01-07T16:51:38.978+05:30</atom:updated><title>SET NOCOUNT ON – A simple Performance Booster</title><description>&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;How many of us using the SET NOCOUNT ON statement in our stored procedures? This simple one line code do a lot of differences in performance (in terms of Network Traffic which is one the performance related issue) of SQL Server.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;What will this do is simply cut off the number of rows affected by the stored procedures’ Select / Insert / Delete/ Update statements. According to BOOKS ONLINE, When SET NOCOUNT is ON, the count (indicating the number of rows affected by a Transact-SQL statement) is not returned. When SET NOCOUNT is OFF, the count is returned. SET NOCOUNT ON eliminates the sending of DONE_IN_PROC messages to the client for each statement in a stored procedure. &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;By default&lt;span style=&quot;&quot;&gt; value of &lt;/span&gt;SET NOCOUNT is OFF. &lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;If your application really wants the number of rows affected, then you can use &lt;b&gt;&lt;i&gt;@@RowCount&lt;/i&gt;&lt;/b&gt; variable which is very handy. &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;On reading this BOL, a question is raised on my mind, that what happened if&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;I set this&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;on, to SQLDATAREADER’s RecordsAffected Property ? Is there any link between this SET NCOUNT? But it is not having any link. Because the remark section of the SqlDataReader&lt;span class=&quot;cs&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;cpp&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;nu&quot;&gt;.&lt;/span&gt;RecordsAffected Property in MSDN (&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.recordsaffected.aspx&quot;&gt;http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.recordsaffected.aspx&lt;/a&gt;) is saying that The &lt;span class=&quot;selflink&quot;&gt;RecordsAffected&lt;/span&gt; property is not set until all rows are read and you close the SqlDataReader.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;So to reduce network traffic, you can add this simple line at the starting of every stored procedure. For further digging read the followings.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;a href=&quot;http://www.sqlmag.com/Article/ArticleID/22093/sql_server_22093.html&quot;&gt;http://www.sqlmag.com/Article/ArticleID/22093/sql_server_22093.html&lt;/a&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;a href=&quot;http://weblogs.asp.net/jgalloway/archive/2006/08/30/How-NOCOUNT-affects-ADO.NET.aspx&quot;&gt;http://weblogs.asp.net/jgalloway/archive/2006/08/30/How-NOCOUNT-affects-ADO.NET.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;a href=&quot;http://www.mssqltips.com/tip.asp?tip=1226&quot;&gt;http://www.mssqltips.com/tip.asp?tip=1226&lt;/a&gt;&lt;/p&gt;</description><link>http://sqlthoughts.blogspot.com/2008/01/set-nocount-on-simple-performance.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-6735925305831899339</guid><pubDate>Thu, 03 Jan 2008 13:39:00 +0000</pubDate><atom:updated>2008-01-03T19:09:28.350+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Endpoints</category><title>A Starting Point to Endpoints</title><description>&lt;p align=&quot;justify&quot;&gt;SQL Server 2005 supports various type of Endpoints in its various services. These endpoints are nothing but a listener that can receive requests&amp;#160; from the clients which are connecting to SQL Server&#39;s particular service.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Tabular Data Stream Endpoints.&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;These endpoints are introduced by SQL Server 2005 for defining the SQL Server connections.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;When an application is communicating SQL Server it should use the either one of the four available network protocols supported by SQL Server with the format of communication in a Microsoft Communication Format called Tabular Data Stream. During the setup of SQL Server, it creates endpoints for all four type of Protocols (TCP/IP, Named Pipes, Shared Memory, Virtual Interface Adapter) and if the particular Protocol is enabled, then that particular endpoint can be used.&lt;/p&gt;  &lt;p&gt;The following endpoints are automatically created &lt;/p&gt;  &lt;p&gt;TSQL LocalMachine Endpoint&amp;#160; for Shared Memory&lt;/p&gt;  &lt;p&gt;TSQL Named Pipes Endpoint&amp;#160; for Named Pipes&lt;/p&gt;  &lt;p&gt;TSQL Default TCP for TCP/IP&lt;/p&gt;  &lt;p&gt;TSQL Default VIA for VIA&lt;/p&gt;  &lt;p&gt;DAC and HTTP Endpoints are also created for Dedicated Admin Connection and Native XML Web Services ( I will post a separate topic on this Native XML Web Services ) respectively.&lt;/p&gt;  &lt;p align=&quot;justify&quot;&gt;For Shared memory and&amp;#160; Named Pipes there can be only one endpoint per instance. But all other endpoints, besides the default endpoints, user end points can be created. The user created endpoints&amp;#160; are manageable with TSQL statements(Create Endpoint, Alter Endpoint, Drop Endpoint). To connect SQL Server through a user created endpoint, that endpoint must be given a GRANT CONNECT permission to PUBLIC by admin.&lt;/p&gt;  &lt;p&gt;For further studies on Endpoints search &lt;strong&gt;&lt;u&gt;Network Protocols, and TDS Endpoints&lt;/u&gt;&lt;/strong&gt; in &lt;strong&gt;SQL Books Online&lt;/strong&gt;.&lt;/p&gt;  </description><link>http://sqlthoughts.blogspot.com/2008/01/starting-point-to-endpoints.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-4324093866240186237</guid><pubDate>Tue, 01 Jan 2008 10:58:00 +0000</pubDate><atom:updated>2008-01-02T08:50:27.260+05:30</atom:updated><title>Happy New Year 2008...</title><description>As Millions of people already said &#39;Goodbye 2007!&#39;, A New Year 2008 has born gloriously. I wish you all a happy and prosperous New year.&lt;br /&gt;&lt;br /&gt;Like most of us, I too resolve in this new year to compel my self to write atleast one post in every month(minimum) and i will stand on this resolution.&lt;br /&gt;&lt;br /&gt;More over I decided to give you a hint about my next post in my every post.&lt;br /&gt;&lt;br /&gt;As you know I missed a lot to post last year as my profession makes my passion out.&lt;br /&gt;&lt;br /&gt;This year as we are going to welcome the new flavour of SQL Server 2008, I will discuss more about that too.&lt;br /&gt;&lt;br /&gt;So, let us welcome the new year 2008 with a great smiles and we will pass more miles in this year.&lt;br /&gt;&lt;br /&gt;HAPPY NEW YEAR.</description><link>http://sqlthoughts.blogspot.com/2008/01/happy-new-year-2008.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-3804801147274443395</guid><pubDate>Thu, 22 Mar 2007 06:41:00 +0000</pubDate><atom:updated>2007-03-22T12:48:21.553+05:30</atom:updated><title>Answer lies beneath the way of  Query  Processing</title><description>The Question I asked in my previous post is why we should not use column alias used in SELECT list in Group BY Clause and we used that in ORDER By Clause.&lt;br /&gt;&lt;br /&gt;The answer lies in the way how a SELECT Statement is processed.&lt;br /&gt;&lt;br /&gt;SQL is differ from other programming language in an aspect how it is processing  the Code. Normally the a code in a programming  language is processed top down method, meaning, first written statement will be processed first. But SQL wont.&lt;br /&gt;&lt;br /&gt;A &#39;SELECT&#39; Statement is processed by SQL Server as follows.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 0, 0);&quot;&gt;FROM Clause is processed first.&lt;/span&gt;&lt;br /&gt;On condition of Join Clause is Processed Second.&lt;br /&gt;Join condition is Processed third.&lt;br /&gt;Where is Processed fourth.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Group By is Processed fifth.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;With {Cube} | {Rollup}  is processed sixth.&lt;br /&gt;Having  is Processed seventh.&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 0, 0);&quot;&gt;SELECT  is processed eighth.&lt;/span&gt;&lt;br /&gt;Distinct  is  processed 9th&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;ORDER By   is processed 10th.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;TOP Clause is processed 11th.&lt;br /&gt;&lt;br /&gt;Suppose if you omitted any optional clauses that steps will be omitted in the processing.&lt;br /&gt;&lt;br /&gt;Now look at the query.&lt;br /&gt;&lt;br /&gt;Group By is Processed before the  Select  so we can not use the alias created in the SELECT in Group By.&lt;br /&gt;&lt;br /&gt;And Order By is  Processed after SELECT so we can use that in ORDER BY  Clause.&lt;br /&gt;&lt;br /&gt;For further reading about how queries are processed read Chapter 1  and 2 of the book.&lt;br /&gt;&lt;br /&gt;&lt;table style=&quot;margin-left: 15px;&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td class=&quot;v2&quot; colspan=&quot;3&quot; height=&quot;20&quot;&gt;&lt;b&gt;Inside Microsoft® SQL Server™ 2005 T-SQL  Querying&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td class=&quot;v2&quot; colspan=&quot;3&quot; height=&quot;18&quot;&gt;By Itzik Ben-Gan -  (Solid Quality Learning),  Lubor Kollar, Dejan Sarka&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</description><link>http://sqlthoughts.blogspot.com/2007/03/answer-is-how-query-is-processed-by-sql.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-1017807667990622506</guid><pubDate>Thu, 15 Mar 2007 08:53:00 +0000</pubDate><atom:updated>2007-03-15T14:36:35.089+05:30</atom:updated><title>A Little Question...!</title><description>&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;In my last post, I have explained how CTE can be used in SQL Server  2005. Just take one query used in that post leads to the another topic.&lt;br /&gt;&lt;br /&gt;Select EmployeeId,&lt;span style=&quot;font-weight: bold;&quot;&gt;Year(OrderDate) AS OrderYear&lt;/span&gt;,&lt;br /&gt;Count(*) as [Sales]&lt;br /&gt;From dbo.Orders&lt;br /&gt;Where EmployeeId=1&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Group by EmployeeId,Year(OrderDate)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Order By OrderYear&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;In the above query  the &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;&quot;&gt;column &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;&quot;&gt;Year(OrderDate) is having a alias OrderYear. But this alias is not used in the  Group By Clause  why? Again the alias is used in Order By Clause. Why don&#39;t we  use the column alias in the select list can not be used in Group By as in Order By?&lt;br /&gt;&lt;br /&gt;Post your comments...!&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;</description><link>http://sqlthoughts.blogspot.com/2007/03/little-question.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-1545699956570694122</guid><pubDate>Sat, 03 Mar 2007 14:06:00 +0000</pubDate><atom:updated>2007-03-03T20:18:06.171+05:30</atom:updated><title>The Virtue of the Virtual Views</title><description>&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;The following SQL Puzzle is found in the book &lt;i style=&quot;&quot;&gt;APRESS: Advanced Transact –SQL for SQL Server 2000 in page no 71 of Chapter 2.&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;You are provided with these tables: Orders, OrderDetails, and OrderPayments. Each order in the Orders table can have one or more order parts in the OrderDetails table and zero or more payments in the OrderPayments table. Your task is to write a query that produces order information along with the sum of its order parts and order payments. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;The Orders table will look like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;Ordered&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;custid&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;odate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;1&lt;span style=&quot;&quot;&gt;                 &lt;/span&gt;1001&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;2001−01−18 00:00:00.000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;2&lt;span style=&quot;&quot;&gt;                 &lt;/span&gt;1002&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;2001−02−12 00:00:00.000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;The OrderDetails table will look like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;orderid &lt;span style=&quot;&quot;&gt;          &lt;/span&gt;partno&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;qty&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;1 &lt;span style=&quot;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;101 &lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;1 &lt;span style=&quot;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;102 &lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;2 &lt;span style=&quot;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;101 &lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;2 &lt;span style=&quot;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;102 &lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;The OrderPayments table will look like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;orderid &lt;span style=&quot;&quot;&gt;          &lt;/span&gt;paymentno &lt;span style=&quot;&quot;&gt;    &lt;/span&gt;value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;1 &lt;span style=&quot;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;1 &lt;span style=&quot;&quot;&gt;                     &lt;/span&gt;75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;1 &lt;span style=&quot;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;2 &lt;span style=&quot;&quot;&gt;                     &lt;/span&gt;75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;2 &lt;span style=&quot;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;1 &lt;span style=&quot;&quot;&gt;                     &lt;/span&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;2 &lt;span style=&quot;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;2 &lt;span style=&quot;&quot;&gt;                     &lt;/span&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;The expected output is shown in the following table:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;orderid &lt;span style=&quot;&quot;&gt;          &lt;/span&gt;custid &lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;odate &lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;sum_of_qty &lt;span style=&quot;&quot;&gt;   &lt;/span&gt;sum_of_value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;1 &lt;span style=&quot;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;1001 &lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;2001−01−18 00:00:00.000 &lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;15 &lt;span style=&quot;&quot;&gt;                   &lt;/span&gt;150&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:11;&quot;  &gt;2 &lt;span style=&quot;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;1002 &lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;2001−02−12 00:00:00.000 &lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;10 &lt;span style=&quot;&quot;&gt;                   &lt;/span&gt;100&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;How can you solve this?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;To solve this problem you need to write a query with two derived table in SQL Server 2000.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;Derived tables are Virtual Tables in SQL Server that are similar to views but differs from views by not storing the definition of it in the Metadata. &lt;b style=&quot;&quot;&gt;The Derived Table is a result set of a Query that is used in the FROM Clause of an outer Query&lt;/b&gt; and it will be no longer available after the execution outer query. Derived Tables can be nested but may not be co-related.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;Let’s go to the solution.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;i style=&quot;&quot;&gt;&lt;u&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;Query listing:1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;i style=&quot;&quot;&gt;&lt;u&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;Select&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt; OQ&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt;OQ&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;CustId&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt;OQ&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;ODate &lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; QtySum&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt;Paysum&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;From&lt;/span&gt; &lt;span style=&quot;color:gray;&quot;&gt;(&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;Select&lt;/span&gt; Orders&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; Orders&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;CustId&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt;Orders&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;Odate&lt;span style=&quot;color:gray;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:fuchsia;&quot;&gt;Sum&lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;(&lt;/span&gt;OD&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;QTY&lt;span style=&quot;color:gray;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;as&lt;/span&gt; QtySum&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;From&lt;/span&gt; Orders&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;Join&lt;/span&gt; OrderDetails OD&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 1in; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;On&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt; Orders&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderID &lt;span style=&quot;color:gray;&quot;&gt;=&lt;/span&gt; OD&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;Group&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;By&lt;/span&gt; Orders&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt;Orders&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;CustId&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; Orders&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;Odate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;)&lt;/span&gt; OQ&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;Join&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;(&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;Select&lt;/span&gt; O1&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderID&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color:fuchsia;&quot;&gt;Sum&lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;(&lt;/span&gt;op&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;[value]&lt;span style=&quot;color:gray;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;PaySum&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;from&lt;/span&gt; Orders&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;O1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;Join&lt;/span&gt; OrderPayments OP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;on&lt;/span&gt; O1&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId &lt;span style=&quot;color:gray;&quot;&gt;=&lt;/span&gt; Op&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;Orderid&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;Group&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;By&lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;O1&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId &lt;span style=&quot;color:gray;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;as&lt;/span&gt; OP1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;On&lt;/span&gt; OQ&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderID &lt;span style=&quot;color:gray;&quot;&gt;=&lt;/span&gt; OP1&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId &lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;This query is gives you the desired solution (which is also available in that book at page no 494)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;As this book is dealing SQL Server 2000 T-SQL, the author used this derived table way. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;Using Derived Table for complex queries having some disadvantages.&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;It reduces the readability of the query and as well as the debugging complex queries (using derived tables) is a big job.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;SQL Server 2005 offers a novel way to handle these kinds of problems. Using CTE (Common Table Expressions) you can improve readability, and easily maintain a complex query by building such queries in several blocks.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;CTE offers you something that derive tables doesn’t, are, Derived Tables are not referred multiple time in a query, and CTE can be used as recursive queries.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;First I show you the CTE way solution to that problem&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;i style=&quot;&quot;&gt;&lt;u&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;Query listing:2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;With&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt; QTYSum&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;as&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;Select&lt;/span&gt; Ord&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:fuchsia;&quot;&gt;Sum&lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;(&lt;/span&gt;OD&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;Qty&lt;span style=&quot;color:gray;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;as&lt;/span&gt; PartQtySum&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;From&lt;/span&gt; Orders Ord &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;Join&lt;/span&gt; OrderDetails OD&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;on&lt;/span&gt; OD&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId &lt;span style=&quot;color:gray;&quot;&gt;=&lt;/span&gt; Ord&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;Group&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;By&lt;/span&gt; Ord&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;),&lt;/span&gt; &lt;span style=&quot;color:green;&quot;&gt;--&lt;b style=&quot;&quot;&gt;Block 1&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;PaySum&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;As&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;Select&lt;/span&gt; O&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:fuchsia;&quot;&gt;Sum&lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;(&lt;/span&gt;[Value]&lt;span style=&quot;color:gray;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;as&lt;/span&gt; PaySum&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;From&lt;/span&gt; Orders O&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;Join&lt;/span&gt; OrderPayments OP&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;On&lt;/span&gt; O&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId &lt;span style=&quot;color:gray;&quot;&gt;=&lt;/span&gt; OP&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;Group&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;By&lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;O&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color:green;&quot;&gt;-- &lt;b style=&quot;&quot;&gt;Block 2&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;Select&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt; Orders&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderID&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; Orders&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;CustId&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; Orders&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;Odate&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; PartQtySum&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; PaySum &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;From&lt;/span&gt; Orders &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;Join&lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;Paysum &lt;span style=&quot;color:blue;&quot;&gt;on&lt;/span&gt; Orders&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderId &lt;span style=&quot;color:gray;&quot;&gt;=&lt;/span&gt; Paysum&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;Orderid&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;Join&lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;QTYSum &lt;span style=&quot;color:blue;&quot;&gt;on&lt;/span&gt; Orders&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;ORderId &lt;span style=&quot;color:gray;&quot;&gt;=&lt;/span&gt; QTYSum&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;Here, we used the same lines of code, but separating its appearance, which gives us better readability.&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;The &lt;i style=&quot;&quot;&gt;OQ &lt;/i&gt;alias Select Query Statement in the &lt;/span&gt;&lt;b style=&quot;&quot;&gt;&lt;i style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;Query listing:1&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt; was replaced by the &lt;/span&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:green;&quot;   &gt;Block 1 &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;Query of the &lt;/span&gt;&lt;b style=&quot;&quot;&gt;&lt;i style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;Query listing:2 &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;and the OP1&lt;i style=&quot;&quot;&gt; &lt;/i&gt;alias Select Query Statement in the &lt;/span&gt;&lt;b style=&quot;&quot;&gt;&lt;i style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;Query listing:1&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt; was replaced by the &lt;/span&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:green;&quot;   &gt;Block 2 &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;Query of the &lt;/span&gt;&lt;b style=&quot;&quot;&gt;&lt;i style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;Query listing:2&lt;u&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;But this CTE is not used multiple references and recursive queries. Let us see some other example for these options. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;Suppose you want to compare each year’s Sales of a particular Employee with his or her previous year’s sales, the&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;CTE can be used as follows.(NorthWind Database’s Orders Table is used for illustration) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;With&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;YearToDateSales &lt;span style=&quot;color:blue;&quot;&gt;as&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;(&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;Select&lt;/span&gt; EmployeeId&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:fuchsia;&quot;&gt;Year&lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;(&lt;/span&gt;OrderDate&lt;span style=&quot;color:gray;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;AS&lt;/span&gt; OrderYear&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 1in;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:fuchsia;&quot;   &gt;Count&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:gray;&quot;   &gt;(*)&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt; &lt;span style=&quot;color:blue;&quot;&gt;as&lt;/span&gt; [Sales]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;From&lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;dbo&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;Orders &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;Where&lt;/span&gt; EmployeeId&lt;span style=&quot;color:gray;&quot;&gt;=&lt;/span&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;Group&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;by&lt;/span&gt; EmployeeId&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:fuchsia;&quot;&gt;Year&lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;(&lt;/span&gt;OrderDate&lt;span style=&quot;color:gray;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;Select&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt; Cur&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderYear&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt;Cur&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;Sales &lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; Prv&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;Sales&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;From&lt;/span&gt; YearToDateSales &lt;span style=&quot;color:blue;&quot;&gt;as&lt;/span&gt; Cur&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;Left&lt;/span&gt; &lt;span style=&quot;color:gray;&quot;&gt;Outer&lt;/span&gt; &lt;span style=&quot;color:gray;&quot;&gt;Join&lt;/span&gt; YearToDateSales Prv&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;pre&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                       &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;on&lt;/span&gt; Prv&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderYear &lt;span style=&quot;color:gray;&quot;&gt;=&lt;/span&gt; Cur&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;OrderYear &lt;span style=&quot;color:gray;&quot;&gt;-&lt;/span&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;In this example, a CTE named ‘&lt;i style=&quot;&quot;&gt;YearToDateSales‘&lt;/i&gt; &lt;i style=&quot;&quot;&gt;was&lt;/i&gt; referred two times in the outer query with two different aliases(&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;Cur, Prv&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;). The Employee ID is hard-coded, can be replaced with an argument. Add the following two lines before the With caluse of the CTE.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;Declare&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt; @empId &lt;span style=&quot;color:blue;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;set&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt; @empID&lt;span style=&quot;color:gray;&quot;&gt;=&lt;/span&gt;1&lt;span style=&quot;color:gray;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;And replace the ‘&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;Where&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt; EmployeeId&lt;span style=&quot;color:gray;&quot;&gt;=&lt;/span&gt;1’ with&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt; ‘&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;Where&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt; EmployeeId&lt;span style=&quot;color:gray;&quot;&gt;=&lt;/span&gt;@empID’. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;Suppose a CTE is used in batch like the above argumented CTE, the previous statement of With&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;should be terminated by semicolon. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;Now for a recursive CTE, consider a&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;query that has to fetch the hierarchy of organisation using its Employee table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;WITH&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt; DirectReports&lt;span style=&quot;color:gray;&quot;&gt;(&lt;/span&gt;ManagerID&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; EmployeeID&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; EmployeeLevel&lt;span style=&quot;color:gray;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;AS&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:gray;&quot;   &gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;SELECT&lt;/span&gt; ManagerID&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; EmployeeID&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; 0 &lt;span style=&quot;color:blue;&quot;&gt;AS&lt;/span&gt; EmployeeLevel&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;FROM&lt;/span&gt; HumanResources&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;Employee&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;WHERE&lt;/span&gt; ManagerID &lt;span style=&quot;color:gray;&quot;&gt;IS&lt;/span&gt; &lt;span style=&quot;color:gray;&quot;&gt;NULL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;UNION ALL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;SELECT&lt;/span&gt; e&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;ManagerID&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; e&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;EmployeeID&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; EmployeeLevel &lt;span style=&quot;color:gray;&quot;&gt;+&lt;/span&gt; 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;FROM&lt;/span&gt; HumanResources&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;Employee e&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;INNER&lt;/span&gt; &lt;span style=&quot;color:gray;&quot;&gt;JOIN&lt;/span&gt; DirectReports d &lt;span style=&quot;color:green;&quot;&gt;-- This line is calling the CTE &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 2.5in; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:green;&quot;   &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;itself&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;recursively&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;ON&lt;/span&gt; e&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;ManagerID &lt;span style=&quot;color:gray;&quot;&gt;=&lt;/span&gt; d&lt;span style=&quot;color:gray;&quot;&gt;.&lt;/span&gt;EmployeeID &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:gray;&quot;   &gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;SELECT&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt; ManagerID&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; EmployeeID&lt;span style=&quot;color:gray;&quot;&gt;,&lt;/span&gt; EmployeeLevel &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;FROM&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt; DirectReports &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;WHERE&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt; EmployeeLevel &lt;span style=&quot;color:gray;&quot;&gt;&lt;=&lt;/span&gt; 2 &lt;span style=&quot;color:gray;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;For&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;further Studies&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms175972.aspx&quot;&gt;http://msdn2.microsoft.com/en-us/library/ms175972.aspx&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;a href=&quot;http://www.dotnetheaven.com/Uploadfile/DipalChoksi/introcte_sql2005_dc08032006001855AM/introcte_sql2005_dc.aspx&quot;&gt;http://www.dotnetheaven.com/Uploadfile/DipalChoksi/introcte_sql2005_dc08032006001855AM/introcte_sql2005_dc.aspx&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;a href=&quot;http://www.4guysfromrolla.com/ASPScripts/PrintPage.asp?REF=%2Fwebtech%2F071906-1.shtml&quot;&gt;http://www.4guysfromrolla.com/ASPScripts/PrintPage.asp?REF=%2Fwebtech%2F071906-1.shtml&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</description><link>http://sqlthoughts.blogspot.com/2007/03/virtue-of-virtual-views.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-7208127656338026192</guid><pubDate>Tue, 27 Feb 2007 06:16:00 +0000</pubDate><atom:updated>2007-03-02T15:20:25.268+05:30</atom:updated><title>A Date With DATETIME</title><description>&lt;p&gt;Consider a simple(!?) query executed against the SQL Server 2005 sample database &#39;&lt;i&gt;AdventureWorks&#39;&lt;br /&gt;&lt;br /&gt;SELECT soh.SalesPersonID, sum(sod.LineTotal) as amount&lt;br /&gt;FROM sales.SalesOrderHeader soh&lt;br /&gt;JOIN sales.SalesOrderDetail sod&lt;br /&gt;ON sod.SalesOrderID = soh.SalesOrderID&lt;br /&gt;WHERE soh.Status = 5 -- complete&lt;br /&gt;and &lt;b&gt;soh.OrderDate &gt;= &#39;20040101&#39;&lt;/b&gt;&lt;br /&gt;GROUP by soh.SalesPersonID&lt;br /&gt;&lt;br /&gt;Does it work fine...? Definitely it will work fine because it is a well tested by an author and a corporate database developer and architect-LOUIS DAVIDSON&#39;s Query illustrated in the book Apress : Pro SQL Server 2005. LOUIS DAVIDSON is one among the group of authors and he wrote the chapter 3 where this query is used.&lt;br /&gt;&lt;br /&gt;I am not going to dig into this query and how it is working. Let us look in to the bold characters in the above query &lt;b&gt;soh.OrderDate &gt;= &#39;20040101&#39; &lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;In this query , &lt;b&gt;&lt;i&gt;soh.OrderDate&lt;/i&gt;&lt;/b&gt; is &lt;b&gt;&lt;i&gt;datetime&lt;/i&gt;&lt;/b&gt; column and it is compared with a string expression &lt;b&gt;&lt;i&gt;&#39;20040101&#39; &lt;/i&gt;&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;On focusing this portion, we have to recollect some simple things that we have already aware of, how SQL Server Stores a date value in available &lt;i&gt;datetime&lt;/i&gt; datatypes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;ul type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;i&gt;datetime :&lt;/i&gt; by      consuming 8 byte integers for a single value, stores the number of days      before or after the base date 1st January 1900 in the first four bytes,      and the time of the day measured in 3 1/3 millisecond units after the      midnight in the last four bytes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;i&gt;smalldatetime&lt;/i&gt;: by      consuming 2 two bytes integers for a single value, stores the number of      days after the base date 1st January 1900 in the first two bytes, and the      time measured in minutes after midnight in the last two bytes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Right!?&lt;br /&gt;&lt;br /&gt;In the above query does not worry about the time. But for us in many cases as we are as a developer or a DBA it is a major factor.&lt;br /&gt;&lt;br /&gt;Here in this query, the string expression &lt;b&gt;&lt;i&gt;&#39;20040101&#39; &lt;/i&gt;&lt;/b&gt;is implicitly converted to &lt;i&gt;datetime&lt;/i&gt;, because according to the hierarchy of the precedence &lt;i&gt;datetime&lt;/i&gt; has the higher precedence than the character string. This expression does not include time part, and the data in the table is also not time aware. &lt;b&gt;&lt;i&gt;What will happen to a query (which includes this type of string literals) that is so conscious about time part stored in the column?&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Normally a &lt;i&gt;datetime&lt;/i&gt; string literal which includes a milliseconds and when it is implicitly converted to &lt;i&gt;datetime&lt;/i&gt;, it will be rounded to the nearest three hundredth milliseconds. If the same is converted &lt;i&gt;to smalldatetime&lt;/i&gt; it will rounded to nearest minute.&lt;br /&gt;&lt;br /&gt;The Author &lt;b&gt;I&lt;span class=&quot;b24-bookauthor&quot;&gt;tzik Ben-&lt;/span&gt;Gan&lt;/b&gt;, of the book&lt;i&gt; &lt;b&gt;&#39;MSPress: Inside Microsoft SQL Server 2005: T-SQL Programming&#39;&lt;/b&gt;&lt;/i&gt;&lt;b&gt; &lt;/b&gt;advise to explicitly convert the string to datetime using datetime functions supported by SQL Server (which perform correct calculations by taking leap year and other calendar calculations in account) whenever possible.&lt;br /&gt;&lt;br /&gt;One more thing we have to consider in this regard is the Language Settings. SQL Server&#39;s datetime functions are depend on the language setting either the default setting of the Server or the Session. Session&#39;s setting has the higher precedence.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;span style=&quot;font-size:100%;&quot;&gt;For further studies :&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; Read &lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;MSPress: Inside Microsoft SQL Server 2005: T-SQL Programming by &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;b24-bookauthor&quot;&gt;byItzik Ben-Gan, Dejan Sarka and Roger Wolter&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms191530.aspx&quot;&gt; http://msdn2.microsoft.com/en-us/library/ms191530.aspx&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; &lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms187928.aspx&quot;&gt; http://msdn2.microsoft.com/en-us/library/ms187928.aspx&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://sqlthoughts.blogspot.com/2007/02/date-with-datetime.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>36</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1141840521707170383.post-4049235096371509927</guid><pubDate>Mon, 26 Feb 2007 11:41:00 +0000</pubDate><atom:updated>2007-03-03T12:46:02.345+05:30</atom:updated><title>SQL Server 2005.... will change your thinking..!</title><description>Hello All.....,&lt;br /&gt;&lt;br /&gt;It is my great pleasure to express my views on SQL Server 2005.&lt;br /&gt;&lt;br /&gt;From the very first day I started working on the New  Version of SQL Server 2005,  I feel  in heaven,  by seeing its new features like... CTE, New Server side Paging functions and much more....,  I started shouting on standing on my table.&lt;br /&gt;&lt;br /&gt;It changed my views on using SQL Server and may be yours too...!&lt;br /&gt;&lt;br /&gt;From that day I thought of starting a blog like this not only for  sharing  my views but also gaining best of other SQL Server Experts like you.&lt;br /&gt;&lt;br /&gt;It  will be an open thought discussion blog. You are always welcome to post  your views , questions and your day to day problems you are facing using  SQL Server 2005 or SQL Server 2000.&lt;br /&gt;&lt;br /&gt;I, as a creator of this blog,  assure you that your frequent visit to this blog will help you as well as me  to get to know more what we knew about this Software and its usage..&lt;br /&gt;&lt;br /&gt;In near future I planned to include  some kind of learning issues to this blog.&lt;br /&gt;&lt;br /&gt;Hope your appreciation by participating in this blog.&lt;br /&gt;&lt;br /&gt;Suresh Barathan</description><link>http://sqlthoughts.blogspot.com/2007/02/sql-server-2005-will-change-your.html</link><author>noreply@blogger.com (Esakkiappan Barathan)</author><thr:total>3</thr:total></item></channel></rss>