<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>pages &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/pages/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Sun, 29 May 2016 17:27:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>SQL Server: Internal Storage and Memory Architecture Interview Questions and Answers (Day-5)</title>
		<link>https://www.dbrnd.com/2016/05/sql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-5/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 29 May 2016 17:23:37 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[pages]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[transaction]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=2910</guid>

					<description><![CDATA[What is the max degree of parallelism option? When SQL Server runs on a computer with more than one microprocessor or CPU, it detects the best degree of parallelism, that is, the number of processors employed to run a single statement, for each parallel plan execution. You can use the max degree of parallelism option [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-5%2F&amp;linkname=SQL%20Server%3A%20Internal%20Storage%20and%20Memory%20Architecture%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-5%2F&amp;linkname=SQL%20Server%3A%20Internal%20Storage%20and%20Memory%20Architecture%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-5%2F&amp;linkname=SQL%20Server%3A%20Internal%20Storage%20and%20Memory%20Architecture%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-5%2F&amp;linkname=SQL%20Server%3A%20Internal%20Storage%20and%20Memory%20Architecture%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-5%2F&amp;linkname=SQL%20Server%3A%20Internal%20Storage%20and%20Memory%20Architecture%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-5%2F&amp;linkname=SQL%20Server%3A%20Internal%20Storage%20and%20Memory%20Architecture%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-5%2F&#038;title=SQL%20Server%3A%20Internal%20Storage%20and%20Memory%20Architecture%20Interview%20Questions%20and%20Answers%20%28Day-5%29" data-a2a-url="https://www.dbrnd.com/2016/05/sql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-5/" data-a2a-title="SQL Server: Internal Storage and Memory Architecture Interview Questions and Answers (Day-5)"></a></p><p><strong>What is the max degree of parallelism option?</strong></p>
<blockquote><p>When SQL Server runs on a computer with more than one microprocessor or CPU, it detects the best degree of parallelism, that is, the number of processors employed to run a single statement, for each parallel plan execution. You can use the max degree of parallelism option to limit the number of processors to use in parallel plan execution.</p></blockquote>
<p><strong>What is MAXDOP in SQL Server?</strong></p>
<blockquote><p>Maximum Degree of Parallelism (MAXDOP) is an option in SQL server which enables you to configure SQL Server to use available CPU/CPUs to run a single statement in parallel execution plan. MAXDOP configuration highly depends on SQL Server edition, CPU type and operating system.</p>
<p>In my experience, I had to play with MAXDOP for certain statements coming from different servers in order to find best option of MAXDOP.</p></blockquote>
<p><strong>What is the MAXDOP query hint option?</strong></p>
<blockquote><p>You can override the max degree of parallelism value in queries by specifying the MAXDOP query hint in the query statement.</p></blockquote>
<p><strong>T-SQL script to change max degree of parallelism Option.</strong></p>
<blockquote><p>Setting maximum degree of parallelism to 0 allows SQL Server to use all the available processors up to 64 processors.<br />
To suppress parallel plan generation, set max degree of parallelism to 1. Set the value to a number greater than 1 to restrict the maximum number of processors used by a single query execution.</p><pre class="crayon-plain-tag">sp_configure 'show advanced options', 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
sp_configure 'max degree of parallelism', 8;
GO
RECONFIGURE WITH OVERRIDE;
GO</pre><p>
</p></blockquote>
<p><strong>SQL Server 2014: What is Hekaton?</strong></p>
<blockquote class="wp-embedded-content" data-secret="LR1MqWpsGO"><p><a href="https://www.dbrnd.com/2016/01/sql-server-2014-what-is-hekaton/">SQL Server 2014: What is Hekaton?</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/01/sql-server-2014-what-is-hekaton/embed/#?secret=LR1MqWpsGO" data-secret="LR1MqWpsGO" width="600" height="338" title="&#8220;SQL Server 2014: What is Hekaton?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>SQL Server 2014: Create Memory Optimized File Group and Table.</strong></p>
<blockquote class="wp-embedded-content" data-secret="QSkDTl0ZZN"><p><a href="https://www.dbrnd.com/2016/01/sql-server-2014-create-memory-optimized-file-group-and-table/">SQL Server 2014: Create Memory Optimized File Group and Table</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/01/sql-server-2014-create-memory-optimized-file-group-and-table/embed/#?secret=QSkDTl0ZZN" data-secret="QSkDTl0ZZN" width="600" height="338" title="&#8220;SQL Server 2014: Create Memory Optimized File Group and Table&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>What is a Read-Ahead mechanism?</strong></p>
<blockquote><p>The Database Engine supports a performance optimization mechanism called read-ahead. Read-ahead anticipates the data and index pages needed to fulfill a query execution plan and brings the pages into the buffer cache before they are actually used by the query.</p></blockquote>
<p><strong>What are the types of Read-Ahead?</strong></p>
<blockquote><p>There are two types of Read-Ahead, one is Reading Data Pages and second is Reading Index Pages.</p></blockquote>
<p><strong>How internally pages are modified and written to the disk?</strong></p>
<blockquote><p>First page modification happens in the buffer cache and When a page is modified in the buffer cache, it is not immediately written back to disk;instead, the page is marked as dirty.</p>
<p>This means that a page can have more than one logical write made before it is physically written to disk.</p>
<p>For each logical write, a transaction log record is inserted in the log cache that records the modification. The log records must be written to disk before the associated dirty page is removed from the buffer cache and written to disk. SQL Server uses a technique known as write-ahead logging.</p></blockquote>
<p><strong>What is Bookmark Lookup?</strong></p>
<blockquote><p>When a SQL query requests a small number of rows, the optimizer can use the nonclustered index, if available, on the column(s) in the WHERE clause to retrieve the data. If the query refers to columns that are not part of the nonclustered index used to retrieve the data, then navigation is required from the index row to the corresponding data row in the table to access these columns.This operation is called a bookmark lookup.</p></blockquote>
<p><strong>What is a COLD, DIRTY or CLEAN Buffer?</strong></p>
<blockquote><p>The cold buffer cache has a couple of variants within SQL Server.    Typically it refers to the buffer pool right after restart.   The data cache is not loaded (cold) and requires physical reads to populate the cache.</p>
<p>Modified buffers that have not been written to disk are termed DIRTY buffers and are typically written to disk by checkpoint processing.</p>
<p>A clean buffer is a data page in memory that is NOT MODIFIED.</p></blockquote>
<p><strong>What is the use of DBCC DROPCLEANBUFFERS?</strong></p>
<blockquote><p>DBCC DROPCLEANBUFFERS removes the UNMODIFIED buffers from the buffer pool (no longer hashed) and places them on the free list.</p>
<p>This is often used in basic performance testing to clear the data cache and force the data to be retrieved from disk as a physical read instead of a logic read.</p></blockquote>
<p><strong>What is affinity I/O mask option?</strong></p>
<blockquote><p>The affinity I/O mask option binds SQL Server disk I/O to a specified subset of CPUs. In high-end SQL Server online transactional processing (OLTP) environments, this extension can enhance the performance of SQL Server threads issuing I/Os.</p></blockquote>
<p><strong>What should be the different values for affinity I/O mask?</strong></p>
<ul>
<li>A 1-byte affinity I/O mask covers up to 8 CPUs in a multiprocessor computer.</li>
<li>A 2-byte affinity I/O mask covers up to 16 CPUs in a multiprocessor computer.</li>
<li>A 3-byte affinity I/O mask covers up to 24 CPUs in a multiprocessor computer.</li>
<li>A 4-byte affinity I/O mask covers up to 32 CPUs in a multiprocessor computer.</li>
<li>To cover more than 32 CPUs, configure a four-byte affinity I/O mask for the first 32 CPUs and up to a four-byte affinity64 I/O mask for the remaining CPUs.</li>
</ul>
<p><strong>What Is Eager Writing in SQL Server?</strong></p>
<blockquote><p>Eager writing is a long back implemented idea in SQL server to prevent flooding of the buffer pool with pages that are newly created from minimally logged activities, and physically written to disk.</p>
<p>In SQL Server 2014, eager write doesn’t force dirty pages physical write as quickly as previous versions.   This allows dirty pages to spend their life time in RAM, used by SQL and flush them to free list without ever a physical write to disk as long memory is available. This will significantly increase the performance up to 300% as compared to previous versions.</p></blockquote>
<p><strong>Generally, what kind of operations are recorded in the transaction log file?</strong></p>
<ul>
<li>The start and end of each transaction.</li>
<li>Every data modification (insert, update, or delete).</li>
<li>Every extent and page allocation or deallocation.</li>
<li>Creating or dropping a table or index.</li>
<li>Rollback operations are also logged.</li>
</ul>
<p><strong>What happened if FILEGROWTH is enable and disable?</strong></p>
<ul>
<li>If the FILEGROWTH setting is enabled for the log and space is available on the disk, the file is extended by the amount specified in growth_increment and the new log records are added to the extension.</li>
<li>If the FILEGROWTH setting is not enabled, or the disk that is holding the log file has less free space than the amount specified in growth_increment, an 9002 error is generated.</li>
</ul>
<p><strong>Are you suggesting to truncate an old transaction log?</strong></p>
<blockquote><p>Yes,</p>
<p>If the log records were never deleted from the transaction log, the logical log would grow until it filled all the available space on the disks holding the physical log files. At some point in time, old log records no longer necessary for recovering or restoring a database must be deleted to make way for new log records.</p></blockquote>
<p><strong>Do you think truncate log operation reduces the size of the physical log file?</strong></p>
<blockquote><p>Log truncation does not reduce the size of a physical log file, it reduces the size of the logical log and marks as inactive the virtual logs that do not hold any part of the logical log.</p>
<p>A log shrink operation removes enough inactive virtual logs to reduce the log file to the requested size.</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server: Internal Storage and Memory Architecture Interview Questions and Answers (Day-4)</title>
		<link>https://www.dbrnd.com/2016/05/sql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-4/</link>
					<comments>https://www.dbrnd.com/2016/05/sql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-4/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 28 May 2016 17:26:33 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[pages]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[transaction]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=2907</guid>

					<description><![CDATA[How SQL Server virtual address space for the buffer pool? When SQL Server starts, it computes the size of virtual address space for the buffer pool based on a number of parameters such as amount of physical memory on the system, number of server threads and various startup parameters. SQL Server reserves the computed amount [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-4%2F&amp;linkname=SQL%20Server%3A%20Internal%20Storage%20and%20Memory%20Architecture%20Interview%20Questions%20and%20Answers%20%28Day-4%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-4%2F&amp;linkname=SQL%20Server%3A%20Internal%20Storage%20and%20Memory%20Architecture%20Interview%20Questions%20and%20Answers%20%28Day-4%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-4%2F&amp;linkname=SQL%20Server%3A%20Internal%20Storage%20and%20Memory%20Architecture%20Interview%20Questions%20and%20Answers%20%28Day-4%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-4%2F&amp;linkname=SQL%20Server%3A%20Internal%20Storage%20and%20Memory%20Architecture%20Interview%20Questions%20and%20Answers%20%28Day-4%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-4%2F&amp;linkname=SQL%20Server%3A%20Internal%20Storage%20and%20Memory%20Architecture%20Interview%20Questions%20and%20Answers%20%28Day-4%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-4%2F&amp;linkname=SQL%20Server%3A%20Internal%20Storage%20and%20Memory%20Architecture%20Interview%20Questions%20and%20Answers%20%28Day-4%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F05%2Fsql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-4%2F&#038;title=SQL%20Server%3A%20Internal%20Storage%20and%20Memory%20Architecture%20Interview%20Questions%20and%20Answers%20%28Day-4%29" data-a2a-url="https://www.dbrnd.com/2016/05/sql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-4/" data-a2a-title="SQL Server: Internal Storage and Memory Architecture Interview Questions and Answers (Day-4)"></a></p><p><strong>How SQL Server virtual address space for the buffer pool?</strong></p>
<blockquote><p>When SQL Server starts, it computes the size of virtual address space for the buffer pool based on a number of parameters such as amount of physical memory on the system, number of server threads and various startup parameters. SQL Server reserves the computed amount of its process virtual address space for the buffer pool, but it acquires only the required amount of physical memory for the current load.</p></blockquote>
<p><strong>What is min server memory and max server memory?</strong></p>
<blockquote><p>The min server memory and max server memory configuration options establish upper and lower limits to the amount of memory used by the buffer pool of the Microsoft SQL Server Database Engine.</p>
<p>buffer pool never drops its memory allocation below the level specified in min server memory, and never acquires more memory than the level specified in max server memory.</p></blockquote>
<p><strong>An organization requires to add more memory in the running SQL Server so is it require to restart SQL Server service?</strong></p>
<blockquote><p>No, it is not required to restart a SQL Server because the buffer manager supports Hot Add Memory, which allows users to add physical memory without restarting the server.</p></blockquote>
<p><strong>What is a dynamic management view to monitor pages in the buffer cache?</strong></p>
<blockquote><p>You can use the sys.dm_os_buffer_descriptors view to monitor the pages in the buffer cache.</p></blockquote>
<p><strong>What is a Torn Page Protection?</strong></p>
<blockquote><p>Torn page protection is primarily a way of detecting page corruptions due to power failures.</p>
<p>It is managing a 2-bit signature is placed at the end of each 512-byte sector at the page and base on this signature value it detects the torn pages.</p></blockquote>
<p><strong>Why Checksum Protection is a very important?</strong></p>
<blockquote><p>Checksum protection is a stronger data integrity checking.</p>
<p>A checksum is calculated for the data in each page that is written, and stored in the page header. Whenever a page with a stored checksum is read from disk, the Database Engine recalculates the checksum for the data in the page and raises error 824 if the new checksum is different from the stored checksum.</p></blockquote>
<p><strong>What is the role of Named Pipes protocol?</strong></p>
<blockquote><p>Named Pipes is a protocol developed for local area networks. A part of memory is used by one process to pass information to another process, so that the output of one is the input of the other. The second process can be local or remote.</p></blockquote>
<p><strong>What is a Page Header?</strong></p>
<blockquote><p>Page number 0- the file header (page type 15). It holds the file header information. There will be only one header page for each data file and that reside in the 0th position. The header page store the file level information like file size, minimum size, max size and file growth.</p></blockquote>
<p><strong>What is PFS?</strong></p>
<blockquote><p>PFS page is the second page in the data file followed by file header. PFS pages are used to track page level allocation. PFS page repeat after every 8088 pages.</p></blockquote>
<p><strong>How many GAM pages will be there in a 7GB data file?</strong></p>
<blockquote><p>A GAM page can hold information of around 64000 extents. That is, a GAM page can hold information of (64000X8X8)/1024 = 4000 MB approximately. In short, a data file of size 7 GB will have two GAM pages.</p></blockquote>
<p><strong>How many SGAM pages will be there in a 7GB data file?</strong></p>
<blockquote><p>A SGAM page can hold information of 64000 extents. That is, a SGAM page can hold information of (64000X8X8)/1024 = 4000 MB. In short, a data file of size 7 GB will have two SGAM page.</p></blockquote>
<p><strong>How SQL Server engine will decide which extents need to be added into a differential backup?</strong></p>
<blockquote><p>A differential backup process scans through DCP page to identify the extents which are modified after the last full backup and add those extents in the Differential backup.</p></blockquote>
<p><strong>What is Boot Page?</strong></p>
<blockquote><p>There is one special data page that exists only once per database. It is the database boot page. The database boot page is always stored in page 9 of file 1, the first file in the primary file group.</p>
<p>The database boot page contains a broad variety of data about the database itself. Here you can find the internal database version, the compatibility level, the database name and the date of the last log backup.</p></blockquote>
<p><strong>What is an IAM page?</strong></p>
<blockquote><p>IAM stands for Index Allocation Map: To catalog all the pages that belong to a single allocation unit, SQL Server utilizes a special type of pages, the Index Allocation Map or IAM pages. Each allocation unit has at least one IAM Page and depending on the size of the table there might be many.</p></blockquote>
<p><strong>What is a Fill Factor?</strong></p>
<blockquote><p>The fill-factor option is provided for fine-tuning index data storage and performance. When an index is created or rebuilt, the fill-factor value determines the percentage of space on each leaf-level page to be filled with data, reserving the remainder on each page as free space for future growth.</p></blockquote>
<p><strong>What are Virtual Log files? How these are created?</strong></p>
<blockquote><p>SQL Server Database Engine divides each physical log file internally into a number of virtual log files. Virtual log files have no fixed size, and there is no fixed number of virtual log files for a physical log file. The Database Engine chooses the size of the virtual log files dynamically while it is creating or extending log files. The Database Engine tries to maintain a small number of virtual files.</p></blockquote>
<p><strong>Important DMV to find memory related information. (From SQL Server 2008)</strong></p><pre class="crayon-plain-tag">select
(physical_memory_in_use_kb/1024)Memory_usedby_Sqlserver_MB,
(locked_page_allocations_kb/1024 )Locked_pages_used_Sqlserver_MB,
(total_virtual_address_space_kb/1024 )Total_VAS_in_MB,
process_physical_memory_low,
process_virtual_memory_low
from sys. dm_os_process_memory;</pre><p>
<strong>What is Locked pages in Memory (LPIM) concept?</strong></p>
<blockquote><p>Locked pages in memory is a privilege given to SQL Server service account which allows SQL Server not to trim its memory excessively when SQLOS ask SQL Server to do so.</p>
<p>When OS will face memory pressure and in turn inform to SQLOS and then SQLOS will ask SQL Server to trim it consumption. Now if LPIM privilege is not there SQL Server will start trimming its memory consumption.</p>
<p>To avoid this it is better to give optimum value to SQL Server memory and leave enough RAM for OS and then give LPIM privilege.</p></blockquote>
<p><strong>What is WOW?</strong></p>
<blockquote><p>When SQL Server 32 bit runs on 64 bit version of windows it is called WOW.</p></blockquote>
<p><strong>How you resolved out of memory error?</strong></p>
<blockquote><p>Make sure you have set OPTIMUM value for MAX SERVER MEMORY SETTING. This is one which should be adopted as best practice.</p>
<p>Try to find out whether it is internal memory pressure or external. By that I mean if SQL Server is facing memory crunch it will be internal if there is less physical RAM on system it will be external.</p>
<p>Try to find if it is SQL Server VAS pressure. Generally in error message if you get like &#8216;Failed Virtual Allocate Bytes: FAIL_VIRTUAL_RESERVE &#8216; this points to fact that OOM error came because there was VAS pressure.</p></blockquote>
<p><strong>What is the difference between Bufferpool and Virtual memory (VAS)?</strong></p>
<blockquote><p>No buffer pool and VAS are not the same thing. In SQL Server direct physical memory access is not allowed any memory request which comes is first mapped to process VAS and then if SQL Server find memory free it would map this VAS address to physical memory and then memory becomes committed. Bufferpool is physical memory VAS is virtual memory.</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/05/sql-server-internal-storage-and-memory-architecture-interview-questions-and-answers-day-4/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
